Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 853217 - app-text/zathura-pdf-mupdf-0.3.8-r1 with app-text/mupdf-1.20.0 - ../.../search.c: error: too few arguments to function fz_search_stext_page
Summary: app-text/zathura-pdf-mupdf-0.3.8-r1 with app-text/mupdf-1.20.0 - ../.../searc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Philipp Rösner
URL:
Whiteboard:
Keywords: PullRequest
: 853199 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-20 15:49 UTC by Toralf Förster
Modified: 2023-01-08 17:08 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,19.64 KB, text/plain)
2022-06-20 15:49 UTC, Toralf Förster
Details
app-text:zathura-pdf-mupdf-0.3.8-r1:20220620-154756.log (app-text:zathura-pdf-mupdf-0.3.8-r1:20220620-154756.log,20.87 KB, text/plain)
2022-06-20 15:49 UTC, Toralf Förster
Details
emerge-history.txt.bz2 (emerge-history.txt.bz2,78.18 KB, application/x-bzip)
2022-06-20 15:49 UTC, Toralf Förster
Details
environment (environment,100.73 KB, text/plain)
2022-06-20 15:49 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,30.46 KB, application/x-bzip)
2022-06-20 15:49 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,3.20 KB, application/x-bzip)
2022-06-20 15:49 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,25.61 KB, application/x-bzip)
2022-06-20 15:49 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2022-06-20 15:49:42 UTC
      |                       ^~~~~~~~~~~~~~~~
/usr/include/mupdf/fitz/structured-text.h:248:108: note: expected fz_quad *’ but argument is of type int’
  248 | int fz_search_stext_page(fz_context *ctx, fz_stext_page *text, const char *needle, int *hit_mark, fz_quad *hit_bbox, int hit_max);
      |                                                                                                   ~~~~~~~~~^~~~~~~~
../zathura-pdf-mupdf-0.3.8/zathura-pdf-mupdf/search.c:43:21: error: too few arguments to function fz_search_stext_page’
   43 |   int num_results = fz_search_stext_page(mupdf_page->ctx, mupdf_page->text,
      |                     ^~~~~~~~~~~~~~~~~~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no_multilib_hardened-j4-20220616-102428

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.3.1
 [2] x86_64-pc-linux-gnu-12.1.1 *
clang/llvm (if any):
clang version 14.0.5
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/14/bin
/usr/lib/llvm/14
14.0.5
Python 3.9.13
Available Ruby profiles:
  (none found)
Available Rust versions:
  [1]   rust-1.61.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.15_p10 [openjdk-bin-11]
*)	Eclipse Temurin JDK 17.0.3_p7 [openjdk-bin-17]
3)	Eclipse Temurin JDK 8.332_p09 [openjdk-bin-8]
4)	Eclipse Temurin JRE 17.0.3_p7 [openjdk-jre-bin-17]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-11 
  [3]   openjdk-bin-17  system-vm
  [4]   openjdk-jre-bin-17 

The Glorious Glasgow Haskell Compilation System, version 8.10.4
php cli:

  HEAD of ::gentoo
commit cf381106263d368869164d640b9d685d0db11999
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Mon Jun 20 11:03:03 2022 +0000

    2022-06-20 11:03:02 UTC

emerge -qpvO app-text/zathura-pdf-mupdf
[ebuild   R   ] app-text/zathura-pdf-mupdf-0.3.8-r1
Comment 1 Toralf Förster gentoo-dev 2022-06-20 15:49:43 UTC
Created attachment 786509 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-06-20 15:49:45 UTC
Created attachment 786512 [details]
app-text:zathura-pdf-mupdf-0.3.8-r1:20220620-154756.log
Comment 3 Toralf Förster gentoo-dev 2022-06-20 15:49:46 UTC
Created attachment 786515 [details]
emerge-history.txt.bz2
Comment 4 Toralf Förster gentoo-dev 2022-06-20 15:49:48 UTC
Created attachment 786518 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2022-06-20 15:49:49 UTC
Created attachment 786521 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-06-20 15:49:50 UTC
Created attachment 786524 [details]
logs.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2022-06-20 15:49:51 UTC
Created attachment 786527 [details]
temp.tar.bz2
Comment 8 Another Mortal 2022-06-20 22:59:59 UTC
Duplicate of https://bugs.gentoo.org/853199?
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-20 23:29:20 UTC
*** Bug 853199 has been marked as a duplicate of this bug. ***
Comment 10 Ben Kohler gentoo-dev 2022-06-21 15:06:58 UTC
To bring a bit of info over from that bug, this is caused by new mupdf-1.20.0, it still builds fine against mupdf-1.19.1.
Comment 11 Philipp Rösner 2022-06-21 20:16:14 UTC
The issue is originating from this API change in mupdf-1.20.0: https://github.com/ArtifexSoftware/mupdf/commit/2a951a4a53746b760ebd2ffd3b3bbcae30d99b28

The commit is stating it belongs to 1.19.0, but judging by the changelog, it made it into mupdf-1.20.0: https://github.com/ArtifexSoftware/mupdf/blob/master/CHANGES

Replacing the int* hit_mark parameter with NULL fixes the build issue.
However, at least on two of my machines the search doesn't work (it doesn't find text it should find and highlights no text; sometimes it even SEGFAULTs).

I submitted a pull request to upstream to address the issue: https://github.com/pwmt/zathura-pdf-mupdf/pull/10

For ::gentoo, setting ~app-text/mupdf-1.19.1 in the DEPEND seems like the best option currently.
Comment 12 Larry the Git Cow gentoo-dev 2022-06-21 21:08:17 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96cf31a4622dfedaafc1aa491b36ee1c7e80aa4c

commit 96cf31a4622dfedaafc1aa491b36ee1c7e80aa4c
Author:     Philipp Rösner <rndxelement@protonmail.com>
AuthorDate: 2022-06-21 20:47:47 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-21 21:05:52 +0000

    app-text/zathura-pdf-mupdf: restrict mupdf DEPEND
    
    Due to an API change in mupdf-1.20.0, zathura-pdf-mupdf is
    currently incompatible with mupdf-1.20.0.
    Therefore, we restrict the mupdf version to ~1.19.1.
    
    Bug: https://bugs.gentoo.org/853217
    Signed-off-by: Philipp Rösner <rndxelement@protonmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/26026
    Signed-off-by: Sam James <sam@gentoo.org>

 ...hura-pdf-mupdf-0.3.8-r1.ebuild => zathura-pdf-mupdf-0.3.8-r2.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)