Why pip does not use gcc and g++ automatically? (Mountain Loin)
ryandesign at macports.org
Fri Oct 19 15:09:41 PDT 2012
On Oct 19, 2012, at 16:31, Peng Yu wrote:
> I have the following ports installed and I setup virtualenv correctly.
> sudo port -v install python27
> port select python python27
> sudo port install py27-pip
> sudo port install py27-virtualenv
> sudo port install py27-virtualenvwrapper
> But when I install a package within a virtual environment, I have to
> explicit specify the compiler as the following. Otherwise clang or
> clang++ will be used and the installation will yield error. Is it
> because macports was compiled by clang and clang++. Is there a way to
> that pip use g++/gcc as the default?
> CXX=g++ CC=gcc FFLAGS=-ff2c pip install scipy
There is *no* gcc in Xcode 4.2 and later. In those versions of Xcode, the programs "gcc" and "g++" are *not* gcc; they are symlinks to llvm-gcc-4.2 and llvm-g++-4.2.
If a port does not compile correctly with clang, that is a bug and you should file a bug report in our issue tracker. It wasn't clear to me from what you wrote above what MacPorts port was not compiling properly with clang. It sounded like maybe you were talking about software that you install manually, not using a port. If so, take the matter up with the developers of that software.
More information about the macports-users