public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* libffi 3.2.1 built on a PowerPC G3 Mac builds for a PowerPC G4 and therefore does not work
@ 2015-09-14  3:46 Ryan Schmidt
  0 siblings, 0 replies; only message in thread
From: Ryan Schmidt @ 2015-09-14  3:46 UTC (permalink / raw)
  To: libffi-discuss

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-14  3:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-14  3:46 libffi 3.2.1 built on a PowerPC G3 Mac builds for a PowerPC G4 and therefore does not work Ryan Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).