Closed OleMchls closed 3 years ago
Haha, oh joy, this is like the third M1-related issue I've seen today š
The other ones were C extensions with the system ruby
so I'm not really sure what the state of things is with FFI on the M1.
Are you using the system ruby
or one you installed with e.g. ruby-install
? The latter seems way less problematic for C extensions.
@tarcieri thanks for your prompt reply. I am afraid the M1 won't go away that fast :D That ruby comes from asdf, which I assume builds it using ruby-build
.
Huh, interesting. I wonder if there are any relevant upstream issues on FFI itself.
Can you locate the actual .dylib
on your filesystem and check that it's named one of the things FFI is trying:
Could not open library 'libsodium.dylib': dlopen(libsodium.dylib, 5): image not found.
Could not open library 'libsodium.so.18': dlopen(libsodium.so.18, 5): image not found.
Could not open library 'libsodium.so.18.dylib': dlopen(libsodium.so.18.dylib, 5): image not found.
Could not open library 'libsodium.so.23': dlopen(libsodium.so.23, 5): image not found.
Could not open library 'libsodium.so.23.dylib': dlopen(libsodium.so.23.dylib, 5): image not found
Can you locate the actual
.dylib
on your filesystem and check that it's named one of the things FFI is trying:
What's the best way to locate it? That's not my particular area of expertise š
I found those files
/opt/homebrew/lib/libsodium.dylib
/opt/homebrew/Cellar/libsodium/1.0.18_1/lib/libsodium.dylib
There are even more:
ole@Oles-MBP-2 dnsimple % ls -lhas /opt/homebrew/lib/libsod*
0 lrwxr-xr-x 1 ole admin 51B Feb 4 23:04 /opt/homebrew/lib/libsodium.23.dylib -> ../Cellar/libsodium/1.0.18_1/lib/libsodium.23.dylib
0 lrwxr-xr-x 1 ole admin 44B Feb 4 23:04 /opt/homebrew/lib/libsodium.a -> ../Cellar/libsodium/1.0.18_1/lib/libsodium.a
0 lrwxr-xr-x 1 ole admin 48B Feb 4 23:04 /opt/homebrew/lib/libsodium.dylib -> ../Cellar/libsodium/1.0.18_1/lib/libsodium.dylib
But I assume I am missing the bit that connects ruby to those, I assume that is .dylib
? I just don't know what's next
Those look fine, so this seems like it might be some sort of FFI (or homebrew, or FFI + homebrew) issue on the M1. Unfortunately I can't help debug.
@tarcieri thanks for putting in the effort. It gave me the first pointers <3
Hey there,
I'm trying to get
rbnacl
to function on my M1, but I am hitting the following error message:While at first, this looks like I don't have libsodium installed, I want to point out that I do have it installed via
brew
.Any pointers or workarounds would be appreciated š