Why am I having trouble compiling Ruby 1.9.2 with RVM on Mac OS Lion?

657 Views Asked by At

I am having trouble installing Ruby 1.9.2 with rvm on Mac OS Lion.

It gets stuck in the compilation stage; I don't see any errors or output, but it will be stuck at the compilation message for hours upon hours. The miniruby process is still running and using quite a bit of CPU, but it just never finishes.

The only thing I can find in the logs is this message in the make.log:

<internal:prelude>:1: [BUG] Segmentation fault

Any ideas how I can get this to compile?

3

There are 3 best solutions below

0
On

It may be related to Lion trying to use llvm to compile instead of gcc. Try running the command like this CC=/usr/bin/gcc-4.2 rvm install 1.9.2 to use gcc.

Based on the information in this other answer: Why can't I install Rails on Lion using RVM?

0
On

What version of xcode are you using?

rvm requirements has this little tidbit:

** Lion Users: Xcode Version 4.2.x for OS X Lion works only for ruby 1.9.3-p0 (or higher).
               It currently fails to build several other rubies and gems, as well as several Homebrew and
               Macports packages. Xcode Version 4.1 (4B110) works.

Xcode v4.1 is at: https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.1_for_lion/xcode_4.1_for_lion.dmg

It's also important to make sure your RVM is current. Run rvm get head to upgrade to the latest version.

0
On

First read the installation notes of rvm, Follow the link which helped me RVM on Mac