We’ve received some reports about users being unable to install Ruby Enterprise Edition on OS X Lion. Apparently the compilation process segfaults. It turns out that OS X Lion has switched to llvm-gcc as the default compiler. We currently suspect that the segfaults are caused by incompatibility between llvm-gcc’s code generation and the MBARI patch set (similar problems have been seen in the past but with other compilers on other platforms).
To install Ruby Enterprise Edition on Lion one needs to force the compiler to plain GCC instead of llvm-gcc. This can be done by setting the environment variable
/usr/bin/gcc-4.2. For example:
$ sudo bash # export CC=/usr/bin/gcc-4.2 # ./installer
Or, when using RVM (from Stack Overflow):
$ rvm remove ree $ export CC=/usr/bin/gcc-4.2 $ rvm install --force ree