Skip to content

can't update Rails; gcc problem? #33

Closed
DanielKehoe opened this Issue Aug 14, 2013 · 8 comments

4 participants

@DanielKehoe

On a brand new Mac, after installing Tokaido, I wanted to update from Rails 3.2.13 to Rails 4.0. I installed the Apple Xcode Command Line Tools for a gcc compiler. Then I opened the Terminal from within Tokaido and ran gem update rails. It failed with the error: “Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers.”

Here's the full output:

Last login: Wed Aug 14 13:53:05 on ttys000
export TOKAIDO_PATH=/Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/bin; export TOKAIDO_APP_DIR=/Users/danielkehoe; source /Applications/Tokaido.app/Contents/Resources/SetupTokaido.sh
Daniels-MacBook-Air:~ danielkehoe$ export TOKAIDO_PATH=/Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/bin; export TOKAIDO_APP_DIR=/Users/danielkehoe; source /Applications/Tokaido.app/Contents/Resources/SetupTokaido.sh

This terminal is now ready use with Tokaido.

Daniels-MacBook-Air:~ danielkehoe$ pwd
/Users/danielkehoe
Daniels-MacBook-Air:~ danielkehoe$ which gcc
/usr/bin/gcc
Daniels-MacBook-Air:~ danielkehoe$ gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Daniels-MacBook-Air:~ danielkehoe$ ruby -v
ruby 2.0.0p195 (2013-05-14 revision 40731) [x86_64-darwin12.3.0]
Daniels-MacBook-Air:~ danielkehoe$ rails -v
Rails 3.2.13
Daniels-MacBook-Air:~ danielkehoe$ gem update rails
Updating installed gems
Updating coffee-rails
Building native extensions.  This could take a while...
ERROR:  Error installing coffee-rails:
    ERROR: Failed to build gem native extension.

    /Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/bin/ruby extconf.rb
*** 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/danielkehoe/.tokaido/Rubies/2.0.0-p195/bin/ruby
    --with-atomic_reference-dir
    --without-atomic_reference-dir
    --with-atomic_reference-include
    --without-atomic_reference-include=${atomic_reference-dir}/include
    --with-atomic_reference-lib
    --without-atomic_reference-lib=${atomic_reference-dir}/
/Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:431:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:516:in `try_link0'
    from /Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:814:in `try_run'
    from extconf.rb:24:in `<main>'


Gem files will remain installed in /Users/danielkehoe/.tokaido/Gems/gems/atomic-1.1.13 for inspection.
Results logged to /Users/danielkehoe/.tokaido/Gems/gems/atomic-1.1.13/ext/gem_make.out
Updating rails
Building native extensions.  This could take a while...
ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.

    /Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/bin/ruby extconf.rb
*** 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/danielkehoe/.tokaido/Rubies/2.0.0-p195/bin/ruby
    --with-atomic_reference-dir
    --without-atomic_reference-dir
    --with-atomic_reference-include
    --without-atomic_reference-include=${atomic_reference-dir}/include
    --with-atomic_reference-lib
    --without-atomic_reference-lib=${atomic_reference-dir}/
/Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:431:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:516:in `try_link0'
    from /Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:814:in `try_run'
    from extconf.rb:24:in `<main>'


Gem files will remain installed in /Users/danielkehoe/.tokaido/Gems/gems/atomic-1.1.13 for inspection.
Results logged to /Users/danielkehoe/.tokaido/Gems/gems/atomic-1.1.13/ext/gem_make.out
Updating sass-rails
Building native extensions.  This could take a while...
ERROR:  Error installing sass-rails:
    ERROR: Failed to build gem native extension.

    /Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/bin/ruby extconf.rb
*** 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/danielkehoe/.tokaido/Rubies/2.0.0-p195/bin/ruby
    --with-atomic_reference-dir
    --without-atomic_reference-dir
    --with-atomic_reference-include
    --without-atomic_reference-include=${atomic_reference-dir}/include
    --with-atomic_reference-lib
    --without-atomic_reference-lib=${atomic_reference-dir}/
/Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:431:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:516:in `try_link0'
    from /Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/lib/ruby/2.0.0/mkmf.rb:814:in `try_run'
    from extconf.rb:24:in `<main>'


Gem files will remain installed in /Users/danielkehoe/.tokaido/Gems/gems/atomic-1.1.13 for inspection.
Results logged to /Users/danielkehoe/.tokaido/Gems/gems/atomic-1.1.13/ext/gem_make.out
Nothing to update

Here is the log file mkmf.log:

"/Users/danielkehoe/.tokaido/llvm-gcc/llvm-gcc-4.2 -o conftest 
-I/Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/include/ruby-2.0.0/x86_64-darwin12.3.0 -
I/Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/include/ruby-2.0.0/ruby/backward -
I/Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/include/ruby-2.0.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -
I/Users/wycats/.sm/pkg/active/include -pipe conftest.c  
-L. 
-L/Users/danielkehoe/.tokaido/Rubies/2.0.0-p195/lib 
-L. 
-Bstatic -L/Users/wycats/.sm/pkg/active/lib -fstack-protector 
-L/usr/local/lib   -arch x86_64   -lruby-static  -lpthread -ldl -lobjc "
i686-apple-darwin11-llvm-gcc-4.2: error trying to exec 'cc1': execvp: No such file or directory
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

Strange to see references to @wycats file system in the diagnostic output.

@wycats
tokaido member
wycats commented Aug 14, 2013

Did you try to restart Tokaido after installing GCC?

@DanielKehoe

Yes, restarted Tokaido after installing GCC.

@wycats
tokaido member
wycats commented Aug 15, 2013

That seems bad. I'll investigate what's causing this early next week.

@wycats wycats was assigned Aug 15, 2013
@mariochavez

@DanielKehoe did you found a way to overcome this issue?
I'm having the same trying to install ffi gem, I got the error: i686-apple-darwin11-llvm-gcc-4.2: error trying to exec 'cc1': execvp: No such file or directory

I'm using tokaido's first release, I don't have Xcode installed but I have latest commandline tools.

@DanielKehoe

@mariochavez sorry, I put aside Tokaido after trying it out.

@wycats
tokaido member
wycats commented Sep 27, 2013

I got blocked on some issues with CPU usage and haven't focused enough on Tokaido recently, but I should get back to it soon and I'll make sure to look into this issue again.

@mariochavez

@wycats that would be terrific at @crowdint I'm trying to use it for our Designers, I don't need complex solution like installing Ruby and everything else by hand. Tokaido could be a huge help.

@androbtech
tokaido member

@DanielKehoe @mariochavez We've released Tokaido 1.0

Please try it and let us know how it goes.

@androbtech androbtech closed this Apr 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.