Subject:
[ruby-ffi] Unable to compile on Lion
From:
Adrian
Date:
11/8/11 7:29 PM
To:
ruby-ffi

When trying to install the lib ffi as a ruby gem from bundler or brew
i get the following output.. Has anybody run into this and found a
solution?

Adrian


11.2.0 Darwin Kernel Version 11.2.0: Tue Aug  9 20:54:00 PDT 2011;
root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64



Installing ffi (1.0.9) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.

        /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/
ruby extconf.rb
checking for ffi.h in /usr/local/include... no
checking for rb_thread_blocking_region()... no
checking for ruby_thread_has_gvl_p()... no
checking for ruby_native_thread_p()... no
checking for rb_thread_call_with_gvl()... no
creating extconf.h
creating Makefile

make
Configuring libffi for rch
configure: WARNING: If you wanted to set the --build type, don't use --
host.
    If a cross compiler is detected then cross compile mode will be
used.
Invalid configuration `rch-apple-darwin': machine `rch-apple' not
recognized
configure: error: /bin/sh /Users/adrian/.bundler/tmp/21514/gems/
ffi-1.0.9/ext/ffi_c/libffi/config.sub rch-apple-darwin failed
make[1]: *** No targets specified and no makefile found.  Stop.
Configuring libffi for rch
configure: WARNING: If you wanted to set the --build type, don't use --
host.
    If a cross compiler is detected then cross compile mode will be
used.
Invalid configuration `rch-apple-darwin': machine `rch-apple' not
recognized
configure: error: /bin/sh /Users/adrian/.bundler/tmp/21514/gems/
ffi-1.0.9/ext/ffi_c/libffi/config.sub rch-apple-darwin failed
make[1]: *** No targets specified and no makefile found.  Stop.
make: *** [/Users/adrian/.bundler/tmp/21514/gems/ffi-1.0.9/ext/ffi_c/
libffi/.libs/libffi_convenience.a] Error 2


Gem files will remain installed in /Users/adrian/.bundler/tmp/21514/
gems/ffi-1.0.9 for inspection.
Results logged to /Users/adrian/.bundler/tmp/21514/gems/ffi-1.0.9/ext/
ffi_c/gem_make.out
An error occured while installing ffi (1.0.9), and Bundler cannot
continue.
Make sure that `gem install ffi -v '1.0.9'` succeeds before bundling.