Non-universal build of compiler ignored in universal build attempts of MPlayer

Ken Cunningham ken.cunningham.webuse at gmail.com
Mon Oct 22 14:21:22 UTC 2018


Welcome, and you're in the right place. MacPorts has considerable non-official support for PPC macs, and there are interested people here.

For compilers, there is no current version of clang/llvm that is of any use running on PPC. There is a little work going on to bring that support to PPC, at a hobbyist / snail's pace. The newer intel versions of clang/llvm can build semi-useful PPC code (with holes in support like va_args and c++ exceptions), but getting that working on 10.5 Intel is still a bit messy, as parts need to be built on 10.5 PPC and manually lipo'd in.

So gcc is the only game in town for reliable PPC code, and we have gcc versions 3 through 7 to use.

gcc up to 4.2 had Apple support, and therefore more Apple SDK and Objective-C support built in. If that works, it's your best bet, but it's old now and has no c++11 support.

gcc 4.8, 5, and 6 are the workhorses for c++11 support, esp gcc6.

For a 64 bit build, you need to have supporting software like libgcc also built 64 bit, ergo that is why they try to build +universal.

Best,

Ken



On 2018-10-22, at 4:25 AM, Christian Calderon wrote:

> Hello all! First time asking a question on the mailing list.
> 
> I have a Power Mac G5 Quad running OS X 10.5.8. My macports.conf contains "buildarch pcc" and "universal_archs ppc ppc64". My variants.conf contains the line "+universal".
> 
> I'm trying to build a universal MPlayer mostly to compare a ppc build and a ppc64 build to see if there are any performance differences. The main problem so far is that MPlayer depends on llvm-3.3, and that fails to build with ppc64 enabled. But to my understanding, llvm-3.3 is simply a backend for a compiler, and even a ppc build of llvm will be able to compile for a ppc64 target.
> 
> So I decided to install llvm-3.3 -universal, to make a ppc only build, with the assumption that that  should be good enough to then proceed with the MPlayer build. But when I try to build universal MPlayer again, it also tries to build llvm-3.3 as universal again.
> 
> So is there a way to build MPlayer (or any other ports) as a universal binary without having to build all the required compilers as universal binaries themselves? It shouldn't matter what arch the compiler is, as long as it supports compiling for the target architecture, right? As evidence, when I enter "llc-mp-3.3 --version" in the terminal, the result shows ppc64 in it's list of registered targets, even though llvm-3.3 was compiled for the ppc architecture. So it must not be the case that llvm-3.3 has to be compiled as universal in order to build a universal port.
> 
> Maybe if I build the other necessary compiler components, like gcc6, as ppc only builds first then MPlayer won't try to rebuild llvm-3.3 as universal?
> 
> Or does the MPlayer port file need to be changed in order to not force a universal build of the compilers it depends on?
> 
> Thanks,
>   Chris



More information about the macports-users mailing list