Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on Ubuntu 22.04 #13

Open
k557osuman opened this issue Aug 7, 2024 · 2 comments
Open

Build fails on Ubuntu 22.04 #13

k557osuman opened this issue Aug 7, 2024 · 2 comments

Comments

@k557osuman
Copy link

build fails when compiling, pls help

link.o
./link.c: In function ‘docinfo’:
./link.c:367:11: error: ‘FZ_META_INFO_CREATIONDATE’ undeclared (first use in this function); did you mean ‘FZ_META_INFO_CREATOR’?
  367 |         { FZ_META_INFO_CREATIONDATE, "Creation date" },
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~
      |           FZ_META_INFO_CREATOR
./link.c:367:11: note: each undeclared identifier is reported only once for each function it appears in
./link.c:368:11: error: ‘FZ_META_INFO_MODIFICATIONDATE’ undeclared (first use in this function)
  368 |         { FZ_META_INFO_MODIFICATIONDATE, "Modification date"},
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./link.c: In function ‘initpdims1’:
./link.c:609:42: error: ‘pdf_document’ has no member named ‘map_page_count’; did you mean ‘rev_page_count’?
  609 |                 for (int i = 0; i < pdf->map_page_count; ++i) {
      |                                          ^~~~~~~~~~~~~~
      |                                          rev_page_count
./link.c: In function ‘recurse_outline’:
./link.c:967:58: error: incompatible type for argument 3 of ‘fz_page_number_from_location’
  967 |                                                   outline->page)
      |                                                   ~~~~~~~^~~~~~
      |                                                          |
      |                                                          int
In file included from /usr/include/mupdf/fitz/structured-text.h:33,
                 from /usr/include/mupdf/fitz.h:70,
                 from ./link.c:43:
/usr/include/mupdf/fitz/document.h:568:81: note: expected ‘fz_location’ but argument is of type ‘int’
  568 | int fz_page_number_from_location(fz_context *ctx, fz_document *doc, fz_location loc);
      |                                                                     ~~~~~~~~~~~~^~~
./link.c: In function ‘ml_getfileannot’:
./link.c:2562:5: error: unknown type name ‘pdf_embedded_file_params’
 2562 |     pdf_embedded_file_params file_params;
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
./link.c:2563:5: warning: implicit declaration of function ‘pdf_get_embedded_file_params’; did you mean ‘pdf_embedded_file_name’? [-Wimplicit-function-declaration]
 2563 |     pdf_get_embedded_file_params (state.ctx, fs, &file_params);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |     pdf_embedded_file_name
./link.c:2564:42: error: request for member ‘filename’ in something not a structure or union
 2564 |     ret_v = caml_copy_string (file_params.filename);
      |                                          ^
./link.c: In function ‘ml_savefileannot’:
./link.c:2582:26: warning: implicit declaration of function ‘pdf_load_embedded_file_contents’; did you mean ‘pdf_load_embedded_file’? [-Wimplicit-function-declaration]
 2582 |         fz_buffer *buf = pdf_load_embedded_file_contents (state.ctx, fs);
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                          pdf_load_embedded_file
./link.c:2582:26: warning: initialization of ‘fz_buffer *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
ocamlc -ccopt "-g -std=c11 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/openjpeg-2.4 -Wall -Wextra -pedantic -O2 -D_POSIX_C_SOURCE -DGL_H='<GL/gl.h>' -DTEXT_TYPE=GL_TEXTURE_RECTANGLE_ARB -MMD -MF build/link.o.dep -MT_" -o build/link.o -c ./link.c failed
build failed
@fstecker
Copy link
Collaborator

fstecker commented Aug 7, 2024

That's probably due to an outdated version of libmupdf. From what I can see, Ubuntu 22.04 comes with version 1.19.0, while 1.24.8 is current. llpp probably needs 1.22.0 or above to work.

@criticic
Copy link
Owner

criticic commented Aug 7, 2024

you may try the master branch, or downgrade to a lower commit, and that may work. This repo is mainly for the arch user repo pkg for llpp, so here many changes were done to have llpp work with latest mupdf versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants