[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: jpeg-turbo 6.2 and ppc G3



On Mon, Jul 4, 2016 at 6:45 PM, Lennart Sorensen
<lsorense@csclub.uwaterloo.ca> wrote:
> On Sat, Jul 02, 2016 at 08:57:56AM +0200, Riccardo Mottola wrote:
>> Hi,
>>
>> any of you still running G3 or anyway a non-altivec computer?
>>
>> I noticed that using GS applications (compiled from source, not debian
>> packages) I am unable to open JPEG files, I get an Illegal instruction.
>>
>> (gdb) bt
>> #0  0x0d243b68 in ?? () from /usr/lib/powerpc-linux-gnu/libjpeg.so.62
>> #1  0x0d243b40 in ?? () from /usr/lib/powerpc-linux-gnu/libjpeg.so.62
>> #2  0x0d23a3c4 in ?? () from /usr/lib/powerpc-linux-gnu/libjpeg.so.62
>> #3  0x0d21c550 in ?? () from /usr/lib/powerpc-linux-gnu/libjpeg.so.62
>> #4  0x0d2220a0 in ?? () from /usr/lib/powerpc-linux-gnu/libjpeg.so.62
>> #5  0x0d21a6bc in jpeg_read_scanlines () from
>> /usr/lib/powerpc-linux-gnu/libjpeg.so.62
>> #6  0x0fbbae30 in -[NSBitmapImageRep(JPEGReading)
>> _initBitmapFromJPEG:errorMessage:] (self=0x1040fe78, _cmd=<optimized out>,
>>     imageData=0x1028e678, errorMsg=0x0) at NSBitmapImageRep+JPEG.m:462
>> #7  0x0fbb3cfc in +[NSBitmapImageRep imageRepsWithData:] (self=<optimized
>> out>, _cmd=<optimized out>, imageData=0x1028e678)
>>     at NSBitmapImageRep.m:223
>>
>> The GS code is quite well tested on many platforms and hasn't chaged
>> recently, so I want to be reassured that jpegturbo works also on PPC without
>> altivec or anyway works.
>
> I would think libjpeg-turbo-progs would have something small in it you
> could test with.
>
>> I what test program could I use? I noticed that e.g. Firefox (which works)
>> is not linked against it.
>
> You could try forcing altivec off in libjpegturbo by setting the environment:
>
> export JSIMD_FORCENONE=1

Neat !

> If that helps, then something is wrong with the runtime detection code.
> It appears it is supposed to detect if the CPU supports altivec at
> runtime and only use it if it is there.

Could be using: __builtin_cpu_supports (see https://bugs.debian.org/826987)

-M


Reply to: