Help trying to get gcc47 to run on ppc32/Tiger.

Ryan Schmidt ryandesign at
Thu Jun 28 21:10:19 PDT 2012

On Jun 28, 2012, at 22:11, Daryle Walker wrote:

> On Jun 24, 2012, at 2:41 PM, Jeremy Huddleston Sequoia wrote:
>> If I recall, the patch is actually applied already to gcc's libffi.  You need to check yourself to figure out what's going wrong.
> I'm trying to figure stuff out; that's why I'm asking for help here.  I'm just a port user, and now I'm suddenly have to be a port maintainer.
> There is a MacPort for libffi, but the GCC port doesn't reference it, right?  GCC uses a copy of libffi in its own sources, right?

I don't know. I do know that the gcc47 port depends on ld64, which depends on llvm-3.0, which depends on libffi.

> When a port has to be built from source, a copy of that source will be on my disk, right?  How/where can I check if it's still around?

The distfile will be in the file(s) identified by the command:

port distfiles gcc47

If a port build failed, or if a port build succeeded but you used the -k flag, then the unpacked / possibly patched / partially built (or completely built) source tree will be in the directory identified by the command:

port work gcc47

>> You'll probably get more support on this configuration from GCC developers directly.  I suggest you file a bug report at
> Right now, I don't know what to tell them.  How different is the MacPorts' version of the source from the official version; they might not want to debug something too modified?

There aren't any "patchfiles" listed in the gcc47 portfile, so it's using the unmodified upstream sources.

>>> (At least we should require (Apple's?) CLang to compile GCC-4.6 when it's available, and Apple's GCC 4.2 otherwise.  Never use the LLVM-GCC 4.2, and install Apple GCC 4.2 when the computer doesn't come with it.  I also wrote in GCC 4.7 to use Apple's GCC 4.2 for compilation.)
>> That should have nothing to do with it.
>>> (In the worst case, since we did have earlier versions of GCC 4.7 working on my computer, is there any way I can get that old version back?)
>> I'd be interested to know how you got that old version to compile, given this bug.  What changed to cause it to fail?  My suspicion is that you have a newer cctools installed from MacPorts which is noticing this bug whereas older cctools let it slip through to become a runtime issue.
> I don't know what change happened.  Here's some quick run results:
> //=====
> [daryle]$ port installed gcc47
> The following ports are currently installed:
>   gcc47 @4.7.0_2 (active)
> [daryle]$ g++-mp-4.7 --version
> g++-mp-4.7 (GCC) 4.7.0
> Copyright (C) 2012 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO

For the record, I also have this gcc47 installed on my Power Mac G4, and I also cannot upgrade because the port has subsequently been marked as Intel-only.

> [daryle]$ g++-mp-4.7 hello.cpp
> dyld: Library not loaded: /opt/local/lib/libppl.9.dylib
>   Referenced from: /opt/local/libexec/gcc/ppc-apple-darwin8/4.7.0/cc1plus
>   Reason: image not found
> g++-mp-4.7: internal compiler error: Trace/BPT trap (program cc1plus)
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <> for instructions.
> [daryle]$ 
> //=====

This means your gcc47 was built against a version of ppl that provided libppl version 9, but the version of ppl you have installed now no longer provides that library version. (The current version of ppl provides libppl version 11.) gcc47 needs to be rebuilt against the new version of ppl, or the old version of ppl needs to be reinstalled; see:

> My current version is based on previous efforts with the maintainers to make gcc47 work with PowerPC systems.  Any updates have failed, but something else successfully changed to make LibPPL missing.  I think that library is part of LibFFI; but I couldn't update LibPPL.  (MacPorts kept wanting to fix gcc47 first.)  Could I somehow force LibPPL to be installed, without doing a gcc47 check?  Would that help, since gcc47 seems to use a private LibFFI anyway?

libppl is part of the ppl port. It does not depend on gcc47 (nor could it since that would be a circular dependency which is not allowed in MacPorts).

> (BTW, the maintainers "fixed" the problem by killing PowerPC builds.  I have to hack the Portfile to do any testing.)

Actually that was Jeremy who committed that change, not the maintainer Mark.

More information about the macports-dev mailing list