0

I'm trying to install Passenger on OS X 10.7 with Xcode (4.3.2) installed is giving me the error: "You have to install development tools first."

That doesn't make sense to me, why isn't it finding the proper requirements? I have installed Xcode from the Apple store.

Is there a list of the actual requirements it needs, instead of this generic message? Or is there a workaround that anyone knows about that would help me get going with passenger on OSX Lion? Thanks!

Exeptions details:

cd ext/libev/ && make libev.la
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -O3 -c -o ev.lo ev.c
 gcc -DHAVE_CONFIG_H -I. -g -O2 -O3 -c ev.c -o ev.o
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -O3 -c -o event.lo event.c
 gcc -DHAVE_CONFIG_H -I. -g -O2 -O3 -c event.c -o event.o
/bin/sh ./libtool --tag=CC   --mode=link gcc  -g -O2 -O3 -version-info 3:0  -o libev.la -rpath /usr/local/lib ev.lo event.lo  -lm 
mkdir .libs
ar cru .libs/libev.a  ev.o event.o
ranlib .libs/libev.a
creating libev.la
(cd .libs && rm -f libev.la && ln -s ../libev.la libev.la)
g++ ext/common/LoggingAgent/Main.cpp -o agents/PassengerLoggingAgent -Iext -Iext/common -Iext/libev   -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<ext/hash_fun.h>" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/common/libpassenger_common.a ext/common/libboost_oxt.a ext/libev/.libs/libev.a -lcurl -lz -lpthread  
cd 'ext/ruby/ruby-1.9.2-x86_64-macosx/' && /Users/victorstan/.rvm/wrappers/ruby-1.9.2-p290@contact-monkey/ruby '/Users/victorstan/.rvm/gems/ruby-1.9.2-p290@contact-monkey/gems/passenger-3.0.12/ext/ruby/extconf.rb'
checking for alloca.h... *** /Users/victorstan/.rvm/gems/ruby-1.9.2-p290@contact-monkey/gems/passenger-3.0.12/ext/ruby/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=/Users/victorstan/.rvm/gems/ruby-1.9.2-p290@contact-monkey/gems/passenger-3.0.12/ext/ruby
    --curdir
    --ruby=/Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
/Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/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/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:452:in `try_cpp'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:834:in `block in have_header'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:833:in `have_header'
    from /Users/victorstan/.rvm/gems/ruby-1.9.2-p290@contact-monkey/gems/passenger-3.0.12/ext/ruby/extconf.rb:36:in `<main>'
rake aborted!
Command failed with status (1): [cd 'ext/ruby/ruby-1.9.2-x86_64-macosx/' &&...]

Tasks: TOP => nginx => native_support => ext/ruby/ruby-1.9.2-x86_64-macosx//passenger_native_support.bundle => ext/ruby/ruby-1.9.2-x86_64-macosx//Makefile
Victor S
  • 5,098
  • 5
  • 44
  • 62
  • 1
    Try some of the solutions in this post http://stackoverflow.com/questions/10184357/how-to-use-rvm-to-install-ruby-1-9-3-when-xcode-4-3-2-is-installed-and-gcc-is-mi – nolim1t Jul 03 '12 at 11:22

2 Answers2

3

You probably need to install Xcode Command Line Tools

In the past this was an optional item in the Xcode install package. Apple now separates them (for whatever reason)

maček
  • 76,434
  • 37
  • 167
  • 198
  • Hmm, that didn't work. Same error message, also can't install thin, similar error when building native extensions... – Victor S Apr 27 '12 at 16:22
  • Eventually I got it working, combination of command line tools and some symlinking magic... I will make this the accepted answer anyway. – Victor S Jul 03 '12 at 15:42
3

In XCode 4.3.2, you can install the command-line developer tools from XCode's Preferences, under "Downloads".

enter image description here

James
  • 1,748
  • 1
  • 11
  • 14
  • Thanks, I installed it already, from the link provided by macek. -- note, it didn't fix the problem – Victor S Apr 27 '12 at 21:01
  • 1
    Take a look at this question, it might have your answer: http://stackoverflow.com/questions/10184357/how-to-use-rvm-to-install-ruby-1-9-3-when-xcode-4-3-2-is-installed-and-gcc-is-mi – James Apr 27 '12 at 22:23
  • I did go through installing the tools with brew, but no luck fixing th e problem, the gems still don't install, do I have to re-install the rubies? – Victor S Apr 30 '12 at 14:12