Am 01.01.22 um 13:16 schrieb s...@pandora.be:
Sorry I meant /usr/include/jpeglib.h ...
Sorry, I was too quick with my answer to your original mail.

Anyway this file points to the libjpeg6-ijg implementation.

I'd recommend for anyone testing libjpeg8-turbo to temporarily remove 
/usr/include/jpeglib.h,
so to be 100% sure that somehow /usr/include/jpeglib.h is not included.

The sizeof of struct jpeg_decompress_struct and struct jpeg_compress_struct are 
different,
between the JPEG_IMPLEMEN leading to hard to track allocation failures.

In the case of Squeak there is a Smalltalk primitive that returns the sizeof 
the underlying C structs,
and this must be correct obviously when changing from e.g. libjpeg6-ijg to 
libjpeg9-ijg or libjpeg8-turbo.
Some packages can be configured to use an explicit path, eg.
CONFIGURE_OPTIONS     += --with-jpeg-dir=/usr/include/libjpeg8-turbo

Andreas
David Stes

----- Op 1 jan 2022 om 12:20 schreef stes s...@telenet.be:

I have meanwhile found out what the problem was with Squeak and libjpeg9-ijg and
libjpeg8-turbo.

Basically this is Squeak and OpenIndiana specific.

The header file

   /usr/include/libjpeg.h

is a link to libjpeg6-ijg and that is why it only worked with libjpeg6-ijg.

I have in my Makefile for Squeak , CPPFLAGS set to add -I flag for the correct
JPEG_IMPLEMEN include directory,
but the Squeak configure script ignores or does not respect the CPPFLAGS, and
setting the -I flag in the CFLAGS,
fixes the issue.

It's important to use the right libjpeg.h header file.

The C struct size is different for some structs's like jpegcompress or
jpegdecompress
and these sizes differ between libjpeg6-ijg, libjpeg8-turbo and libjpeg9-ijg.

As soon as the right #include is used, Squeak links and opens JPEG files using
libjpeg8-turbo and libjpeg9-ijg as well.

To debug this, it helped to

   rm /usr/include/libjpeg.h

Perhaps there could also be a IPS mediator to select which libjpeg
implementation is to be used.

Regards,
David Stes
_______________________________________________
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev

_______________________________________________
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev

Reply via email to