GNU bug report logs - #61865
[PATCH 0/8] fix some packages cross-compile

Previous Next

Package: guix-patches;

Reported by: Z572 <873216071 <at> qq.com>

Date: Tue, 28 Feb 2023 08:32:02 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61865 in the body.
You can then email your comments to 61865 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Tue, 28 Feb 2023 08:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Z572 <873216071 <at> qq.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 28 Feb 2023 08:32:02 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/8] fix some packages cross-compile
Date: Tue, 28 Feb 2023 16:30:45 +0800
Hello, guix.

This patchset fix some package cross-compile.

Zheng Junjie (8):
  gnu: xcb-util-wm: fix riscv64 cross-compile.
  gnu: libxv: fix riscv64 cross-compile.
  gnu: libxtst: fix riscv64 cross-compile.
  gnu: mtdev: fix riscv64 cross-compile.
  gnu: gobject-introspection: fix riscv64 cross-compile.
  gnu: gsettings-desktop-schemas: fix cross-compile.
  gnu: libotf: fix cross-compile.
  gnu: librsvg-2.40: fix cross-compile.

 gnu/packages/fontutils.scm | 17 ++++++++++-
 gnu/packages/glib.scm      |  5 +++-
 gnu/packages/gnome.scm     |  7 +++--
 gnu/packages/xdisorg.scm   | 20 +++++++++++--
 gnu/packages/xorg.scm      | 59 ++++++++++++++++++++++++++++++++++----
 5 files changed, 95 insertions(+), 13 deletions(-)


