Bug #4501

Bug #5076: Mac OS X Lion Support

1.9.2-p180 fails to compile on OSX 10.7

Added by wayneeseguin (Wayne E. Seguin) over 9 years ago. Updated about 9 years ago.

Target version:
ruby -v:
ruby 1.9.3dev (2011-03-14) [x86_64-darwin11.0.0]


I am receiving more inquiries into running Ruby on OSX 10.7 from developers, 1.8.7-p334 compiled fine however 1.9.2-p180 did not.

The following gist shows configure and make output,

At the bottom of the gist I have included build logs against the latest ruby-head which yield an error as well.

Help would be much appreciated.



Updated by wayneeseguin (Wayne E. Seguin) over 9 years ago

I am unsure if this is related however even on 1.8.7 which "compiled fine" when I try to install a gem from remote it segfaults:

gem install rake 
/Users/wayne/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/timeout.rb:60: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin11.0.0]

Abort trap: 6

Whereas installing the gem from local filesystem it succeeds

$ gem install -l ~/
Successfully installed rake-0.8.7
1 gem installed



Updated by baldwin (Stephen Baldwin) over 9 years ago

First, make sure you’ve installed XCode 4.1 DP 2 (you can download it through Apple if you are enrolled in their developer program)

Next, add the following to your ~/.bash_profile with your favorite editor
export CC=/Developer/usr/bin/clang
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
export PATH=/Developer/usr/bin:$PATH

Finally, run
$ rvm install 1.9.2 —reconfigure —debug -C —enable-pthread

Updated by naruse (Yui NARUSE) over 9 years ago

  • Status changed from Open to Feedback

Is this still reproducible?

Updated by naruse (Yui NARUSE) about 9 years ago

  • Parent task set to #5076
  • ruby -v changed from 1.9.2-p180 to ruby 1.9.3dev (2011-03-14) [x86_64-darwin11.0.0]

Updated by naruse (Yui NARUSE) about 9 years ago

  • Status changed from Feedback to Closed


Run rvm install -C --with-gcc-4.2


The clang which is bundled with Xcode 4.1/4.2 beta is bit old and doesn't support ruby.
So don't use it.
But current svn version of clang supports ruby.

Also available in: Atom PDF