[oi-dev] Heads-Up: building with libjpeg is broken

Marcel Telka marcel at telka.sk
Mon Mar 4 08:46:59 UTC 2024


Hi,

If your installation is older than 2024-03-03 or you do not build using
libjpeg then you can safely skip this message.


If your system is up-to-date and you are building anything that requires
libjpeg then please be aware that under some circumstances your build
bits could be broken.

Simple test case showing the problem:


$ cat > jpeg.c <<EOF
#include <stdio.h>
#include <stddef.h>
#include <jpeglib.h>
#include <jerror.h>

int
main(void)
{
	struct jpeg_decompress_struct info;
	struct jpeg_error_mgr err;

	info.err = jpeg_std_error(&err);
	jpeg_create_decompress(&info);

	return 0;
}
EOF
$ gcc -Wall -ljpeg -ojpeg jpeg.c
$ ./jpeg 
Wrong JPEG library version: library is 62, caller expects 80
$ echo $?
1
$


If the above is tested on an older system, then the ./jpeg command
completes successfully.


Please note that this depends on how exactly you integrate support for
the libjpeg library, so it is possible that you are not affected.

It is not recommended to merge any PRs for oi-userland that could cause
rebuild of components depending on libjpeg (either ijg or turbo) until
this issue is solved.

Please also note that binaries built before 2024-03-03 that use libjpeg
are not affected.


Regards.

-- 
+-------------------------------------------+
| Marcel Telka   e-mail:   marcel at telka.sk  |
|                homepage: http://telka.sk/ |
+-------------------------------------------+



More information about the oi-dev mailing list