Can't Find Ffi.H When Installing Ffi Ruby Gem

Can't Install ffi -v '1.9.18' on macos Catalina

To get past that error, install ffi using:

gem install ffi -v '1.9.18' -- --with-cflags="-Wno-error=implicit-function-declaration"

Can't install `ffi -v 1.12.2` on mac OS Monterey

I have the same issue on M1 with ffi 1.15.5 and it works if I do:

gem install ffi -v '1.15.5' -- --with-cflags=-Wno-implicit-function-declaration

Same thing goes for ffi 1.12.2.

As far as I understand it (don't know C and googled this) - When C doesn’t find a function, it assumes it is implicitly declared and errors out. --with-cflags=-Wno-implicit-function-declaration tells the compiler to ignore any functions that are implicitly declared.



Related Topics



Leave a reply



Submit