On Mon, Apr 22, 2013 at 11:07:39AM +0200, "René J.V. Bertin" wrote: > I've been using MacPorts for years now, under 10.6 (which I'm still > running). To my knowledge it has always used Apple's gcc-42 for > building, and never attempted to install a duplicate copy of that > compiler. > I've installed XCode 4.2 *in parallel to my Xcode 3x* the other day, > and today MacPOrts insists on installing apple-gcc42.
Which version of MacPorts are you running? Do you use MacPorts trunk? What port are you trying to install when MacPorts attempts to install apple-gcc42? > What gives? Is this because Xcode 4.2 has been detected, and no effort > is done to check for the presence of gcc-42? If so, is there anything > I can edit/delete so that MacPorts doesn't detect Xcode 4.2? This might very well be the problem -- MacPorts base often only checks the Xcode version to find out which compilers are available and/or buggy. Since base doesn't currently support multiple Xcode versions simultanously, it probably ignores your Xcode 3.x completely. On Mon, Apr 22, 2013 at 12:29:37PM +0200, "René J.V. Bertin" wrote: > Probably related to my previous question: ports now also seems to > insist on using clang as its compiler, despite the fact that *once > more* I did > > port select --set gcc gcc42 No, this is unrelated. Changing your default /opt/local/bin/gcc using port select does *not* affect (and never has) which compiler MacPorts uses internally to build ports. Read http://trac.macports.org/wiki/UsingTheRightCompiler section "The problem with the default compiler" to find out why. > I already had to make /usr/bin/clang point to the 3.0 version that got > installed with Xcode 4 to get other projects to build, but now I find > that x264 fails to build. Changing /usr/bin/clang is a bad thing. This is Apple land. You shouldn't touch any files installed by Apple. If a project fails to build for you, set the $CC and $CXX environment variables or adjust $PATH so clang points to a different binary, but do not change /usr/bin/clang. If MacPorts ports fail to build using /usr/bin/clang on your system but MacPorts still attempts to use clang, that's a bug. This specific version of clang should probably be blacklisted for this port. File a bug. > Why is clang being favoured, and how do I force the use of gcc-4.2 ? Clang is always preferred, if available. Apple GCC 4.2 is dead software. It will even be removed in Xcode 4.7, so we're trying to build as much stuff as possible with clang in order to find and fix bugs. As said, if a port doesn't build for you with clang, that's a bug and you should file a ticket. You can force gcc-4.2 on a per-port base by appending configure.compiler=gcc-4.2 to the command line, but this is meant as a temporary solution to test whether the problem is the compiler. -- Clemens Lang _______________________________________________ macports-users mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-users
