ffi/ffi — Issue #196: trouble installing on OS X 10.7.3 with App Store Xcode 4.3.1
Author: jessbowers
Created: 2012-03-09 02:17:15+00:00
State: open

I'm getting the following error when trying to install the ffi gem:

> brew install libffi
> gem install ffi

Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.

/Users/jessbowers/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/jessbowers/.rvm/rubies/ruby-1.9.2-head/bin/ruby
--with-ffi_c-dir
--without-ffi_c-dir
--with-ffi_c-include
--without-ffi_c-include=${ffi_c-dir}/include
--with-ffi_c-lib
--without-ffi_c-lib=${ffi_c-dir}/lib
--with-libffi-config
--without-libffi-config
--with-pkg-config
--without-pkg-config
/Users/jessbowers/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/jessbowers/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:452:in `try_cpp'
from /Users/jessbowers/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:834:in `block in have_header'
from /Users/jessbowers/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
from /Users/jessbowers/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
from /Users/jessbowers/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/jessbowers/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
from /Users/jessbowers/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/jessbowers/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from /Users/jessbowers/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from /Users/jessbowers/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:833:in `have_header'
from extconf.rb:9:in `

'

Gem files will remain installed in /Users/jessbowers/.rvm/gems/ruby-1.9.2-head@ian/gems/ffi-1.0.11 for inspection.
Results logged to /Users/jessbowers/.rvm/gems/ruby-1.9.2-head@ian/gems/ffi-1.0.11/ext/ffi_c/gem_make.out