ankane / argon2-kdf

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

dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin #2

Closed SantiLl closed 4 years ago

SantiLl commented 4 years ago

Having this issue with macOS High Sierra version 10.13.4 (17E199).

Installed blind_index gem (version 2.0.1) which has a dependency with this gem. The following error message is given while trying to run rails db:seed:

dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: 

/Users/santiagollapur/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/argon2-kdf-0.1.2/vendor/libargon2.dylib (which was built for Mac OS X 10.15)

  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin

  Referenced from: 

/Users/santiagollapur/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/argon2-kdf-0.1.2/vendor/libargon2.dylib (which was built for Mac OS X 10.15)

  Expected in: /usr/lib/libSystem.B.dylib

[1]    4807 abort      rails db:seed
ankane commented 4 years ago

Hey @SantiLl, thanks for reporting! It looks like the precompiled library isn't compatible with 10.13. Will see if I can fix that, but in the meantime, you should be able to do:

brew install argon2

And create an initializer with:

Argon2::KDF.ffi_lib = "/usr/local/lib/libargon2.dylib" if Rails.env.development?
ankane commented 4 years ago

Just released 0.1.3 which should fix it (usually takes 10-15 min to become available on Rubygems).

SantiLl commented 4 years ago

Andrew, thanks for the blazing fast answer. Already installed the gem to homebrew but don't have any clue where the init file is, searched through /usr/local/Cellar/argon2 but didn't find any .rb file.

ankane commented 4 years ago

Homebrew doesn't install the gem, just the dylib. Anyways, you can disregard the instructions above and simply update the gem.