GNU bug report logs - #70079
[PATCH] gnu: libjxl: Fix building on riscv64-linux.

Previous Next

Package: guix-patches;

Reported by: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>

Date: Fri, 29 Mar 2024 17:03:02 UTC

Severity: normal

Tags: patch

Done: Z572 <873216071 <at> qq.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: libjxl: Fix building on riscv64-linux.
Date: Sat, 30 Mar 2024 01:01:16 +0800
* gnu/packages/image.scm (libjxl)
[arguments]: When target riscv64, add 'add-miss-atomic-include phase.

Change-Id: I554ae8d9d9bd982e7eb63ad4ecae176d2ba2372b
---
 gnu/packages/image.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 6accf68ef0..35ee12d8f3 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -35,7 +35,7 @@
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan <at> gmail.com>
 ;;; Copyright © 2022 ( <paren <at> disroot.org>
 ;;; Copyright © 2022-2023 Bruno Victal <mirai <at> makinata.eu>
-;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2023, 2024 Zheng Junjie <873216071 <at> qq.com>
 ;;; Copyright © 2023-2024 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
 ;;; Copyright © 2023 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
 ;;; Copyright © 2024 chris <chris <at> bumblehead.com>
@@ -2606,7 +2606,17 @@ (define-public libjxl
              "-DJPEGXL_FORCE_SYSTEM_BROTLI=true"
              "-DJPEGXL_FORCE_SYSTEM_LCMS2=true"
              "-DJPEGXL_FORCE_SYSTEM_HWY=true"
-             "-DJPEGXL_BUNDLE_LIBPNG=false")))
+             "-DJPEGXL_BUNDLE_LIBPNG=false")
+       ;; see https://github.com/libjxl/libjxl/pull/2211
+       ,@(if (target-riscv64?)
+             `(#:phases
+               (modify-phases %standard-phases
+                 (add-after 'unpack 'add-miss-atomic-include
+                   (lambda _
+                     (substitute* "lib/jxl/enc_xyb.cc"
+                       (("<algorithm>")
+                        "<algorithm>\n#include <atomic>"))))))
+             '())))
     (native-inputs
      (list asciidoc doxygen googletest pkg-config python))
     (inputs

base-commit: 37d31495c1c3c38d1b74e0c5b3ba279c1d99c7d5
-- 
2.41.0





This bug report was last modified 1 year and 56 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.