Sorry I meant /usr/include/jpeglib.h ...
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. David Stes ----- Op 1 jan 2022 om 12:20 schreef stes [email protected]: > 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 [email protected] https://openindiana.org/mailman/listinfo/oi-dev
