I\'m seeing a very annoying bug that I don\'t really know how to deal with. It seems to be pretty common, and I\'ve tried nearly every solution that I could find to no avail. >
Same problem with pycrypto install failing to compile in a virtualenv. Found the solution in this thread by poster jiaaro: https://gist.github.com/3179227#gistcomment-379913
You need to install Xcode 4.4 (from the app store) and then, within xcode open Xcode > Preferences (or press Cmd + ,) then open the downloads tab and install the Command Line Tools.
On Mac OSx Mountain Lion 10.8 I had xCode 4.3 installed WITH the command line tools. I did the update to xCode 4.4 and it still didn't work. Xcode does not automatically download the new command line tools apparently even if you had them installed. As the post from jiaaro states, you have to explicitly download the command line tools again.
Current version of gcc is below and does successfully sudo pip install packages in virtualenv for me with no need to sym link.
gcc
i686-apple-darwin11-llvm-gcc-4.2