From patchwork Fri May 16 06:16:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Divya Ranjan X-Patchwork-Id: 42635 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6919027BC4D; Fri, 16 May 2025 07:17:52 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 06F0127BC4A for ; Fri, 16 May 2025 07:17:52 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFoNW-00084X-UO; Fri, 16 May 2025 02:17:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFoNT-0007vJ-47 for guix-patches@gnu.org; Fri, 16 May 2025 02:17:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFoNS-0006xM-CF for guix-patches@gnu.org; Fri, 16 May 2025 02:17:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=DtqGRMT4UANbqSf+pYmLr5K8m8zxl/uOKKYgLAL4kGg=; b=BrFp8vWiMIs2VSE+NQG9LnibbyWoDqqkWGiERYPy0teC7HyKcBglYpU+vL3iS1edhpZVU4FZKBgq7LbrzuTnEZfKFgfF7c+IwHCQsU4fQewa3tLorerDYZ8bqrvq02pvhDL1F9kX6+4tTrwV2Vf8YoIgWPjCUwgUs+vrdtRmWDQGSFhPEpzYO6yply01DeqydQCjS4fmUepFjZGJjtNpLb9jfd88LaCaQJwj0kJeuXBYNU9m6wzHeIc5YuB+V+zxUypvyJYkI5qx8G+CpAYrkemyXXopOjMQqTcC+8GE3bb5GxSDDSe8lSiL/0jsfl0P2hEBBsDwfaeknv942E2UJg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uFoNS-0002f4-4y for guix-patches@gnu.org; Fri, 16 May 2025 02:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78401] [PATCH] gnu: mupdf: Update to 1.26.0. Resent-From: Divya Ranjan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 16 May 2025 06:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78401 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 78401@debbugs.gnu.org Received: via spool by 78401-submit@debbugs.gnu.org id=B78401.17473761879963 (code B ref 78401); Fri, 16 May 2025 06:17:01 +0000 Received: (at 78401) by debbugs.gnu.org; 16 May 2025 06:16:27 +0000 Received: from localhost ([127.0.0.1]:32832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uFoMp-0002Zu-5x for submit@debbugs.gnu.org; Fri, 16 May 2025 02:16:27 -0400 Received: from latitanza.investici.org ([82.94.249.234]:61931) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uFoMk-0002Ys-Cv for 78401@debbugs.gnu.org; Fri, 16 May 2025 02:16:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=subvertising.org; s=stigmate; t=1747376176; bh=DtqGRMT4UANbqSf+pYmLr5K8m8zxl/uOKKYgLAL4kGg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=szSTU79A1+NPz2uD5D6J/fU5jiiEM9ZP9dfJpLRRFIPBth977kFIUvisBxG+ksOsf SuUwYsIRFeKIss55MQuzgw/v+xNSUCpa/NcXL2y8luQzslwUoJcke1Q+dP89gyZl9j mWaSAQF4oocths3D5yc4mBai0Q1CgcIiM39RCOxM= Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4ZzH0058pNzGpjq; Fri, 16 May 2025 06:16:16 +0000 (UTC) Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: divya@subvertising.org) by localhost (Postfix) with ESMTPSA id 4ZzGzz6XzvzGpjp; Fri, 16 May 2025 06:16:15 +0000 (UTC) In-Reply-To: <871psrmh3l.fsf@gmail.com> (Maxim Cournoyer's message of "Wed, 14 May 2025 22:55:58 +0900") References: <871psrmh3l.fsf@gmail.com> Date: Fri, 16 May 2025 06:16:11 +0000 Message-ID: <87sel52i8k.fsf@subvertising.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Divya Ranjan X-ACL-Warn: , Divya Ranjan via Guix-patches X-Patchwork-Original-From: Divya Ranjan via Guix-patches via From: Divya Ranjan Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Maxim Cournoyer writes: > Hi, Hello Maxim, > Divya Ranjan writes: > >> * gnu/packages/pdf.scm (mupdf): Update to 1.26.0. > > Various changes done here are not listed in the change log. Please > consult other commits for examples or (info "(standards) Style of Change > Logs"). Please find the updated patch with the indentation and commit message fixed. > >> (modules '((guix build utils) >> (ice-9 ftw) >> (srfi srfi-1))) >> @@ -895,6 +895,7 @@ (define-public mupdf >> libx11 >> libxext >> mujs >> + brotli > > Is this strictly needed for the update? Otherwise, it'd be best done in > a distinct, separated commit. Indeed, it is a new dependency with the update. > >> openjpeg >> openssl >> zlib)) >> @@ -907,6 +908,7 @@ (define-public mupdf >> #~(list "verbose=yes" >> (string-append "CC=" #$(cc-for-target)) >> "XCFLAGS=-fpic" >> + "USE_SYSTEM_BROTLI=yes" > > I assume that's necessary and not something the build system > automatically tries? If the later, do not explicit it (it makes inputs > rewriting less useful). Indeed, the build system doesn’t do that with USE_SYSTEM_LIBS=yes. >> "USE_SYSTEM_FREETYPE=yes" >> "USE_SYSTEM_GUMBO=yes" >> "USE_SYSTEM_HARFBUZZ=yes" >> @@ -921,7 +923,7 @@ (define-public mupdf >> "USE_SYSTEM_CURL=yes" >> "USE_SYSTEM_LEPTONICA=yes" >> "USE_SYSTEM_TESSERACT=yes" >> - "USE_SONAME=no" ;install as libmupdf.so >> + "USE_SONAME=yes" > Without enabling that, one runs in to "Too many levels of symbolic links" errors. This is due to a recent change in mupdf upstream that updated their symbol table for the library. I was part of the changes made for this, and the devs agree that USE_SONAME should be enabled. Here’s the backtrace with USE_SONAME=yes: error: in phase 'validate-runpath': uncaught exception: system-error "open-file" "~A: ~S" ("Too many levels of symbolic links" "/gnu/store/j6r6rgvmmm59a8i7vh330c7bpxmgicma-mupdf-1.26.0/lib/libmupdf.so") (40) phase `validate-runpath' failed after 0.0 seconds Backtrace: 13 (primitive-load "/gnu/store/304wldk8xn5xd2cnpvr66lbkn82…") In guix/build/gnu-build-system.scm: 966:2 12 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #) In ice-9/boot-9.scm: 1752:10 11 (with-exception-handler _ _ #:unwind? _ # _) In srfi/srfi-1.scm: 634:9 10 (for-each # …) In ice-9/boot-9.scm: 1752:10 9 (with-exception-handler _ _ #:unwind? _ # _) In guix/build/gnu-build-system.scm: 987:23 8 (_) 605:16 7 (validate-runpath #:validate-runpath? _ # _ #:outputs _) In guix/build/utils.scm: 735:23 6 (loop ("/gnu/store/j6r6rgvmmm59a8i7vh330c7bpxmgicma…" …) …) In guix/build/gnu-build-system.scm: 587:36 5 (validate "/gnu/store/j6r6rgvmmm59a8i7vh330c7bpxmgicma-…") In guix/build/utils.scm: 549:10 4 (find-files "/gnu/store/j6r6rgvmmm59a8i7vh330c7bpxmgic…" …) In ice-9/ftw.scm: 505:39 3 (loop _ _ #(25 88653728 16877 1 999 30000 0 22 # # # …) …) In guix/build/utils.scm: 551:34 2 (_ "/gnu/store/j6r6rgvmmm59a8i7vh330c7bpxmgicma-mupdf-…" …) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure open-file: Too many levels of symbolic links: "/gnu/store/j6r6rgvmmm59a8i7vh330c7bpxmgicma-mupdf-1.26.0/lib/libmupdf.so" build process 18 exited with status 256 Also, I don’t want to open another bug report, but enabling SONAME breaks sioyek which depends on mupdf-1.24. Since the latter inherits from mupdf, thus also inheriting USE_SONAME=yes, it breaks sioyek that relies on having it disabled. I’ve attached another patch that specifically disables SONAME for mupdf-1.24, allowing sioyek to build fine as usual. From 9e57a2805db3f870e5c0edc0d13eba308b0827a3 Mon Sep 17 00:00:00 2001 Message-ID: <9e57a2805db3f870e5c0edc0d13eba308b0827a3.1747375463.git.divya@subvertising.org> From: Divya Ranjan Date: Fri, 16 May 2025 06:01:18 +0000 Subject: [PATCH] gnu: mupdf: Modify #:make-flags [arguments]: Disable SONAME Change-Id: I070c59100ffedf9c451a7ce344ae6e210f1190f6 --- gnu/packages/pdf.scm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index c8c636976a..25a3f84533 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -948,7 +948,8 @@ (define-public mupdf license:silofl1.1 ;resources/fonts/{han,noto,sil,urw} license:asl2.0)))) ; resources/fonts/droid -(define-public mupdf-1.24 ; Needed for sioyek +(define-public mupdf-1.24 + ;Needed for sioyek (package (inherit mupdf) (name "mupdf") @@ -956,8 +957,8 @@ (define-public mupdf-1.24 ; Needed for sioyek (source (origin (method url-fetch) - (uri (string-append "https://mupdf.com/downloads/archive/" - "mupdf-" version "-source.tar.lz")) + (uri (string-append "https://mupdf.com/downloads/archive/" "mupdf-" + version "-source.tar.lz")) (sha256 (base32 "0hydmp8sdnkrkpqyysa6klkxbwv9awf1xc753r27gcj7ds7375fj")) (modules '((guix build utils) @@ -970,7 +971,14 @@ (define-public mupdf-1.24 ; Needed for sioyek (for-each delete-file-recursively (lset-difference string=? (scandir ".") - (cons* "." ".." keep)))))))))) + (cons* "." ".." keep)))))))) + (arguments + (substitute-keyword-arguments (package-arguments mupdf) + ((#:make-flags flags) + #~(append (filter (lambda (flag) + (not (string-prefix? "USE_SONAME=" flag))) + #$flags) + (list "USE_SONAME=no"))))))) (define-public qpdf base-commit: efac01f19b65d7d77a98bbfd57fe2073fb13064a prerequisite-patch-id: e0b65c11f00f64b0496909046ee872884b87653c -- 2.49.0