Error during compilation: too many arguments to function ‘fz_search_stext_page’
I'm using Ubuntu 22.04. I've downloaded the repository. I've installed dependencies and now I'm trying to build the project. I'm getting an error when trying to compile the project.
Compilation error
$ meson build
The Meson build system
Version: 0.61.2
Source dir: /home/rdrg/e/zathura-pdf-mupdf
Build dir: /home/rdrg/e/zathura-pdf-mupdf/build
Build type: native build
Project name: zathura-pdf-mupdf
Project version: 0.4.0
C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C linker for the host machine: cc ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency zathura found: YES 0.5.2
Run-time dependency girara-gtk3 found: YES 0.4.0
Run-time dependency glib-2.0 found: YES 2.72.4
Run-time dependency cairo found: YES 1.16.0
Run-time dependency mupdf found: YES 1.19.0
Library mupdf-third found: YES
Run-time dependency libjpeg found: YES 2.1.2
Library jbig2dec found: YES
Run-time dependency libopenjp2 found: YES 2.4.0
Run-time dependency gumbo found: YES 0.10.1
Run-time dependency tesseract found: YES 4.1.1
Run-time dependency lept found: YES 1.82.0
Run-time dependency mujs found: YES 1.1.3
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.10.1 at /usr/bin/ninja
$ ninja
[1/11] Compiling C object libpdf-mupdf.so.p/zathura-pdf-mupdf_search.c.o
FAILED: libpdf-mupdf.so.p/zathura-pdf-mupdf_search.c.o
cc -Ilibpdf-mupdf.so.p -I. -I.. -I/usr/local/include -I/usr/include/gtk-3.0 -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/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/fribidi -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/x86_64-linux-gnu -I/usr/include/libmount -I/usr/include/blkid -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/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/openjpeg-2.4 -I/usr/include/leptonica -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c11 -g -fPIC -pthread -DVERSION_MAJOR=0 -DVERSION_MINOR=4 -DVERSION_REV=0 -D_DEFAULT_SOURCE -Werror=implicit-function-declaration -Werror=vla -fvisibility=hidden -MD -MQ libpdf-mupdf.so.p/zathura-pdf-mupdf_search.c.o -MF libpdf-mupdf.so.p/zathura-pdf-mupdf_search.c.o.d -o libpdf-mupdf.so.p/zathura-pdf-mupdf_search.c.o -c ../zathura-pdf-mupdf/search.c
../zathura-pdf-mupdf/search.c: In function ‘pdf_page_search_text’:
../zathura-pdf-mupdf/search.c:44:19: warning: passing argument 5 of ‘fz_search_stext_page’ makes integer from pointer without a cast [-Wint-conversion]
44 | text, NULL, hit_bbox, N_SEARCH_RESULTS);
| ^~~~~~~~
| |
| fz_quad *
In file included from /usr/include/mupdf/fitz.h:70,
from ../zathura-pdf-mupdf/plugin.h:10,
from ../zathura-pdf-mupdf/search.c:7:
/usr/include/mupdf/fitz/structured-text.h:247:104: note: expected ‘int’ but argument is of type ‘fz_quad *’
247 | int fz_search_stext_page(fz_context *ctx, fz_stext_page *text, const char *needle, fz_quad *quads, int max_quads);
| ~~~~^~~~~~~~~
../zathura-pdf-mupdf/search.c:43:21: error: too many arguments to function ‘fz_search_stext_page’
43 | int num_results = fz_search_stext_page(mupdf_page->ctx, mupdf_page->text,
| ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/mupdf/fitz.h:70,
from ../zathura-pdf-mupdf/plugin.h:10,
from ../zathura-pdf-mupdf/search.c:7:
/usr/include/mupdf/fitz/structured-text.h:247:5: note: declared here
247 | int fz_search_stext_page(fz_context *ctx, fz_stext_page *text, const char *needle, fz_quad *quads, int max_quads);
| ^~~~~~~~~~~~~~~~~~~~
[2/11] Compiling C object libpdf-mupdf.so.p/zathura-pdf-mupdf_links.c.o
[3/11] Compiling C object libpdf-mupdf.so.p/zathura-pdf-mupdf_page.c.o
[4/11] Compiling C object libpdf-mupdf.so.p/zathura-pdf-mupdf_index.c.o
[5/11] Compiling C object libpdf-mupdf.so.p/zathura-pdf-mupdf_render.c.o
[6/11] Compiling C object libpdf-mupdf.so.p/zathura-pdf-mupdf_image.c.o
[7/11] Compiling C object libpdf-mupdf.so.p/zathura-pdf-mupdf_plugin.c.o
[8/11] Compiling C object libpdf-mupdf.so.p/zathura-pdf-mupdf_utils.c.o
[9/11] Compiling C object libpdf-mupdf.so.p/zathura-pdf-mupdf_select.c.o
[10/11] Compiling C object libpdf-mupdf.so.p/zathura-pdf-mupdf_document.c.o
ninja: build stopped: subcommand failed.
$ echo $?
1
System information
Operating system
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
mupdf's version
This error seem to be related with mupdf
. Here's the version of mupdf
that I've installed.
$ apt-cache show libmupdf-dev
Package: libmupdf-dev
Architecture: amd64
Version: 1.19.0+ds1-2
Priority: optional
Section: universe/libdevel
Source: mupdf
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Kan-Ru Chen (陳侃如) <koster@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 49716
Filename: pool/universe/m/mupdf/libmupdf-dev_1.19.0+ds1-2_amd64.deb
Size: 26856550
MD5sum: 0d89147fa9ceac9547c938ea3b92b61f
SHA1: e02ca34146117dd5805fad8fb3a2f954b5eb3def
SHA256: 61709be1933917c2d59b84e9aed0f936e1c88252ffbe55d362e020856c49c2a8
SHA512: ae60665fa71035d5a8f6a29c05e7f712757dad715c4256335a8c02a826f087d06976e5666540dfa9665282558dc9e7810149e7f09a7aa0167a18fcafe68cb728
Homepage: http://mupdf.com/
Description-en: development files for the MuPDF viewer
MuPDF is a lightweight PDF viewer and toolkit written in portable C.
It also reads XPS, OpenXPS and ePub documents.
.
This package contains the static library and headers.
Description-md5: 1971a9536574a0bc27560d5c80c49a3f
$ apt-cache showpkg libmupdf-dev
Package: libmupdf-dev
Versions:
1.19.0+ds1-2 (/var/lib/apt/lists/pe.archive.ubuntu.com_ubuntu_dists_jammy_universe_binary-amd64_Packages) (/var/lib/dpkg/status)
Description Language:
File: /var/lib/apt/lists/pe.archive.ubuntu.com_ubuntu_dists_jammy_universe_binary-amd64_Packages
MD5: 1971a9536574a0bc27560d5c80c49a3f
Description Language: en
File: /var/lib/apt/lists/pe.archive.ubuntu.com_ubuntu_dists_jammy_universe_i18n_Translation-en
MD5: 1971a9536574a0bc27560d5c80c49a3f
Reverse Depends:
Dependencies:
1.19.0+ds1-2 -
Provides:
1.19.0+ds1-2 -
Reverse Provides:
Edited by Rodrigo Morales