public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Ryan Schmidt <libffi-2015@ryandesign.com>
To: libffi-discuss@sourceware.org
Subject: libffi 3.2.1 built on a PowerPC G3 Mac builds for a PowerPC G4 and therefore does not work
Date: Mon, 14 Sep 2015 03:46:00 -0000	[thread overview]
Message-ID: <9BA7E517-FFB6-4A1C-B1F1-BA820D6CA9D3@ryandesign.com> (raw)

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.

                 reply	other threads:[~2015-09-14  3:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9BA7E517-FFB6-4A1C-B1F1-BA820D6CA9D3@ryandesign.com \
    --to=libffi-2015@ryandesign.com \
    --cc=libffi-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).