This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
libffi 3.2.1 built on a PowerPC G3 Mac builds for a PowerPC G4 and therefore does not work
- From: Ryan Schmidt <libffi-2015 at ryandesign dot com>
- To: libffi-discuss at sourceware dot org
- Date: Sun, 13 Sep 2015 22:46:36 -0500
- Subject: libffi 3.2.1 built on a PowerPC G3 Mac builds for a PowerPC G4 and therefore does not work
- Authentication-results: sourceware.org; auth=none
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.