13

I recently upgraded to Lion and everything was fine. Even rebooted the machine a few time. Then over the weekend, Rails was gone! All of my gemsets were gone. I swear I don't know what happened. It WAS working just fine.

After looking closer, RVM itself was gone.

So, I reinstall RVM and try to install Ruby 1.9.2 and I get this error log:

[2011-08-08 14:30:41]  ./configure --prefix="/Users/cbmeeks/.rvm/usr"  
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking for gcc... /usr/bin/gcc-4.2
checking whether the C compiler works... no
configure: error: in `/Users/cbmeeks/.rvm/src/yaml-0.1.4':
configure: error: C compiler cannot create executables
See `config.log' for more details

It appears that gcc is gone? I'd prefer not to just start randomly reinstalling everything since all was working before.

Any ideas?

Thanks.

Tomasz Nurkiewicz
  • 334,321
  • 69
  • 703
  • 674
cbmeeks
  • 11,248
  • 22
  • 85
  • 136
  • 2
    I found this question while trying to trouble shoot installing Ruby 1.9.3 on OS 10.7.2 with XCode 4.2.1. Reinstalling didn't work, but this answer to another question did: http://stackoverflow.com/a/8032980/102401. Figured I'd post a related link here in case others ran into the same issue. – Alan W. Smith Dec 10 '11 at 19:07

8 Answers8

8

After you install Lion, you have to re-install Xcode/Developer tools. It is available from the app store.

http://itunes.apple.com/us/app/id448457090?mt=12

Mike L
  • 286
  • 1
  • 4
  • Friend of mine went through this very thing last week and installing xcode again did the trick. – jaydel Aug 08 '11 at 19:54
  • Yep. That did it. But I swear. I used RVM for 8+ days before this happened. But oh well. – cbmeeks Aug 17 '11 at 18:39
  • Note for xcode 4.3: there is no "Install XCode" app any more, just install from the App Store; install the Command Line Tools from the Downloads preferences pane; then I was able to successfully "rvm install 1.9.2" and "rvm install 1.9.3 --with-gcc=clang" – tardate Feb 20 '12 at 01:39
6

If you don't want to do a full XCode install, you might want to check out this project: https://github.com/kennethreitz/osx-gcc-installer

ezkl
  • 3,829
  • 23
  • 39
4

SUMMARY FOR STACK OVERFLOW

I was trying to install SiriProxy on a clean Lion installation on Xcode from App Store

I kept getting errors like : The provided CC(/usr/bin/gcc) is LLVM based.

bash-3.2$ rvm install 1.9.3
ERROR: The provided CC(/usr/bin/gcc) is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.


After 2 days finally got it working with these two lines:

http://stackoverflow.com/questions/8000145/ruby-rvm-llvm-and-mysql

bash-3.2$ rvm get head
bash-3.2$ CC=/usr/bin/gcc-4.2 rvm install 1.9.3 --enable-shared

Before that I had tried every stackoverflow article on Ruby and Lion so doing these may have done some setup that helped the above 2 steps work:

Things I tried included:

Running Install Xcode.app (I had downloaded from App Store - running this does futher installation)

Installing

https://github.com/kennethreitz/osx-gcc-installer/downloads may help for installing GCC.

Set up CC in

more /Users//.bash_profile

bash-3.2$ more /Users/<USERNAME>/.bash_profile 
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
export CC=/usr/share/TargetConfigs/bin/gcc

First line came from SiriProxy install instruction https://github.com/plamoni/SiriProxy

2nd line export CC never seemed to work. So dont add.

It had many versions each pointing I finally used CC=/usr/bin/gcc-4.2 rvm install 1.9.3 --enable-shared

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
brian.clear
  • 5,277
  • 2
  • 41
  • 62
3

For those using xCode 4.2.X you have to add

export CC=gcc

to your ~/.bash_profile.

xpepermint
  • 35,055
  • 30
  • 109
  • 163
  • Note that this may bring us one step closer to the solution (unclear so far, as I have not yet solved it), but doesn't actually solve the problem. The new error message is: `ERROR: The provided CC(gcc) is LLVM based, it is not yet fully supported by ruby and gems, please read 'rvm requirements'.` – Translunar Dec 23 '11 at 02:08
1

I solved this problem by installing the Command Line Tools in Xcode just as tardate suggested above. I had removed my old Xcode and installed the new version, but had not installed the Command Line Tools. I wanted to point this out because the tip from tardate was not easy to notice.

Larry Aasen
  • 394
  • 3
  • 12
1

Try running gcc from a terminal and see if that works?

The solution is probably to reinstall Xcode.

Nektarios
  • 10,173
  • 8
  • 63
  • 93
  • Ah. Good catch. That upsets me a little. I used to download XCode for free. Then PAID the $5 or whatever it was on Snow Leopard. Now, it's free again. Anyway, looks like I'm running version 3.x.x so I'm installing the newest version again. – cbmeeks Aug 08 '11 at 18:41
  • @cbmeeks - the $5 was because of Apple's strange accounting practices. Same reason that facetime was $0.99. It has to do with them not being able to add new features without charging or something ridiculously "bean-counter" like that. They've changed their accounting practices so that it will never happen again. Irritating. – Nektarios Aug 08 '11 at 19:06
  • Fine. Then change the accounting practice to give me a $5 credit in the app store. lol – cbmeeks Aug 17 '11 at 19:03
1

latest development version (rvm get head) will automatically use LLVM version of GCC (clang) for ruby 1.9.3-p125+

so you need to download https://github.com/kennethreitz/osx-gcc-installer only for older rubies.

Also be careful with mixing osx-gcc-installer with Xcode 4.2.1+ - compilation/header errors might occur.

mpapis
  • 52,729
  • 14
  • 121
  • 158
1

Stumbled on the same problem. Just did:

rvm get head

rvm reload

and then got

rvm install 1.9.3

to work!

This automatically gets p125 and compiles everything fine.

Community
  • 1
  • 1
ereze
  • 21
  • 4