Running Ruby 1.8.7 and 1.9.2, RVM 1.10.3, OS X 10.7.3 and Xcode 4.3

February 24th, 2012 by andy Leave a reply »

I recently updated to OS X 10.7.3 and RVM 1.10.3. The OS X update seems to have confused rvm by changing to a different compiler, resulting in ‘rvm install’ falling with this error:

The provided compiler ‘/usr/bin/gcc’ is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.

The solution that worked for me to install 1.8.7 was to tell rvm which compiler to use:

CC=/usr/bin/gcc-4.2 rvm install 1.8.7

This worked as expected.

However, trying to install 1.9.2 or above using the same method failed. So, i tried reinstalling Xcode, to no-avail. I then uninstalled Xcode devtools (sudo /Developer/Library/uninstall-devtools) and installed osx-gcc-installer. After this, i was able to install 1.9.2 using ‘CC=/usr/bin/gcc rvm install 1.9.2′, but it reported errors

Ruby ‘ruby-1.9.2-p290′ was build using clang – but it’s not (fully) supported, expect errors

Let’s see how well this works out. If i get errors, there must be a different compiler i can force rvm to use.

Well, the lack of Xcode devtools resulted in this error when Installing rmagick (2.13.1) with native extensions:

checking for stdint.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.

So, i re-installed devtools and tried again. Let’s see how well this works.

Update

1.9.2 is working fine, but 1.8.7 is raising this error:

~/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault

Time to investigate what’s going on here!

1. rvm uninstall 1.8.7 && CC=/usr/bin/gcc-4.2 rvm install 1.8.7

Same error: ~/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault

2. rvm uninstall 1.8.7 && CC=/usr/bin/gcc-4.2 rvm install ruby-1.8.7 –force

Same error: ~/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault

3. rvm install ree

Worked!

So, it seems that this setup requires ree

Advertisement

2 comments

  1. Idan says:

    sudo CC=/usr/bin/gcc-4.2 rvm reinstall 1.9.2

    Only worked for me.

  2. crankin says:

    Thanks man. Saved me tons of time.

Leave a Reply