Recently I updated my Mac's XCode and Command Line tools to version 6.4 (I'm running on OSX Yosemite 10.10.5). After I did that change, to install a new package with MacPorts, I was forced to run a "port selfupdate". However, after I did that, something broke in my system. Particularly, the usual port select gcc does not display the apple compilers installed with XCode. It only displays:
Available versions for gcc: mp-gcc48 none (active) I have to say that, trying to solve a compilation problem (that's how I found out the issue), I uninstalled one or two mp-gcc versions. However, I remember that the apple versions should have been listed there.
To make sure the apple compilers are installed: running the command xcode-select --install displays the following:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
and xcode-select -p displays the following:
/Applications/Xcode.app/Contents/Developer
So, the compilers are there. My ~/.profile file contains the following line:
MacPorts Installer addition on 2013-05-13_at_00:53:37: adding an appropriate PATH variable for use with MacPorts. export PATH=/opt/local/bin:/opt/local/sbin:$PAT But, indeed, that's the usual change made my MacPorts.
Does anyone knows what is happening? I need to work with the apple compiler without destroying the MacPorts environment.
Thanks in advance!
EDIT: thanks for the nice answers, so indeed none is the system's (xcode) installation for macport. For the record, I tried to select the macports gcc and then none, to see if there was a broken link and indeed this happened:
sudo port select gcc mp-gcc48 Selecting 'mp-gcc48' for 'gcc' failed: symlink: /opt/local/etc/select/gcc/current -> mp-gcc48: file already exists After I manually deleted /opt/local/etc/select/gcc/current, the port select gcc command worked well and setting sudo port select gcc none worked well after that.
CC=clangin yourMakefiles (or whatever), or explicitly using/usr/bin/clang.