Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.
➤ brew doctor

/Developer/usr/bin/gcc
/Developer/usr/bin/gcc
Your gcc 4.2.x version is older than the recommended version. It may be advisable
to upgrade to the latest release of Xcode.

We couldn't detect gcc 4.0.x. Some formulae require this compiler.

$GREP_OPTIONS was set to "--color=auto".
Having $GREP_OPTIONS set can cause CMake builds to fail.

Xcode 4.1 is installed, gcc -v:

➤ gcc -v

Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5664~89/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)

Any idea how to fix this?

share|improve this question

migrated from serverfault.com Jul 23 '11 at 15:36

This question came from our site for professional system and network administrators.

    
You could edit /usr/local/Library/Homebrew/global.rb and change 5664 to 5663 and try if it works anyway. On the other hand with Snow Leopard and XCode 4.0.1, I have got build 5666, which is a bit strange. –  Debilski Jul 23 '11 at 16:06

2 Answers 2

Until all the kinks get worked out, you'll want to track 10.7 and Xcode 4.x issues at https://github.com/mxcl/homebrew/issues

In this case, be sure you actively manage your $PATH variable to keep your preferred versions of redundant apps first in the expansion.

Always hard coding full paths is tedious, but lack of it causes these bumps when new binaries show up in your path unexpectedly.

share|improve this answer
    
Also - meta - how do we get the server fault mods to send these sort of questions to stack exchange where general programming on macs is more on-topic? (or do our mods just bump it again?) –  bmike Jul 23 '11 at 16:03

Just a hunch, did you run the xcode installer? When installing xcode from the App Store it only installs a xcode installer. You must run the installer to install xcode.

I only ask because it isn't exactly obvious.

The default gcc now uses LLVM. The output of gcc should look something like:


gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
share|improve this answer
    
Ah, this answer about forgetting the installer step for Xcode actually solve another problem for me as well. opendiff had stopped working for me because it wasn't linked into /usr/bin/ and I did a symlink to fix that problem. I was encountering this after upgrading to Mac OS X 10.7 Lion. Under 10.6, I had a previous version of Xcode installed. Getting Xcode 4 properly installed is a better solution, of course. –  mcginniwa Dec 11 '11 at 1:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.