base-commit: c0e9ddfa290056f137ee21a53be6be4fbb8586ea
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Tue, 28 Feb 2023 08:34:02 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: 61865 <at> debbugs.gnu.org
Subject: [PATCH 1/8] gnu: xcb-util-wm: fix riscv64 cross-compile.
Date: Tue, 28 Feb 2023 16:33:33 +0800
* gnu/packages/xorg.scm (xcb-util-wm): fix riscv64 cross-compile.
[arguments]: add update-config-scripts phases when target is riscv64.
[native-inputs]: add CONFIG when target is riscv64.
---
 gnu/packages/xorg.scm | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index a43809e3cb..32be732eef 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -5792,11 +5792,27 @@ (define-public xcb-util-wm
                "0gra7hfyxajic4mjd63cpqvd20si53j1q3rbdlkqkahfciwq3gr8"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--disable-static")))
+     `(#:configure-flags '("--disable-static")
+       ,@(if (target-riscv64?)
+             `(#:phases
+               (modify-phases %standard-phases
+                 (add-after 'unpack 'update-config-scripts
+                   (lambda* (#:key inputs native-inputs #:allow-other-keys)
+                     ;; Replace outdated config.guess and config.sub.
+                     (for-each (lambda (file)
+                                 (install-file
+                                  (search-input-file
+                                   (or native-inputs inputs)
+                                   (string-append "/bin/" file)) "."))
+                               '("config.guess" "config.sub"))))))
+             '())))
     (propagated-inputs
      (list libxcb))
     (native-inputs
-     (list m4 pkg-config))
+     (append (if (target-riscv64?)
+                 (list config)
+                 '())
+             (list m4 pkg-config)))
     (home-page "https://cgit.freedesktop.org/xcb/util-wm/")
     (synopsis "Client and window-manager helpers for ICCCM and EWMH")
     (description
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Tue, 28 Feb 2023 08:35:02 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: 61865 <at> debbugs.gnu.org
Subject: [PATCH 3/8] gnu: libxtst: fix riscv64 cross-compile.
Date: Tue, 28 Feb 2023 16:33:35 +0800
* gnu/packages/xorg.scm(libxtst): fix riscv64 cross-compile
[arguments]: when target is riscv64, add phase to update config.{guess,sub}
[native-inputs]: when target is riscv64, add config.
---
 gnu/packages/xorg.scm | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 2b6f9fa369..2cc1523e3e 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -4658,13 +4658,28 @@ (define-public libxtst
             "012jpyj7xfm653a9jcfqbzxyywdmwb2b5wr1dwylx14f3f54jma6"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--disable-static")))
+     `(#:configure-flags '("--disable-static")
+       ,@(if (and (%current-target-system)
+                  (target-riscv64?))
+             `(#:phases
+               (modify-phases %standard-phases
+                 (add-after 'unpack 'update-config
+                   (lambda* (#:key native-inputs #:allow-other-keys)
+                     (install-file
+                      (search-input-file native-inputs "/bin/config.sub") ".")
+                     (install-file
+                      (search-input-file native-inputs "/bin/config.guess") ".")))))
+             '())))
     (propagated-inputs
      (list libxi xorgproto))
     (inputs
       (list libx11))
     (native-inputs
-      (list pkg-config))
+     `(,@(if (and (%current-target-system)
+                  (target-riscv64?))
+             (list config)
+             '())
+       ,pkg-config))
     (home-page "https://www.x.org/wiki/")
     (synopsis "Xorg library for Xtest and Record extensions")
     (description
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Tue, 28 Feb 2023 08:35:02 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: 61865 <at> debbugs.gnu.org
Subject: [PATCH 5/8] gnu: gobject-introspection: fix riscv64 cross-compile.
Date: Tue, 28 Feb 2023 16:33:37 +0800
* gnu/packages/glib.scm(gobject-introspection): fix riscv64 cross-compile
[native-inputs]: when (%current-target-system) is true, add python.
---
 gnu/packages/glib.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index f85d5e3225..319a0ca2c1 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -573,7 +573,10 @@ (define gobject-introspection
                                           "/_giscanner"))))
                 #~()))))
     (native-inputs
-     `(("glib" ,glib "bin")
+     `(,@(if (%current-target-system)
+             `(("python" ,python))
+             '())
+       ("glib" ,glib "bin")
        ("pkg-config" ,pkg-config)
        ("bison" ,bison)
        ("flex" ,flex)))
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Tue, 28 Feb 2023 08:35:03 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: 61865 <at> debbugs.gnu.org
Subject: [PATCH 4/8] gnu: mtdev: fix riscv64 cross-compile.
Date: Tue, 28 Feb 2023 16:33:36 +0800
* gnu/packages/xdisorg.scm(mtdev): fix riscv64 cross-compile
[arguments]: when target is riscv64, add phase to update config.{guess,sub}.
[native-inputs]: when target is riscv64, add config.
---
 gnu/packages/xdisorg.scm | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 2ebeb4e013..21bc368538 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -41,7 +41,7 @@
 ;;; Copyright © 2020 Gabriel Arazas <foo.dogsquared <at> gmail.com>
 ;;; Copyright © 2020 James Smith <jsubuntuxp <at> disroot.org>
 ;;; Copyright © 2020 B. Wilson <elaexuotee <at> wilsonb.com>
-;;; Copyright © 2020, 2021 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2020, 2021, 2023 Zheng Junjie <873216071 <at> qq.com>
 ;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2021, 2022 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
 ;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
@@ -763,7 +763,23 @@ (define-public mtdev
          (base32
           "1q700h9dqcm3zl6c3gj0qxxjcx6ibw2c51wjijydhwdcm26v5mqm"))))
     (build-system gnu-build-system)
-    (arguments '(#:configure-flags '("--disable-static")))
+    (arguments `(#:configure-flags '("--disable-static")
+                 ,@(if (target-riscv64?)
+                       `(#:phases
+                         (modify-phases %standard-phases
+                           (add-after 'unpack 'update-config-scripts
+                             (lambda* (#:key inputs native-inputs #:allow-other-keys)
+                               ;; Replace outdated config.guess and config.sub.
+                               (for-each (lambda (file)
+                                           (install-file
+                                            (search-input-file
+                                             (or native-inputs inputs)
+                                             (string-append "/bin/" file)) "./config-aux"))
+                                         '("config.guess" "config.sub"))))))
+                       '())))
+    (native-inputs (if (target-riscv64?)
+                       (list config)
+                       '()))
     (home-page "http://bitmath.org/code/mtdev/")
     (synopsis "Multitouch protocol translation library")
     (description "Mtdev is a stand-alone library which transforms all
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Tue, 28 Feb 2023 08:35:03 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: 61865 <at> debbugs.gnu.org
Subject: [PATCH 2/8] gnu: libxv: fix riscv64 cross-compile.
Date: Tue, 28 Feb 2023 16:33:34 +0800
* gnu/packages/xorg.scm(libxv): fix riscv64 cross-compile
[arguments]: when target is riscv64, add phase to update config.{guess,sub}
[native-inputs]: when target is riscv64, add config.
---
 gnu/packages/xorg.scm | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 32be732eef..2b6f9fa369 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -4696,13 +4696,29 @@ (define-public libxv
             "125hn06bd3d8y97hm2pbf5j55gg4r2hpd3ifad651i4sr7m16v6j"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags '(,@(malloc0-flags) "--disable-static")))
+     `(#:configure-flags '(,@(malloc0-flags) "--disable-static")
+       ,@(if (target-riscv64?)
+             `(#:phases
+               (modify-phases %standard-phases
+                 (add-after 'unpack 'update-config-scripts
+                   (lambda* (#:key inputs native-inputs #:allow-other-keys)
+                     ;; Replace outdated config.guess and config.sub.
+                     (for-each (lambda (file)
+                                 (install-file
+                                  (search-input-file
+                                   (or native-inputs inputs)
+                                   (string-append "/bin/" file)) "."))
+                               '("config.guess" "config.sub"))))))
+             '())))
     (propagated-inputs
      (list xorgproto))
     (inputs
       (list libxext libx11))
     (native-inputs
-      (list pkg-config))
+     (append (if (target-riscv64?)
+                 (list config)
+                 '())
+             (list pkg-config)))
     (home-page "https://www.x.org/wiki/")
     (synopsis "Xorg XVideo Extension library")
     (description "Library for the X Video Extension to the X11 protocol.")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Tue, 28 Feb 2023 08:35:04 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: 61865 <at> debbugs.gnu.org
Subject: [PATCH 6/8] gnu: gsettings-desktop-schemas: fix cross-compile.
Date: Tue, 28 Feb 2023 16:33:38 +0800
* gnu/packages/gnome.scm(gsettings-desktop-schemas): fix cross-compile.
[inputs]: add gobject-introspection.
---
 gnu/packages/gnome.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 4698b883af..1c818b01b4 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -2755,7 +2755,7 @@ (define-public gsettings-desktop-schemas
                                                  "/share/backgrounds/gnome"))
                         ;; Do not reference fonts, that may not exist.
                         (("'Source Code Pro 10'") "'Monospace 11'")))))))
-    (inputs (list glib gnome-backgrounds))
+    (inputs (list glib gnome-backgrounds gobject-introspection))
     (native-inputs (list gettext-minimal
                          `(,glib "bin") ;glib-compile-schemas, etc.
                          gobject-introspection
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Tue, 28 Feb 2023 08:35:04 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: 61865 <at> debbugs.gnu.org
Subject: [PATCH 7/8] gnu: libotf: fix cross-compile.
Date: Tue, 28 Feb 2023 16:33:39 +0800
* gnu/packages/fontutils.scm(libotf): fix cross-compile.
[native-inputs]:
add freetype, when cross-compile, add libtool, autoconf automake.
[arguments]: when cross-compile, add phase to fix rpl_malloc undefined reference
---
 gnu/packages/fontutils.scm | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 72621cc006..d451f5e504 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -1392,7 +1392,22 @@ (define-public libotf
                (base32 "0sq6g3xaxw388akws6qrllp3kp2sxgk2dv4j79k6mm52rnihrnv8"))))
     (build-system gnu-build-system)
     (native-inputs
-     (list pkg-config))
+     (append (if (%current-target-system)
+                 (list libtool
+                       autoconf automake)
+                 '())
+             (list pkg-config freetype)))
+    (arguments (if (%current-target-system)
+                   (list
+                    #:phases
+                    #~(modify-phases %standard-phases
+                        (add-after 'unpack 'fix-rpl_malloc
+                          (lambda _
+                            (substitute* "configure.ac"
+                              (("AC_FUNC_MALLOC")
+                               ""))
+                            (invoke "sh" "autogen.sh")))))
+                   '()))
     (propagated-inputs
      (list freetype))
     (home-page "https://www.nongnu.org/m17n/")
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Tue, 28 Feb 2023 08:35:04 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: 61865 <at> debbugs.gnu.org
Subject: [PATCH 8/8] gnu: librsvg-2.40: fix cross-compile.
Date: Tue, 28 Feb 2023 16:33:40 +0800
* gnu/packages/gnome.scm(librsvg-2.40): fix cross-compile.
[native-inputs]: add gdk-pixbuf.
[inputs]: add gobject-introspection.
---
 gnu/packages/gnome.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 1c818b01b4..3705909742 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3793,11 +3793,12 @@ (define-public librsvg-2.40
                            "bugs/340047.svg"
                            "bugs/749415.svg"))))))))
     (native-inputs
-     (list pkg-config
+     (list gdk-pixbuf
+           pkg-config
            `(,glib "bin") ; glib-mkenums, etc.
            gobject-introspection)) ; g-ir-compiler, etc.
     (inputs
-     (list pango libcroco libxml2))
+     (list pango libcroco libxml2 gobject-introspection))
     (propagated-inputs
      ;; librsvg-2.0.pc refers to all of that.
      (list cairo gdk-pixbuf glib))
-- 
2.39.1





Information forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Thu, 30 Mar 2023 14:47:02 GMT) Full text and rfc822 format available.

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

From: Z572 <873216071 <at> qq.com>
To: 61865 <at> debbugs.gnu.org
Subject: [PATCH] gnu: libxtst: fix riscv64 cross-compile.
Date: Thu, 30 Mar 2023 22:46:03 +0800
* gnu/packages/xorg.scm(libxtst): fix riscv64 cross-compile
[arguments]: when target is riscv64, add phase to update config.{guess,sub}
[native-inputs]: when target is riscv64, add config.
---
 gnu/packages/xorg.scm | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 55c9b53e1d..7d5e7c6f9c 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -4509,13 +4509,28 @@ (define-public libxtst
             "012jpyj7xfm653a9jcfqbzxyywdmwb2b5wr1dwylx14f3f54jma6"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--disable-static")))
+     `(#:configure-flags '("--disable-static")
+       ,@(if (target-riscv64?)
+             `(#:phases
+               (modify-phases %standard-phases
+                 (add-after 'unpack 'update-config
+                   (lambda* (#:key native-inputs inputs #:allow-other-keys)
+                     (for-each (lambda (file)
+                                 (install-file
+                                  (search-input-file
+                                   (or native-inputs inputs)
+                                   (string-append "/bin/" file)) "."))
+                               '("config.guess" "config.sub"))))))
+             '())))
     (propagated-inputs
      (list libxi xorgproto))
     (inputs
-      (list libx11))
+     (list libx11))
     (native-inputs
-      (list pkg-config))
+     `(,@(if (target-riscv64?)
+             (list config)
+             '())
+       ,pkg-config))
     (home-page "https://www.x.org/wiki/")
     (synopsis "Xorg library for Xtest and Record extensions")
     (description
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Sun, 04 Jun 2023 12:21:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Z572 <873216071 <at> qq.com>
Cc: 61865 <at> debbugs.gnu.org
Subject: Re: [bug#61865] [PATCH] gnu: libxtst: fix riscv64 cross-compile.
Date: Sun, 4 Jun 2023 15:19:45 +0300
[Message part 1 (text/plain, inline)]
This patch I changed (target-riscv64?) to
(and (target-riscv64?)
     (%current-target-system))

This way it only occurs when cross compiling.

On Thu, Mar 30, 2023 at 10:46:03PM +0800, Z572 via Guix-patches via wrote:
> * gnu/packages/xorg.scm(libxtst): fix riscv64 cross-compile
> [arguments]: when target is riscv64, add phase to update config.{guess,sub}
> [native-inputs]: when target is riscv64, add config.
> ---
>  gnu/packages/xorg.scm | 21 ++++++++++++++++++---
>  1 file changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
> index 55c9b53e1d..7d5e7c6f9c 100644
> --- a/gnu/packages/xorg.scm
> +++ b/gnu/packages/xorg.scm
> @@ -4509,13 +4509,28 @@ (define-public libxtst
>              "012jpyj7xfm653a9jcfqbzxyywdmwb2b5wr1dwylx14f3f54jma6"))))
>      (build-system gnu-build-system)
>      (arguments
> -     '(#:configure-flags '("--disable-static")))
> +     `(#:configure-flags '("--disable-static")
> +       ,@(if (target-riscv64?)
> +             `(#:phases
> +               (modify-phases %standard-phases
> +                 (add-after 'unpack 'update-config
> +                   (lambda* (#:key native-inputs inputs #:allow-other-keys)
> +                     (for-each (lambda (file)
> +                                 (install-file
> +                                  (search-input-file
> +                                   (or native-inputs inputs)
> +                                   (string-append "/bin/" file)) "."))
> +                               '("config.guess" "config.sub"))))))
> +             '())))
>      (propagated-inputs
>       (list libxi xorgproto))
>      (inputs
> -      (list libx11))
> +     (list libx11))
>      (native-inputs
> -      (list pkg-config))
> +     `(,@(if (target-riscv64?)
> +             (list config)
> +             '())
> +       ,pkg-config))
>      (home-page "https://www.x.org/wiki/")
>      (synopsis "Xorg library for Xtest and Record extensions")
>      (description
> -- 
> 2.39.2
> 
> 
> 
> 

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Sun, 04 Jun 2023 12:21:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Z572 <873216071 <at> qq.com>
Cc: 61865 <at> debbugs.gnu.org
Subject: Re: [bug#61865] [PATCH 2/8] gnu: libxv: fix riscv64 cross-compile.
Date: Sun, 4 Jun 2023 15:19:52 +0300
[Message part 1 (text/plain, inline)]
This patch is no longer necessary after updating libxv to a newer
version.

On Tue, Feb 28, 2023 at 04:33:34PM +0800, Z572 via Guix-patches via wrote:
> * gnu/packages/xorg.scm(libxv): fix riscv64 cross-compile
> [arguments]: when target is riscv64, add phase to update config.{guess,sub}
> [native-inputs]: when target is riscv64, add config.
> ---
>  gnu/packages/xorg.scm | 20 ++++++++++++++++++--
>  1 file changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
> index 32be732eef..2b6f9fa369 100644
> --- a/gnu/packages/xorg.scm
> +++ b/gnu/packages/xorg.scm
> @@ -4696,13 +4696,29 @@ (define-public libxv
>              "125hn06bd3d8y97hm2pbf5j55gg4r2hpd3ifad651i4sr7m16v6j"))))
>      (build-system gnu-build-system)
>      (arguments
> -     `(#:configure-flags '(,@(malloc0-flags) "--disable-static")))
> +     `(#:configure-flags '(,@(malloc0-flags) "--disable-static")
> +       ,@(if (target-riscv64?)
> +             `(#:phases
> +               (modify-phases %standard-phases
> +                 (add-after 'unpack 'update-config-scripts
> +                   (lambda* (#:key inputs native-inputs #:allow-other-keys)
> +                     ;; Replace outdated config.guess and config.sub.
> +                     (for-each (lambda (file)
> +                                 (install-file
> +                                  (search-input-file
> +                                   (or native-inputs inputs)
> +                                   (string-append "/bin/" file)) "."))
> +                               '("config.guess" "config.sub"))))))
> +             '())))
>      (propagated-inputs
>       (list xorgproto))
>      (inputs
>        (list libxext libx11))
>      (native-inputs
> -      (list pkg-config))
> +     (append (if (target-riscv64?)
> +                 (list config)
> +                 '())
> +             (list pkg-config)))
>      (home-page "https://www.x.org/wiki/")
>      (synopsis "Xorg XVideo Extension library")
>      (description "Library for the X Video Extension to the X11 protocol.")
> -- 
> 2.39.1
> 
> 
> 
> 

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Sun, 04 Jun 2023 12:21:03 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Z572 <873216071 <at> qq.com>
Cc: 61865 <at> debbugs.gnu.org
Subject: Re: [bug#61865] [PATCH 7/8] gnu: libotf: fix cross-compile.
Date: Sun, 4 Jun 2023 15:19:59 +0300
[Message part 1 (text/plain, inline)]
This one I didn't apply. I don't believe adding freetype as a
native-input is correct but I could see adding it as an input. In the
end libotf links to freetype, and we don't want it to link to the one in
native-inputs.

I don't think the phase is the correct way to do this. I didn't see any
error related to it when I was building it before applying the patch,
and I made it pretty far after overriding the location of
freetype-config.

On Tue, Feb 28, 2023 at 04:33:39PM +0800, Z572 via Guix-patches via wrote:
> * gnu/packages/fontutils.scm(libotf): fix cross-compile.
> [native-inputs]:
> add freetype, when cross-compile, add libtool, autoconf automake.
> [arguments]: when cross-compile, add phase to fix rpl_malloc undefined reference
> ---
>  gnu/packages/fontutils.scm | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
> index 72621cc006..d451f5e504 100644
> --- a/gnu/packages/fontutils.scm
> +++ b/gnu/packages/fontutils.scm
> @@ -1392,7 +1392,22 @@ (define-public libotf
>                 (base32 "0sq6g3xaxw388akws6qrllp3kp2sxgk2dv4j79k6mm52rnihrnv8"))))
>      (build-system gnu-build-system)
>      (native-inputs
> -     (list pkg-config))
> +     (append (if (%current-target-system)
> +                 (list libtool
> +                       autoconf automake)
> +                 '())
> +             (list pkg-config freetype)))
> +    (arguments (if (%current-target-system)
> +                   (list
> +                    #:phases
> +                    #~(modify-phases %standard-phases
> +                        (add-after 'unpack 'fix-rpl_malloc
> +                          (lambda _
> +                            (substitute* "configure.ac"
> +                              (("AC_FUNC_MALLOC")
> +                               ""))
> +                            (invoke "sh" "autogen.sh")))))
> +                   '()))
>      (propagated-inputs
>       (list freetype))
>      (home-page "https://www.nongnu.org/m17n/")
> -- 
> 2.39.1
> 
> 
> 
> 

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#61865; Package guix-patches. (Sun, 04 Jun 2023 12:21:03 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Z572 <873216071 <at> qq.com>
Cc: 61865 <at> debbugs.gnu.org
Subject: Re: [bug#61865] [PATCH 8/8] gnu: librsvg-2.40: fix cross-compile.
Date: Sun, 4 Jun 2023 15:20:05 +0300
[Message part 1 (text/plain, inline)]
I didn't apply this patch. I wasn't able to cross-compile some of the
packages which came before this package to see where it failed when
cross-compiling.

On Tue, Feb 28, 2023 at 04:33:40PM +0800, Z572 via Guix-patches via wrote:
> * gnu/packages/gnome.scm(librsvg-2.40): fix cross-compile.
> [native-inputs]: add gdk-pixbuf.
> [inputs]: add gobject-introspection.
> ---
>  gnu/packages/gnome.scm | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 1c818b01b4..3705909742 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -3793,11 +3793,12 @@ (define-public librsvg-2.40
>                             "bugs/340047.svg"
>                             "bugs/749415.svg"))))))))
>      (native-inputs
> -     (list pkg-config
> +     (list gdk-pixbuf
> +           pkg-config
>             `(,glib "bin") ; glib-mkenums, etc.
>             gobject-introspection)) ; g-ir-compiler, etc.
>      (inputs
> -     (list pango libcroco libxml2))
> +     (list pango libcroco libxml2 gobject-introspection))
>      (propagated-inputs
>       ;; librsvg-2.0.pc refers to all of that.
>       (list cairo gdk-pixbuf glib))
> -- 
> 2.39.1
> 
> 
> 
> 

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Sun, 04 Jun 2023 12:21:03 GMT) Full text and rfc822 format available.

Notification sent to Z572 <873216071 <at> qq.com>:
bug acknowledged by developer. (Sun, 04 Jun 2023 12:21:04 GMT) Full text and rfc822 format available.

Message #49 received at 61865-done <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Z572 <873216071 <at> qq.com>
Cc: 61865-done <at> debbugs.gnu.org
Subject: Re: [bug#61865] [PATCH 0/8] fix some packages cross-compile
Date: Sun, 4 Jun 2023 15:20:11 +0300
[Message part 1 (text/plain, inline)]
Thanks. I pushed most of the patches.

On Tue, Feb 28, 2023 at 04:30:45PM +0800, Z572 via Guix-patches via wrote:
> Hello, guix.
> 
> This patchset fix some package cross-compile.
> 
> Zheng Junjie (8):
>   gnu: xcb-util-wm: fix riscv64 cross-compile.
>   gnu: libxv: fix riscv64 cross-compile.
>   gnu: libxtst: fix riscv64 cross-compile.
>   gnu: mtdev: fix riscv64 cross-compile.
>   gnu: gobject-introspection: fix riscv64 cross-compile.
>   gnu: gsettings-desktop-schemas: fix cross-compile.
>   gnu: libotf: fix cross-compile.
>   gnu: librsvg-2.40: fix cross-compile.
> 
>  gnu/packages/fontutils.scm | 17 ++++++++++-
>  gnu/packages/glib.scm      |  5 +++-
>  gnu/packages/gnome.scm     |  7 +++--
>  gnu/packages/xdisorg.scm   | 20 +++++++++++--
>  gnu/packages/xorg.scm      | 59 ++++++++++++++++++++++++++++++++++----
>  5 files changed, 95 insertions(+), 13 deletions(-)
> 
> 
> base-commit: c0e9ddfa290056f137ee21a53be6be4fbb8586ea
> -- 
> 2.39.1
> 
> 
> 
> 

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 03 Jul 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 310 days ago.

Previous Next


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