[zathura-pdf-mupdf] Build fails compiling document.c: ‘PDF_NAME_Info’ undeclared
I'm trying to build zathura-pdf-mupdf zathura-pdf-mupdf@cb22ce9b on Xubuntu 18.04, using mupdf built from current master (f4d01e23), but it fails when compiling document.c:
+paulo@monk:~/src/zathura-pdf-mupdf/build$ ninja
[1/2] Compiling C object 'pdf-mupdf@sha/zathura-pdf-mupdf_document.c.o'.
FAILED: pdf-mupdf@sha/zathura-pdf-mupdf_document.c.o
cc -Ipdf-mupdf@sha -I. -I.. -I/usr/local/include -I/usr/include/json-c -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O0 -g -fPIC -pthread -DVERSION_MAJOR=0 -DVERSION_MINOR=3 -DVERSION_REV=3 -D_DEFAULT_SOURCE -Wall -Wextra -pedantic -Werror=implicit-function-declaration -Werror=vla -fvisibility=hidden -MD -MQ 'pdf-mupdf@sha/zathura-pdf-mupdf_document.c.o' -MF 'pdf-mupdf@sha/zathura-pdf-mupdf_document.c.o.d' -o 'pdf-mupdf@sha/zathura-pdf-mupdf_document.c.o' -c ../zathura-pdf-mupdf/document.c
../zathura-pdf-mupdf/document.c: In function ‘pdf_document_get_information’:
../zathura-pdf-mupdf/document.c:141:69: error: ‘PDF_NAME_Info’ undeclared (first use in this function); did you mean ‘PDF_ENUM_NAME_Info’?
pdf_obj* info_dict = pdf_dict_get(mupdf_document->ctx, trailer, PDF_NAME_Info);
^~~~~~~~~~~~~
PDF_ENUM_NAME_Info
../zathura-pdf-mupdf/document.c:141:69: note: each undeclared identifier is reported only once for each function it appears in
ninja: build stopped: subcommand failed.
Here's the output from meson build
:
+paulo@monk:~/src/zathura-pdf-mupdf$ meson build/
The Meson build system
Version: 0.46.0
Source dir: /home/paulo/src/zathura-pdf-mupdf
Build dir: /home/paulo/src/zathura-pdf-mupdf/build
Build type: native build
Project name: zathura-pdf-mupdf
Native C compiler: cc (gcc 7.3.0 "cc (Ubuntu 7.3.0-16ubuntu3) 7.3.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency zathura found: YES 0.3.9
Native dependency girara-gtk3 found: YES 0.2.9
Native dependency glib-2.0 found: YES 2.56.1
Native dependency cairo found: YES 1.15.10
Library mupdf found: YES
Library mupdf-third found: YES
Compiler for C supports arguments -Wall: YES
Compiler for C supports arguments -Wextra: YES
Compiler for C supports arguments -pedantic: YES
Compiler for C supports arguments -Werror=implicit-function-declaration: YES
Compiler for C supports arguments -Werror=vla: YES
Compiler for C supports arguments -fvisibility=hidden: YES
Build targets in project: 1
Found ninja-1.8.2.git at /usr/local/bin/ninja
I searched mupdf header files to no avail:
+paulo@monk:~/src/zathura-pdf-mupdf/build$ grep -RE 'PDF.+Info' /usr/local/include/mupdf/
/usr/local/include/mupdf/pdf/name-table.h:PDF_MAKE_NAME("CIDSystemInfo", CIDSystemInfo)
/usr/local/include/mupdf/pdf/name-table.h:PDF_MAKE_NAME("Info", Info)
I get the impression the mupdf interface changed.