Opened 3 years ago

Closed 3 years ago

#63259 closed defect (fixed)

libjpeg-turbo @2.1.0: incompatible cpu-subtype on Tiger/PPC

Reported by: evanmiller (Evan Miller) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: powerpc Cc: kencu (Ken), larryv (Lawrence Velázquez)
Port: libjpeg-turbo

Description

There appears to be an issue loading libjpeg.8.dylib from binaries and libraries on 10.4.11/PowerPC.

$ /opt/local/bin/jpegtran 
dyld: Library not loaded: /opt/local/lib/libjpeg.8.dylib
  Referenced from: /opt/local/bin/jpegtran
  Reason: no suitable image found.  Did find:
        /opt/local/lib/libjpeg.8.dylib: incompatible cpu-subtype
Trace/BPT trap

System info

$ uname -a
Darwin 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc

Change History (7)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: larryv added
Keywords: powerpc added
Port: libjpeg-turbo added; jpeg removed
Summary: jpeg @9d_1: incompatible cpu-subtype on Tiger/PPClibjpeg-turbo @2.1.0: incompatible cpu-subtype on Tiger/PPC

And what is the CPU subtype of /opt/local/lib/libjpeg.8.dylib and what is the specific model of processor that you have in your computer? Try running:

lipo -info /opt/local/lib/libjpeg.8.dylib
osascript -e 'system attribute "cput"'
osascript -e 'system attribute "cpuf"'

Note that /opt/local/lib/libjpeg.8.dylib is provided by the libjpeg-turbo port, not the jpeg port. (The jpeg port provides /opt/local/lib/libjpeg.9.dylib.)

It is possible that libjpeg-turbo is adding -arch flags for a specific newer PowerPC processor than the one you have; if so, we should fix that.

Last edited 3 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 3 years ago by evanmiller (Evan Miller)

The machine is a 700MHz G3. It looks like the dylib was built for G4.

$ lipo -info /opt/local/lib/libjpeg.8.dylib 
Non-fat file: /opt/local/lib/libjpeg.8.dylib is architecture: ppc7400
$ osascript -e 'system attribute "cput"'
264
$ osascript -e 'system attribute "cpuf"'
264

comment:3 Changed 3 years ago by kencu (Ken)

a lot of software will assume a 7400 as a minimum these days, as that is what Rosetta supported.. Very few are trying builds with G3's any more, so you might expect troubles.

The assembler is usually set to build for all ppc subtypes. I have tweaked many things for G4 and G5, like redoing the assembly in OpenBlas, but I'm not running MP on any of my G3s, so it's largely uncharted territory.

comment:4 Changed 3 years ago by evanmiller (Evan Miller)

Building libjpeg-turbo 2.1.0 from source, it looks like ppc7400 is built whenever WITH_SIMD=ON. So it looks like a bug in the library - but I think we can work around it by configuring with -DWITH_SIMD=0 on G3 in the Portfile.

comment:5 Changed 3 years ago by kencu (Ken)

good luck sorting that out! There are some Portfiles that query compiler features using sysconf...grep the repo for examples.

comment:6 Changed 3 years ago by evanmiller (Evan Miller)

comment:7 Changed 3 years ago by evanmiller (Evan Miller)

Resolution: fixed
Status: assignedclosed

In 85c0218de566aa9687275f6a9fa7df883cd6f6e9/macports-ports (master):

libjpeg-turbo: Support non-Altivec PowerPC

Closes: #63259

Note: See TracTickets for help on using tickets.