libffi 3.2.1 built on a PowerPC G3 Mac builds for a PowerPC G4 and therefore does not work
Ryan Schmidt
libffi-2015@ryandesign.com
Mon Sep 14 03:46:00 GMT 2015
Hello, I'm writing on behalf of the MacPorts package management system, where a number of our users who are using older Macs using the PowerPC G3 processor have noticed the following problem:
When built on a PowerPC G3, libffi 3.2.1 builds itself in such a way that it requires a PowerPC G4 processor (specifically: it builds itself for architecture "ppc7400" instead of "ppc"), and therefore it cannot actually be used on a G3. The error you see is something like:
Library not loaded: /opt/local/lib/libffi.6.dylib
Referenced from: /opt/local/lib/libgio-2.0.0.dylib
Reason: no suitable image found. Did find:
/opt/local/lib/libffi.6.dylib: incompatible cpu-subtype
(replacing "/opt/local/lib/libgio-2.0.0.dylib" with whatever program or library is linked with libffi)
When inspecting those two files with the "lipo" program, we see that libffi has been built for "ppc7400" (i.e. a G4 or newer) while the other program or library was correctly built for just "ppc" (G3 or newer).
$ lipo -info /opt/local/lib/libffi.6.dylib /opt/local/lib/libgio-2.0.0.dylib
Non-fat file: /opt/local/lib/libffi.6.dylib is architecture: ppc7400
Non-fat file: /opt/local/lib/libgio-2.0.0.dylib is architecture: ppc
Here is the ticket under which we are tracking this problem:
https://trac.macports.org/ticket/47085
The use of ppc7400 appears to have been deliberate since it is explicitly listed in the files src/powerpc/darwin.S and src/powerpc/darwin_closure.S. The question is why, and if and how it can be changed to work on a G3 again.
Thanks.
More information about the Libffi-discuss
mailing list