sstephenson/ruby-build — Issue #129: Build using Command Line Tools for Xcode errors with "please install GCC" 
Author: mbrictson
Created: 2012-02-17 00:49:07+00:00
State: open

According to @kennethreitz's [Xcode, GCC, and Homebrew](http://kennethreitz.com/xcode-gcc-and-homebrew.html) post, the new Command Line Tools for Xcode package from Apple replaces the [OSX-GCC-Installer](https://github.com/kennethreitz/osx-gcc-installer/) project.

And yet when I install Command Line Tools for Xcode and then try using ruby-build, I get an error telling me to install OSX-GCC-Installer. If Command Line Tools for Xcode really is a full replacement for OSX-GCC-Installer, shouldn't I be OK?

```

$ rbenv install 1.9.3-p125

ERROR: This package must be compiled with GCC, and we
couldn't find a suitable `gcc' binary on your system.
Please install GCC and try again.

As of version 4.2, Xcode is LLVM-only and no longer
includes GCC. You can install GCC with these binary
packages on Mac OS X:

https://github.com/kennethreitz/osx-gcc-installer/downloads

BUILD FAILED
```

For reference (just to be clear: I created the symlink; Apple installer did not create it):

```
$ ls -l /usr/bin/gcc-4.2
lrwxr-xr-x 1 root wheel 12B Feb 16 15:34 /usr/bin/gcc-4.2@ -> /usr/bin/gcc
```

```
$ gcc-4.2 --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```