Package: libmupdf-dev
Version: 1.14.0+ds1-4
Severity: grave
Justification: renders package unusable
Hi,
it does not seem to be possible to use the static library from
libmupdf-dev at all.
Consider the following minimal test case:
#include "mupdf/fitz.h"
#include "mupdf/pdf.h"
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char **argv)
{
fz_context *ctx;
ctx = fz_new_context(NULL, NULL, FZ_STORE_UNLIMITED);
if (!ctx)
{
fprintf(stderr, "cannot initialise context\n");
exit(1);
}
return 0;
}
Lets compile it:
$ gcc $(pkg-config --cflags --libs --static mupdf) test.c -o out
/usr/bin/ld: cannot find -lopenjpeg
collect2: error: ld returned 1 exit status
So one bug that should be fixed is that the supplied pkg-config file
isn't working. This should be fixed but is not the RC bug I'm reporting
here. Lets try to pass the options manually:
$ 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
So it seems the shipped static library is useless? I hope I'm wrong and
made a silly mistake.
Thanks!
cheers, josch