can't compile, "fatal error: mupdf/fitz.g and much other things
Git version. Any idea ?
mupdf.c: In function ‘doc_draw’: mupdf.c:22:8: error: too many arguments to function ‘fz_new_pixmap_from_page_number’ pix = fz_new_pixmap_from_page_number(doc->ctx, doc->pdf, p - 1, &ctm, fz_device_rgb(doc->ctx), 0); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/mupdf/fitz.h:58:0, from mupdf.c:3: /usr/include/mupdf/fitz/util.h:22:12: note: declared here fz_pixmap *fz_new_pixmap_from_page_number(fz_context *ctx, fz_document *doc, int number, const fz_matrix *ctm, fz_colorspace *cs); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mupdf.c:30:43: error: ‘fz_pixmap {aka struct fz_pixmap_s}’ has no member named ‘stride’; did you mean ‘storable’? unsigned char *s = &pix->samples[y * pix->stride]; ^~ Makefile:8 : la recette pour la cible « mupdf.o » a échouée make: *** [mupdf.o] Erreur 1
I get same errors:
cc -c -Wall -O2 -I./include mupdf.c
mupdf.c: In function ‘doc_draw’:
mupdf.c:22:8: warning: implicit declaration of function ‘fz_new_pixmap_from_page_number’ [-Wimplicit-function-declaration]
pix = fz_new_pixmap_from_page_number(doc->ctx, doc->pdf, p - 1, &ctm, fz_device_rgb(doc->ctx), 0);
^
mupdf.c:22:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
pix = fz_new_pixmap_from_page_number(doc->ctx, doc->pdf, p - 1, &ctm, fz_device_rgb(doc->ctx), 0);
^
mupdf.c:30:43: error: ‘fz_pixmap {aka struct fz_pixmap_s}’ has no member named ‘stride’
unsigned char *s = &pix->samples[y * pix->stride];
^
Makefile:8: recipe for target 'mupdf.o' failed
make: *** [mupdf.o] Error 1
Thirding, I have the same issue on ubuntu 18.
same issue in Ubuntu 18.04 :(
incompatible type for argument 1 of 'fz_scale' or too few arguments to function 'fz_scale'
I encountered the 'fz_scale' issue on Debian 9 which only comes much older version of muPdf. So given there was changes as marked for v1.14 I manually built from source. That resolved the 'fz_scale' issues but I now get /usr/bin/ld: cannot find -lmupdf-pkcs7 /usr/bin/ld: cannot find -lmupdf-threads
kalpha2 [email protected] wrote:
I encountered the 'fz_scale' issue on Debian 9 which only comes much older version of muPdf. So given there was changes as marked for v1.14 I manually built from source. That resolved the 'fz_scale' issues but I now get /usr/bin/ld: cannot find -lmupdf-pkcs7 /usr/bin/ld: cannot find -lmupdf-threads
Edit the Makefile and remove these options for the fbpdf target. Do you get any other linker errors?
Ali
then I get a lot of undefined refs, nothing flagged as error as such and final two lines are collect2: error: ld returned 1 exit status make: *** [fbpdf] Error 1 mybuild.txt
kalpha2 [email protected] wrote:
The options passed to the linker depend on the version of the mupdf library (try 'git whatchanged -p Makefile' to see previous versions of fbpdf's Makefile):
Add -lmupdfthird instead of -lmupdf-third. If that does not work, replace -lmupdfthird with -lmujs -lfreetype -ljbig2dec -ljpeg -lz -lopenjpeg.
Ali
think I started with snapshot download not git, could start over if think worth it? changing the links no joy. I tried in order you gave. I then changed -lopenjpeg to -lopenjp2 for this system but I'm stuck on lmujs not found.
do you recommend a particular version of mujs to use with fbpdf and what url would you recommend to get source for mujs from?
kalpha2 [email protected] wrote:
do you recommend a particular version of mujs to use with fbpdf and what url would you recommend to get source for mujs from?
mujs comes with mupdf itself. However, the library was removed (merged into -lmupdf) at some point after mupdf-1.4.
What is the version of mupdf library installed on your system?
Also note that, regardless of the version of mupdf installed on your system, you can compile its latest version and copy the resulting *.a files to the directory specified with linker'ss -L and copy the header files (include/mupdf) to the directory specified with compiler's -I.
Ali
I started with mupdf v1.9a as from Deb 9 Repos but got the fz_scale errors. So I went to the https://mupdf.com/ site and because fbpdf changelog had ref to v1.14 I pulled that source version and built according to the instructions. There is no --version so I can't check if the make install worked but given the fz_scale errors went away presume it did. I copied libfreeglut.a, libmupdf-pkcs7.a, libmupdf-third.a, and libmupdf~reads.a to fbpdf/lib/ and the contents of mupdf/include into the fbpdf/include folder but perceptible differnce on the make... maybe I have to tweak the makefile.
kalpha2 [email protected] wrote:
I started with mupdf v1.9a as from Deb 9 Repos but got the fz_scale errors. So I went to the https://mupdf.com/ site and because fbpdf changelog had ref to v1.14 I pulled that source version and built according to the instructions. There is no --version so I can't check if the make install worked but given the fz_scale errors went away presume it did. I copied libfreeglut.a, libmupdf-pkcs7.a, libmupdf-third.a, and libmupdf~reads.a to fbpdf/lib/ and the contents of mupdf/include into the fbpdf/include folder but perceptible differnce on the make... maybe I have to tweak the makefile.
Please revert your changes to the linker options in the Makefile and report any problem you encounter.
Ali
with the makefile reverted to original see attached. ends with collect2: error: ld returned 1 exit status make: *** [fbpdf] Error 1 mybuild2.txt
kalpha2 [email protected] wrote:
with the makefile reverted to original see attached. ends with collect2: error: ld returned 1 exit status make: *** [fbpdf] Error 1 mybuild2.txt
What does the following commands return?
$ ls lib/
$ nm lib/libmupdf.a | grep fz_hb_free
Ali
lib only had I only libfreeglut.a libmupdf-pkcs7.a libmupdf-third.a libmupdf-threads.a
so I copied libmupdf.a in there too
nm lib/libmupdf.a | grep fz_hb_free 0000000000000000 T fz_hb_free
now I get
cc -c -Wall -O2 -I./include djvulibre.c djvulibre.c:4:30: fatal error: libdjvu/ddjvuapi.h: No such file or directory #include <libdjvu/ddjvuapi.h> ^ compilation terminated. Makefile:8: recipe for target 'djvulibre.o' failed make: *** [djvulibre.o] Error 1
kalpha2 [email protected] wrote:
lib only had I only libfreeglut.a libmupdf-pkcs7.a libmupdf-third.a libmupdf-threads.a
so I copied libmupdf.a in there too
nm lib/libmupdf.a | grep fz_hb_free 0000000000000000 T fz_hb_free
Then I guess you are done. You can now use the fbpdf binary.
now I get
cc -c -Wall -O2 -I./include djvulibre.c djvulibre.c:4:30: fatal error: libdjvu/ddjvuapi.h: No such file or directory #include <libdjvu/ddjvuapi.h> ^ compilation terminated. Makefile:8: recipe for target 'djvulibre.o' failed make: *** [djvulibre.o] Error 1
This is for fbdjvu, for viewing Djvulibre files. You do not need it, if you want fbpdf only.
Ali
I've installed libdjvulibre-dev from deb repos so builds no errors. Now to test on unit with no X installed. thankyou