mxcl/homebrew — Issue #8878: Brew doctor (xcode 4.2) gives bad advice
Author: zencuke
Created: 2011-11-29 22:06:06+00:00
State: open

Several comments:

1) The new gcc message is a slight improvement over the previous untrue message about the absolute latest release of xcode 4.2 being out of date but would be better if there was the slightest hint about what a brew end user is supposed to do about it. The fact that xcode 4.2 is the culprit would be a useful start.

2) So many things are failing with xcode 4.2 (I can't even 'brew install gist' to help report all the bugs) that there really should be warning about xcode 4.2 somewhere in the brew installation doc. I recently bought a new Mac with Lion installed, downloaded xCode from the App store then heard about homebrew as a convenient replacement for MacPorts. I immediately downloaded it and have had nothing but trouble since, first with MacPorts then with llvm. Because there was no warning my first reaction (and likely the reaction of others in my situation) was that brew was an overhyped piece of garbage. Clearly Apple is the actual bad guy in this scenario but it was hard work figuring that out.

3) When giving an alarming message like "Unless you know..." the fix advice should work. Now brew doctior is warning me about something I have no clue how to fix. See log below. By the way I have never touched the homebrew core or git directly so I have no idea why I get this warning.

bash-3.2$ brew doctor
We couldn't detect gcc 4.2.x. Some formulae require this compiler.

==> You have uncommitted modifications to Homebrew's core.
Unless you know what you are doing, you should: git reset --hard

bash-3.2$ git reset --hard
fatal: Failed to resolve 'HEAD' as a valid ref.
bash-3.2$