Subject:
Re: [ruby-ffi] Unable to compile on Lion
From:
Wayne Meissner
Date:
2/27/12 7:19 PM
To:
ruby-ffi@googlegroups.com


That looks very odd.  Basically, the shell variable is getting mangled somewhere ($$arch becomes rch when it is expanded).  I can't reproduce it on Lion, using the system ruby, or various custom ruby installs.  Do you have a custom shell installed?  (i.e. not bash)

Try the latest source - I've changed the universal build so it should be simpler.

On Saturday, 25 February 2012 22:59:51 UTC+10, Adrian wrote:
There still appears to be an issue install libffi in lion...

"   If a cross compiler is detected then cross compile mode will be used."

Adrian


07:56:13 $> sudo gem install ffi
Building native extensions.  This could take a while...
ERROR:  Error installing ffi:
        ERROR: Failed to build gem native extension.

        /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for ffi.h... no
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 /Library/Ruby/Gems/1.8/gems/ffi-1.0.11/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 /Library/Ruby/Gems/1.8/gems/ffi-1.0.11/ext/ffi_c/libffi/config.sub rch-apple-darwin failed
make[1]: *** No targets specified and no makefile found.  Stop.
make: *** ["/Library/Ruby/Gems/1.8/gems/ffi-1.0.11/ext/ffi_c/libffi"/.libs/libffi_convenience.a] Error 2


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/ffi-1.0.11 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/ffi-1.0.11/ext/ffi_c/gem_make.out
07:56:20 adrian@DeathStar-2 /source/phoenix $>