

If you encounter a port which triggers this errorīut you don't want to fix it immediately, Sudo cp -R no_default_gcc /opt/local/bin/ The above script will be found instead of the actual program Now anytime a port tries to use one of these unversioned programs,

It does this by specifying the desired compiler's complete path in the CC environment variableįor example, with Xcode 4.2 and later, CC is set to " /usr/bin/clang" MacPorts arranges for ports to compile by default using the same compiler that the installed version of Xcode would use,Īnd does not use the unpredictable " cc" or " gcc" symlinks. To remove this testing burden from maintainers,Īnd to prevent users from running into unanticipated problems, Most port authors will not have used " port select -set gcc $value"Īnd will therefore have the usual default version of gcc on their machine,Īnd will not have tested to see what happens if a different gcc is selected. So we cannot rely on " cc" oc " gcc" being any particular compiler. Users might also have created a " /opt/local/bin/gcc" symlink, pointing to any installed compiler, by using " port select -set gcc".

If not instructed otherwise, most software builds C code using " cc" or " gcc".īut " /usr/bin/cc" and " /usr/bin/gcc" are not specific compilers they're symlinks to some suitable default compiler, but it varies based on Xcode version. The Xcode 4.6 release notes state that it is the last version of Xcode that will include llvm-gcc-4.2, which will leave only clang. With Xcode 4.2 or later, clang is the default and gcc is no longer included. With Xcode 4.0 and 4.1 on OS X 10.6 or 10.7, llvm-gcc-4.2 is the default. With Xcode 3.2 on OS X 10.6, llvm-gcc-4.2 and clang are also available gcc 4.2 is the default.

With Xcode 3.1 on OS X 10.5, gcc 4.2 is also available. With Xcode 2.5 on OS X 10.4, gcc 3.3 and 4.0 are available, with 4.0 being the default. Much of the software in MacPorts is built using a C or C++ compiler,Īnd the various versions of Xcode for OS X come with different compiler suites and versions.
