MacPorts wants to install apple-gcc42 on 10.6 all of a sudden?

Ryan Schmidt ryandesign at macports.org
Tue Apr 23 13:36:27 PDT 2013


On Apr 23, 2013, at 08:46, René J.V. Bertin wrote:

> I must admit I hadn't thought about universal build implications of choosing a non-Apple compiler. Curiously, the first port of which I installed a universal variant was ffmpeg, and that package cannot (easily) be built as universal by simply specifying the desired architectures. I've presumed that Macports followed the same approach as Xcode, i.e. build each architecture in parallel and then pull in (lipo) the resulting binaries. More cumbersome, but if the build engine allows to do this it does have advantages (finer control over compiler options). And of course it works with any compiler that supports the desired architectures!

Usually, if you ask MacPorts to build a port universal, it does so by supplying multiple -arch flags simultaneously, e.g. "-arch i386 -arch x86_64". Usually this works fine. For specific ports where this does not work, the port maintainer can switch to the muniversal portgroup which will build for each arch separately and then lipo together the results. ffmpeg is an example of a port that uses the muniversal portgroup. Using the muniversal portgroup has some advantages and also several disadvantages; it is not a cure-all.


> Out of curiosity: is gcc-4.2 the last compiler for which Apple made it possible to build it on systems where you cannot obtain the binaries directly from Apple? If so, are there any plans to provide ports of those compilers (supposing there's any interest to that ... introducing features like ARC which aren't supported by the runtime isn't particularly useful …)

gcc 4.2.1 (with Apple's modifications to support -arch flags, as previous Apple gcc releases have as well) is the last version of gcc Apple has or will include in Xcode, based on currently available information. Apple removed all versions of gcc from Xcode starting with Xcode 4.2, leaving only llvm-gcc and clang. Starting with Xcode 4.7, there will be only clang. Apple is clearly focusing on clang, so MacPorts is as well. However we also still have ports for both FSF and Apple versions of gcc, and llvm-gcc, and these are available to users to use as needed, and for individual ports to use.



More information about the macports-users mailing list