ankane / argon2-kdf

Argon2 key derivation for Ruby
MIT License
8 stars 2 forks source link

Improve ARM detection for M1 chip on macOS 12.1 #6

Closed mtomov closed 2 years ago

mtomov commented 2 years ago
> RbConfig::CONFIG["host_cpu"]
=> "aarch64"

Hey!

Thanks for this library. I believe I'm experiencing the same issue as already outlined and fixed here:

https://github.com/ankane/libmf-ruby/issues/3

https://github.com/ankane/libmf-ruby/commit/ce0f281163c48aa066b01d21728f02e417c9b664

I copied the solution over, and has worked for me.

Error details before this:

Fiddle::DLError: dlopen(/Users/martin/.rbenv/versions/2.6.9/lib/ruby/gems/2.6.0/gems/argon2-kdf-0.1.5/vendor/libargon2.dylib, 0x0009): tried: '/Users/martin/.rbenv/versions/2.6.9/lib/ruby/gems/2.6.0/gems/argon2-kdf-0.1.5/vendor/libargon2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/libargon2.dylib' (no such file), '/usr/lib/libargon2.dylib' (no such file)
from /Users/martin/.rbenv/versions/2.6.9/lib/ruby/2.6.0/fiddle.rb:47:in `initialize'
[2] pry(main)> RbConfig::CONFIG["host_cpu"]                                                                        
=> "aarch64"
[3] pry(main)> RbConfig::CONFIG["host_os"]                                                                         
=> "darwin21.1.0"

Let me know if you need any more details. Thank you!

ankane commented 2 years ago

Looks great, thanks @mtomov! Just pushed a new release (0.1.7).

mtomov commented 2 years ago

Great, thanks so much for the rather quick review and version release!

All looks good with the new release! Thanks again!