Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

GCC error on Lion 10.7.2 and XCode 4.2 fresh install #62

Closed
wsouto opened this Issue Oct 14, 2011 · 7 comments

Comments

Projects
None yet
7 participants

wsouto commented Oct 14, 2011

Seems that latest XCode 4.2 don't install (non-llvm) gcc-4.2 anymore.

$ ls -l /usr/bin | grep gcc

lrwxr-xr-x    1 wsouto  wheel    12B 14 Out 17:55 cc -> llvm-gcc-4.2
lrwxr-xr-x    1 wsouto  wheel    12B 14 Out 17:55 gcc -> llvm-gcc-4.2
lrwxr-xr-x    1 wsouto  admin    52B 14 Out 17:55 i686-apple-darwin11-llvm-g++-4.2 -> ../llvm-gcc-4.2/bin/i686-apple-darwin11llvm-g++-4.2
lrwxr-xr-x    1 wsouto  admin    52B 14 Out 17:55 i686-apple-darwin11-llvm-gcc-4.2 -> ../llvm-gcc-4.2/bin/i686-apple-darwin11-llvm-gcc-4.2
lrwxr-xr-x    1 wsouto  admin    32B 14 Out 17:55 llvm-cpp-4.2 -> ../llvm-gcc-4.2/bin/llvm-cpp-4.2
lrwxr-xr-x    1 wsouto  admin    32B 14 Out 17:55 llvm-g++ -> ../llvm-gcc-4.2/bin/llvm-g++-4.2
lrwxr-xr-x    1 wsouto  admin    32B 14 Out 17:55 llvm-g++-4.2 -> ../llvm-gcc-4.2/bin/llvm-g++-4.2
lrwxr-xr-x    1 wsouto  admin    32B 14 Out 17:55 llvm-gcc -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
lrwxr-xr-x    1 wsouto  admin    32B 14 Out 17:55 llvm-gcc-4.2 -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2

Installing the osx-gcc-installer solves the problem for now.

This info might be useful for someone...

Thanks, this helps me a lot. Installing REE with ruby-build fails on latest Lion (with Xcode 4.2 4D199). But after installing the pre-built gcc binaries it works fine.

Same issue here - fixed with the osx-gcc-installer (working link).

Is there a way of building REE without this?

Collaborator

sstephenson commented Oct 21, 2011

I'm afraid there isn't anything we can do about this except warn people that they now need to install GCC separately. I added such a warning yesterday: https://github.com/sstephenson/ruby-build/blob/102810d9938a6f302a3efdaaddef38c4021169bd/bin/ruby-build#L183-202

khelben commented Oct 29, 2011

I think I've got it fixed.

The trick is to first install Xcode 4.1 and then upgrade to Xcode 4.2.

More details can be found here: https://gist.github.com/1324955

Please let me know how this works out for you.

wsouto commented Oct 31, 2011

Got this from http://svn.ruby-lang.org/repos/ruby/tags/v1_9_3_0/NEWS :

=== Known platform dependent issues
==== OS X Lion

  • You have to configure ruby with '--with-gcc=gcc-4.2' if you're using
    Xcode 4.1, or, if you're using Xcode 4.2, you have to configure ruby
    with '--with-gcc=clang'.

So there is no need to install osx-gcc-installer for who already have XCode 4.2 but, I think the gcc detection will need to change again...

prathe commented Nov 4, 2011

Thanks @wsouto, it worked!

rknLA commented Jan 18, 2012

Note that using --with-gcc=clang breaks Fiber, which, in turn, breaks YARD. (See footnote here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment