Control: severity -1 important

Hi Reiner,

Quoting Reiner Herrmann (2019-06-08 13:33:52)
> > $ gcc -I/usr/include/freetype2 -I/usr/include/libpng16 -lmupdf -ljbig2dec 
> > -ljpeg -lz -lm -lfreetype -lpng16 -lm -lz -lm -lz test.c
> > /usr/bin/ld: /tmp/ccCPwEIx.o: in function `main':
> > test.c:(.text+0x26): undefined reference to `fz_new_context_imp'
> > collect2: error: ld returned 1 exit status
> 
> When you put the libraries at the end (after the input file), it will proceed 
> further:
> 
> > $ gcc -I/usr/include/freetype2 -I/usr/include/libpng16 test.c -lmupdf 
> > -ljbig2dec -ljpeg -lz -lm -lfreetype -lpng16 -lm -lz -lm -lz
> > /usr/bin/ld: 
> > /usr/lib/gcc/x86_64-linux-gnu/8/../../../../lib/libmupdf.a(load-jpx.o): in 
> > function `jpx_read_image':
> > (.text.jpx_read_image+0x79): undefined reference to 
> > `opj_set_default_decoder_parameters'
> > /usr/bin/ld: (.text.jpx_read_image+0x95): undefined reference to 
> > `opj_create_decompress'
> > /usr/bin/ld: (.text.jpx_read_image+0xaf): undefined reference to 
> > `opj_set_info_handler'
> > /usr/bin/ld: (.text.jpx_read_image+0xc1): undefined reference to 
> > `opj_set_warning_handler'
> 
> But then it is really missing the opj/openjpeg symbols, so -lopenjpeg is
> actually required.
> openjpeg has been removed from Debian in 2016, as there is now
> openjpeg2 (-lopenjp2). After linking with openjpeg2 there are one
> undefined js_* symbols remaining, which seems to be coming from mupdf
> itself (according to codesearch.d.n).

the test program compiles like this:

gcc -I/usr/include/freetype2 -I/usr/include/libpng16 test.c -lmupdf -ljbig2dec 
-ljpeg -lz -lm -lfreetype -lpng16 -lm -lz -lm -lz -lmupdf-third -lopenjp2

So if you also add mupdf-third and openjp2, then it works.

I reduced the severity of the bug because apparently the static library does
work. Just the pkg-config file outputs wrong values.

It would be nice if the pkg-config file could be fixed to output the correct
information for compiling and linking.

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to