all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
@ 2021-08-25 17:55 Maxime Devos
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                   ` (2 more replies)
  0 siblings, 3 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 17:55 UTC (permalink / raw)
  To: 50201

[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

Hi guix,

This patch series does two things:

  * let 'glib-or-gtk-build-system' support cross-compilation

  * fix many (but not all) cross-compilation errors that prevent
    "guix build gtk+ --target=aarch64-linux-gnu" from succeeding.

It should not cause any rebuilds.  You can test with
./pre-inst-env guix build gtk+ --target=aarch64-linux-gnu.
There is still some work to be done though:

cannot build derivation `[...]-cups-filters-1.28.9.drv': 1 dependencies couldn't be built
[...] `[...]-cups-2.3.3op2.drv': 1 dependencies couldn't be built
[...] `[...]-samba-4.13.10.drv': 6 dependencies couldn't be built
[...] `[...]-libsoup-2.72.0.drv': 4 dependencies couldn't be built
[...] `[...]-rest-0.8.1.drv': 1 dependencies couldn't be built

Greetings,
Maxime

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation.
  2021-08-25 17:55 [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Maxime Devos
@ 2021-08-25 18:02 ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 02/52] gnu: elogind: Make #:configure-flags a G-exp Maxime Devos
                     ` (50 more replies)
  2021-08-28 13:33 ` [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Mathieu Othacehe
  2021-08-30 12:19 ` Maxime Devos
  2 siblings, 51 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

This allows cross-compilation to succeed when not using
QEMU's transparent emulation, and the cross-compilation
is not a pointless cross-compilation like x86_64 -> i686.

* gnu/packages/glib.scm (dbus-glib)[arguments]: Set --with-dbus-binding-tool
  to a native version of "dbus-binding-tool" when cross-compiling.
---
 gnu/packages/glib.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index f0328498e4..fc1c5eb271 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -550,6 +550,16 @@ translated.")
               (base32
                "09g8swvc95bk1z6j8sw463p2v0dqmgm2zjfndf7i8sbcyq67dr3w"))))
     (build-system gnu-build-system)
+    (arguments
+     (if (%current-target-system)
+         `(#:configure-flags
+           ;; Run a native 'dbus-binding-tool' instead of a cross-compiled
+           ;; 'dbus-binding-tool' when cross-compiling.
+           ,#~(list
+               (string-append
+                "--with-dbus-binding-tool="
+                #+(file-append this-package "/bin/dbus-binding-tool"))))
+         '()))
     (propagated-inputs ; according to dbus-glib-1.pc
      `(("dbus" ,dbus)
        ("glib" ,glib)))
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 02/52] gnu: elogind: Make #:configure-flags a G-exp.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 03/52] gnu: elogind: Fix cross-compilation Maxime Devos
                     ` (49 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/freedesktop.scm
  (elogind)[arguments]{configure-flags}: Let this be a G-exp.
---
 gnu/packages/freedesktop.scm | 56 +++++++++++++++++++-----------------
 1 file changed, 29 insertions(+), 27 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index a7766edf04..e0f5623805 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -24,6 +24,7 @@
 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
 ;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
 ;;; Copyright © 2021 pineapples <guixuser6392@protonmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,6 +46,7 @@
   #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -578,33 +580,33 @@ the freedesktop.org XDG Base Directory specification.")
     (build-system meson-build-system)
     (arguments
      `(#:configure-flags
-       (let* ((out (assoc-ref %outputs "out"))
-              (sysconf (string-append out "/etc"))
-              (libexec (string-append out "/libexec/elogind"))
-              (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
-              (shadow (assoc-ref %build-inputs "shadow"))
-              (shepherd (assoc-ref %build-inputs "shepherd"))
-              (halt-path (string-append shepherd "/sbin/halt"))
-              (kexec-path "")           ;not available in Guix yet
-              (nologin-path (string-append shadow "/sbin/nologin"))
-              (poweroff-path (string-append shepherd "/sbin/shutdown"))
-              (reboot-path (string-append shepherd "/sbin/reboot")))
-         (list
-          (string-append "-Drootprefix=" out)
-          (string-append "-Dsysconfdir=" sysconf)
-          (string-append "-Drootlibexecdir=" libexec)
-          (string-append "-Ddbuspolicydir=" dbuspolicy)
-          (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
-          (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
-          (string-append "-Dhalt-path=" halt-path)
-          (string-append "-Dkexec-path=" kexec-path)
-          (string-append "-Dpoweroff-path=" poweroff-path)
-          (string-append "-Dreboot-path=" reboot-path)
-          (string-append "-Dnologin-path=" nologin-path)
-          "-Dcgroup-controller=elogind"
-          "-Dman=true"
-          ;; Disable some tests.
-          "-Dslow-tests=false"))
+       ,#~(let* ((out (assoc-ref %outputs "out"))
+                 (sysconf (string-append out "/etc"))
+                 (libexec (string-append out "/libexec/elogind"))
+                 (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
+                 (shadow (assoc-ref %build-inputs "shadow"))
+                 (shepherd (assoc-ref %build-inputs "shepherd"))
+                 (halt-path (string-append shepherd "/sbin/halt"))
+                 (kexec-path "")           ;not available in Guix yet
+                 (nologin-path (string-append shadow "/sbin/nologin"))
+                 (poweroff-path (string-append shepherd "/sbin/shutdown"))
+                 (reboot-path (string-append shepherd "/sbin/reboot")))
+            (list
+             (string-append "-Drootprefix=" out)
+             (string-append "-Dsysconfdir=" sysconf)
+             (string-append "-Drootlibexecdir=" libexec)
+             (string-append "-Ddbuspolicydir=" dbuspolicy)
+             (string-append "-Dc_link_args=-Wl,-rpath=" libexec)
+             (string-append "-Dcpp_link_args=-Wl,-rpath=" libexec)
+             (string-append "-Dhalt-path=" halt-path)
+             (string-append "-Dkexec-path=" kexec-path)
+             (string-append "-Dpoweroff-path=" poweroff-path)
+             (string-append "-Dreboot-path=" reboot-path)
+             (string-append "-Dnologin-path=" nologin-path)
+             "-Dcgroup-controller=elogind"
+             "-Dman=true"
+             ;; Disable some tests.
+             "-Dslow-tests=false"))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'fix-pkttyagent-path
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 03/52] gnu: elogind: Fix cross-compilation.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 02/52] gnu: elogind: Make #:configure-flags a G-exp Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 04/52] gnu: libcap: Fix cross-compilation build failures Maxime Devos
                     ` (48 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

%build-inputs and friends don't exist when cross-compiling,
so use some G-expology instead.

* gnu/packages/freedesktop.scm (elogind)[arguments]<#:configure-flags>:
  Don't use '%outputs' or '%build-inputs' when cross-compiling.
---
 gnu/packages/freedesktop.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index e0f5623805..0f6bb72a1f 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -580,12 +580,20 @@ the freedesktop.org XDG Base Directory specification.")
     (build-system meson-build-system)
     (arguments
      `(#:configure-flags
-       ,#~(let* ((out (assoc-ref %outputs "out"))
+       ;; TODO(core-updates): Use #$output unconditionally.
+       ,#~(let* ((out #$(if (%current-target-system)
+                            #~#$output
+                            #~(assoc-ref %outputs "out")))
                  (sysconf (string-append out "/etc"))
                  (libexec (string-append out "/libexec/elogind"))
                  (dbuspolicy (string-append out "/etc/dbus-1/system.d"))
-                 (shadow (assoc-ref %build-inputs "shadow"))
-                 (shepherd (assoc-ref %build-inputs "shepherd"))
+                 ;; TODO(core-updates): use this-package-input unconditionally.
+                 (shadow #$(if (%current-target-system)
+                               (this-package-input "shadow")
+                               #~(assoc-ref %build-inputs "shadow")))
+                 (shepherd #$(if (%current-target-system)
+                                 (this-package-input "shepherd")
+                                 #~(assoc-ref %build-inputs "shepherd")))
                  (halt-path (string-append shepherd "/sbin/halt"))
                  (kexec-path "")           ;not available in Guix yet
                  (nologin-path (string-append shadow "/sbin/nologin"))
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 04/52] gnu: libcap: Fix cross-compilation build failures.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 02/52] gnu: elogind: Make #:configure-flags a G-exp Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 03/52] gnu: elogind: Fix cross-compilation Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 05/52] gnu: perl: Find 'bash' when cross-compiling Maxime Devos
                     ` (47 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/linux.scm
  (libcap)[arguments]<#:phases>{configure}: Don't use non-existent
  '%output' when cross-compiling.
  (libcap)[arguments]<#:make-flags>: Set "CROSS_COMPILE" and "BUILD_CC"
  when cross-compiling.
---
 gnu/packages/linux.scm | 38 +++++++++++++++++++++++++-------------
 1 file changed, 25 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1f52bccee8..0dd8cf4ed4 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -2812,20 +2812,32 @@ configuration (iptunnel, ipmaddr).")
               (base32
                "1ych13qc1mvzv8iscbims5b317vxcmy5ffpmfy98zk7bgamz62b6"))))
     (build-system gnu-build-system)
-    (arguments '(#:phases
-                 (modify-phases %standard-phases
-                   (replace 'configure
-                            ;; Add $libdir to the RUNPATH of executables.
-                            (lambda _
-                              (substitute* "Make.Rules"
-                                (("LDFLAGS \\?= #-g")
-                                 (string-append "LDFLAGS ?= -Wl,-rpath="
-                                                %output "/lib"))))))
+    (arguments `(#:phases
+                 ,#~(modify-phases %standard-phases
+                      (replace 'configure
+                        ;; Add $libdir to the RUNPATH of executables.
+                        (lambda _
+                          (substitute* "Make.Rules"
+                            (("LDFLAGS \\?= #-g")
+                             (string-append "LDFLAGS ?= -Wl,-rpath="
+                                            ;; TODO(core-updates): Use #$output
+                                            ;; unconditionally.
+                                            #$(if (%current-target-system)
+                                                  #~#$output
+                                                  '%output)
+                                            "/lib"))))))
                  #:test-target "test"
-                 #:make-flags (list "lib=lib"
-                                    (string-append "prefix="
-                                                   (assoc-ref %outputs "out"))
-                                    "RAISE_SETFCAP=no")))
+                 #:make-flags
+                 (list "lib=lib"
+                       (string-append "prefix=" (assoc-ref %outputs "out"))
+                       "RAISE_SETFCAP=no"
+                       ;; Tell the makefile to use TARGET-gcc and friends
+                       ;; when cross-compiling.
+                       ,@(if (%current-target-system)
+                             `(,(string-append "CROSS_COMPILE="
+                                               (%current-target-system) "-")
+                               "BUILD_CC=gcc")
+                             '()))))
     (native-inputs `(("perl" ,perl)))
     (supported-systems (delete "i586-gnu" %supported-systems))
     (home-page "https://sites.google.com/site/fullycapable/")
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 05/52] gnu: perl: Find 'bash' when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (2 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 04/52] gnu: libcap: Fix cross-compilation build failures Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 06/52] gnu: nspr: Adjust to Mozilla cross-compilation conventions Maxime Devos
                     ` (46 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/perl.scm
  (perl)[arguments]<#:phases>{unpack-cross}: Search for "bash" with
  'search-input-file' instead of 'assoc-ref'.
  (perl)[arguments]<#:phases>{configure}: Search for "bash-minimal"
  instead of "bash".
---
 gnu/packages/perl.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 99a152e0ab..c548fe3350 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -31,6 +31,7 @@
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -142,15 +143,15 @@
                        (rename-file "Artistic" "Artistic.perl")
                        (rename-file "Copying" "Copying.perl")
                        (copy-recursively cross-checkout "."))
-                     (let ((bash (assoc-ref inputs "bash")))
+                     (let ((bash (search-input-file inputs "bin/bash")))
                        (substitute* '("Makefile.config.SH"
                                       "cnf/config.guess"
                                       "cnf/config.sub"
                                       "cnf/configure"
                                       "cnf/configure_misc.sh"
                                       "miniperl_top")
-                         (("! */bin/sh") (string-append "! " bash "/bin/bash"))
-                         ((" /bin/sh") (string-append bash "/bin/bash")))
+                         (("! */bin/sh") (string-append "! " bash))
+                         ((" /bin/sh") bash))
                        (substitute* '("ext/Errno/Errno_pm.PL")
                          (("\\$cpp < errno.c") "$Config{cc} -E errno.c")))))
                  (replace 'configure
@@ -168,7 +169,7 @@
                                        (lambda (x) (or (string-prefix? "-d" x)
                                                        (string-prefix? "-Dcc=" x))))
                                       configure-flags)))
-                            (bash (assoc-ref inputs "bash")))
+                            (bash (assoc-ref inputs "bash-minimal")))
                        (format (current-error-port)
                                "running ./configure ~a\n"
                                (string-join configure-flags))
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 06/52] gnu: nspr: Adjust to Mozilla cross-compilation conventions.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (3 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 05/52] gnu: perl: Find 'bash' when cross-compiling Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 07/52] gnu: nspr: Don't retain references to native inputs Maxime Devos
                     ` (45 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/nss.scm
  (nspr)[arguments]<#:configure-flags>: Set --host and --target
  inappropriately when cross-compiling.
---
 gnu/packages/nss.scm | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index 55eddc0c91..6560aede56 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -51,11 +52,20 @@
      `(("perl" ,perl)))
     (arguments
      `(#:tests? #f ; no check target
-       #:configure-flags (list "--disable-static"
-                               "--enable-64bit"
-                               (string-append "LDFLAGS=-Wl,-rpath="
-                                              (assoc-ref %outputs "out")
-                                              "/lib"))
+       #:configure-flags
+       (list "--disable-static"
+             "--enable-64bit"
+             (string-append "LDFLAGS=-Wl,-rpath="
+                            (assoc-ref %outputs "out") "/lib")
+             ;; Mozilla deviates from Autotools conventions
+             ;; due to historical reasons.  Adjust to Mozilla conventions,
+             ;; otherwise the Makefile will try to use TARGET-gcc
+             ;; as a ‘native’ compiler.
+             ,@(if (%current-target-system)
+                   `(,(string-append "--host="
+                                     (nix-system->gnu-triplet (%current-system)))
+                     ,(string-append "--target=" (%current-target-system)))
+                   '()))
        ;; Use fixed timestamps for reproducibility.
        #:make-flags '("SH_DATE='1970-01-01 00:00:01'"
                       ;; This is epoch 1 in microseconds.
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 07/52] gnu: nspr: Don't retain references to native inputs.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (4 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 06/52] gnu: nspr: Adjust to Mozilla cross-compilation conventions Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 08/52] gnu: mozjs-60: Fix cross-compilation build errors Maxime Devos
                     ` (44 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/nss.scm
  (nspr)[inputs]: Add 'perl' and 'bash-minimal' when cross-compiling.
  (nspr)[arguments]{#:disallowed-references}: Add native 'perl' when
  cross-compiling.
---
 gnu/packages/nss.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index 6560aede56..381756e387 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -26,10 +26,12 @@
 (define-module (gnu packages nss)
   #:use-module (guix packages)
   #:use-module (guix utils)
+  #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages perl)
@@ -48,10 +50,24 @@
               (base32
                "1j5b2m8cjlhnnv8sq34587avaagkqvh521w4f95miwgvsn3xlaap"))))
     (build-system gnu-build-system)
+    (inputs
+     ;; TODO(core-updates): Make these inputs unconditional.
+     ;; For 'compile-et.pl' and 'nspr-config'.
+     (if (%current-target-system)
+         `(("perl" ,perl) ; for 'compile-et.pl'
+           ("bash-minimal" ,bash-minimal)) ; for 'nspr-config'
+         '()))
     (native-inputs
      `(("perl" ,perl)))
     (arguments
-     `(#:tests? #f ; no check target
+     `(;; Prevent the 'native' perl from sneaking into the closure.
+       ;; XXX it would be nice to do the same for 'bash-minimal',
+       ;; but using 'canonical-package' causes loops.
+       ,@(if (%current-target-system)
+             `(#:disallowed-references
+               (,(gexp-input (this-package-native-input "perl") #:native? #t)))
+             '())
+       #:tests? #f ; no check target
        #:configure-flags
        (list "--disable-static"
              "--enable-64bit"
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 08/52] gnu: mozjs-60: Fix cross-compilation build errors.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (5 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 07/52] gnu: nspr: Don't retain references to native inputs Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 09/52] gnu: poppler: Find pkg-config when cross-compiling Maxime Devos
                     ` (43 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

Presumably the other versions of mozjs need some changes
as well, but for now only fix mozjs@60, which is a dependency
of polkit.

* gnu/packages/gnuzilla.scm
  (mozjs-60)[arguments]<#:configure-flags>: Set --with-nspr-prefix
  and set --host and --target inappropriately when cross-compiling.
  (mozjs-60)[arguments]<#:phases>{set-PKG_CONFIG}: New phase
  when cross-compiling.
---
 gnu/packages/gnuzilla.scm | 51 ++++++++++++++++++++++++++++-----------
 1 file changed, 37 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index a4d193ce11..df1926dc51 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2019, 2020 Adrian Malacoda <malacoda@monarch-pass.net>
 ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
 ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -367,22 +368,44 @@ in C/C++.")
      `(#:tests? #f ; FIXME: all tests pass, but then the check phase fails anyway.
        #:test-target "check-jstests"
        #:configure-flags
-       '("--enable-ctypes"
-         "--enable-optimize"
-         "--enable-pie"
-         "--enable-readline"
-         "--enable-shared-js"
-         "--enable-system-ffi"
-         "--with-system-nspr"
-         "--with-system-zlib"
-         "--with-system-icu"
-         "--with-intl-api"
-         ;; This is important because without it gjs will segfault during the
-         ;; configure phase.  With jemalloc only the standalone mozjs console
-         ;; will work.
-         "--disable-jemalloc")
+       ;; TODO(core-updates): unconditionally use 'quasiquote
+       ,#~(#$(if (%current-target-system)
+                 #~quasiquote
+                 #~quote)
+           ("--enable-ctypes"
+            "--enable-optimize"
+            "--enable-pie"
+            "--enable-readline"
+            "--enable-shared-js"
+            "--enable-system-ffi"
+            "--with-system-nspr"
+            #$@(if (%current-target-system)
+                   #~(,(string-append "--with-nspr-prefix="
+                                      #$(this-package-input "nspr")))
+                   #~())
+            "--with-system-zlib"
+            "--with-system-icu"
+            "--with-intl-api"
+            ;; This is important because without it gjs will segfault during the
+            ;; configure phase.  With jemalloc only the standalone mozjs console
+            ;; will work.
+            "--disable-jemalloc"
+            ;; Mozilla deviates from Autotools conventions due to historical
+            ;; reasons.
+            #$@(if (%current-target-system)
+                   #~(#$(string-append
+                         "--host="
+                         (nix-system->gnu-triplet (%current-system)))
+                      #$(string-append "--target=" (%current-target-system)))
+                   #~())))
        #:phases
        (modify-phases %standard-phases
+         ;; Make sure pkg-config will be found.
+         ,@(if (%current-target-system)
+               `((add-before 'configure 'set-PKG-CONFIG
+                   (lambda _
+                     (setenv "PKG_CONFIG" ,(pkg-config-for-target)))))
+               '())
          (replace 'configure
            (lambda* (#:key inputs outputs configure-flags #:allow-other-keys)
              ;; The configure script does not accept environment variables as
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 09/52] gnu: poppler: Find pkg-config when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (6 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 08/52] gnu: mozjs-60: Fix cross-compilation build errors Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 10/52] build-system/meson: Allow 'configure-flags' to be a G-exp Maxime Devos
                     ` (42 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/pdf.scm
  (poppler)[arguments]<#:phases>{set-PKG_CONFIG}: New phase.
---
 gnu/packages/pdf.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 8e2cebe490..1a3cb63352 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -264,7 +265,14 @@ please install the @code{flyer-composer-gui} package.")))
               "-DENABLE_ZLIB=ON"
               "-DENABLE_BOOST=OFF"      ;disable Boost to save size
               (string-append "-DCMAKE_INSTALL_LIBDIR=" lib)
-              (string-append "-DCMAKE_INSTALL_RPATH=" lib)))))
+              (string-append "-DCMAKE_INSTALL_RPATH=" lib)))
+      ,@(if (%current-target-system)
+            `(#:phases
+              (modify-phases %standard-phases
+                (add-after 'unpack 'set-PKG_CONFIG
+                  (lambda _
+                    (setenv "PKG_CONFIG" ,(pkg-config-for-target))))))
+            '())))
    (synopsis "PDF rendering library")
    (description
     "Poppler is a PDF rendering library based on the xpdf-3.0 code base.")
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 10/52] build-system/meson: Allow 'configure-flags' to be a G-exp.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (7 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 09/52] gnu: poppler: Find pkg-config when cross-compiling Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 11/52] build-system/glib-or-gtk: Support cross-compilaton Maxime Devos
                     ` (41 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* guix/build-system/meson.scm
  (meson-build, meson-cross-build): Only call 'sexp->gexp' on
  'configure-flags' when 'configure-flags' is a pair.
---
 guix/build-system/meson.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index dae0abde94..dcad3f322d 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -212,7 +212,10 @@ has a 'meson.build' file."
                                                 (map search-path-specification->sexp
                                                      search-paths))
                              #:phases build-phases
-                             #:configure-flags #$(sexp->gexp configure-flags)
+                             #:configure-flags
+                             #$(if (pair? configure-flags)
+                                   (sexp->gexp configure-flags)
+                                   configure-flags)
                              #:build-type #$build-type
                              #:tests? #$tests?
                              #:test-target #$test-target
@@ -309,7 +312,9 @@ SOURCE has a 'meson.build' file."
                        #:phases build-phases
                        #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
                        #:configure-flags `("--cross-file" #+cross-file
-                                           ,@#$(sexp->gexp configure-flags))
+                                           ,@#$(if (pair? configure-flags)
+                                                   (sexp->gexp configure-flags)
+                                                   configure-flags))
                        #:build-type #$build-type
                        #:tests? #$tests?
                        #:test-target #$test-target
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 11/52] build-system/glib-or-gtk: Support cross-compilaton.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (8 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 10/52] build-system/meson: Allow 'configure-flags' to be a G-exp Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 12/52] gnu: dbus-cairo: Add missing bash-minimal input Maxime Devos
                     ` (40 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* guix/build-system/glib-or-gtk.scm
  (lower): Add 'implicit-cross-inputs?' argument.  Generate a bag
  when cross-compiling.
  (glib-or-gtk-cross-build): New procedure.
---
 guix/build-system/glib-or-gtk.scm | 146 ++++++++++++++++++++++++++----
 1 file changed, 127 insertions(+), 19 deletions(-)

diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm
index 2df49a2495..ec491ff0bd 100644
--- a/guix/build-system/glib-or-gtk.scm
+++ b/guix/build-system/glib-or-gtk.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
 ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -31,6 +32,7 @@
   #:use-module (ice-9 match)
   #:export (%glib-or-gtk-build-system-modules
             glib-or-gtk-build
+            glib-or-gtk-cross-build
             glib-or-gtk-build-system))
 
 ;; Commentary:
@@ -82,30 +84,42 @@
                 #:key source inputs native-inputs outputs system target
                 (glib (default-glib))
                 (implicit-inputs? #t)
+                (implicit-cross-inputs? #t)
                 (strip-binaries? #t)
                 #:allow-other-keys
                 #:rest arguments)
   "Return a bag for NAME."
   (define private-keywords
-    '(#:target #:glib #:inputs #:native-inputs
-      #:outputs #:implicit-inputs?))
-
-  (and (not target)                               ;XXX: no cross-compilation
-       (bag
-         (name name)
-         (system system)
-         (host-inputs (if source
-                          `(("source" ,source))
-                          '()))
-         (build-inputs `(,@native-inputs
-                         ,@inputs
-                         ("glib:bin" ,glib "bin") ; to compile schemas
-                         ,@(if implicit-inputs?
-                               (standard-packages)
-                               '())))
-         (outputs outputs)
-         (build glib-or-gtk-build)
-         (arguments (strip-keyword-arguments private-keywords arguments)))))
+    `(#:glib #:inputs #:native-inputs
+      #:outputs #:implicit-inputs? #:implicit-cross-inputs?
+      ,@(if target '() '(#:target))))
+
+  (bag
+    (name name)
+    (system system) (target target)
+    (host-inputs `(,@(if source
+                         `(("source" ,source))
+                         '())
+                   ,@(if target
+                         inputs
+                         '())))
+    (build-inputs `(,@native-inputs
+                    ,@(if target '() inputs)
+                    ("glib:bin" ,glib "bin") ; to compile schemas
+                    ;; Keep standard inputs of gnu-build-system.
+                    ,@(if (and target implicit-cross-inputs?)
+                          (standard-cross-packages target 'host)
+                          '())
+                    ,@(if implicit-inputs?
+                          (standard-packages)
+                          '())))
+    ;; Keep standard inputs of 'gnu-build-system'.
+    (target-inputs (if (and target implicit-cross-inputs?)
+                       (standard-cross-packages target 'target)
+                       '()))
+    (outputs outputs)
+    (build (if target glib-or-gtk-cross-build glib-or-gtk-build))
+    (arguments (strip-keyword-arguments private-keywords arguments))))
 
 (define* (glib-or-gtk-build name inputs
                             #:key guile source
@@ -176,6 +190,100 @@
                       #:disallowed-references disallowed-references
                       #:guile-for-build guile)))
 
+(define* (glib-or-gtk-cross-build name
+                                  #:key
+                                  target
+                                  build-inputs target-inputs host-inputs
+                                  guile source
+                                  (outputs '("out"))
+                                  (search-paths '())
+                                  (native-search-paths '())
+                                  (configure-flags ''())
+                                  ;; Disable icon theme cache generation.
+                                  (make-flags ''("gtk_update_icon_cache=true"))
+                                  (out-of-source? #f)
+                                  (tests? #f)
+                                  (test-target "check")
+                                  (parallel-build? #t)
+                                  (parallel-tests? #t)
+                                  (validate-runpath? #t)
+                                  (make-dynamic-linker-cache? #f)
+                                  (patch-shebangs? #t)
+                                  (strip-binaries? #t)
+                                  (strip-flags ''("--strip-debug"))
+                                  (strip-directories ''("lib" "lib64" "libexec"
+                                                        "bin" "sbin"))
+                                  (phases '(@ (guix build glib-or-gtk-build-system)
+                                              %standard-phases))
+                                  (glib-or-gtk-wrap-excluded-outputs ''())
+                                  (system (%current-system))
+                                  (build (nix-system->gnu-triplet system))
+                                  (imported-modules %glib-or-gtk-build-system-modules)
+                                  (modules %default-modules)
+                                  allowed-references
+                                  disallowed-references)
+  "Cross-build SOURCE with INPUTS.  See GNU-BUILD for more details."
+  (define builder
+    #~(begin
+        (use-modules #$@(sexp->gexp modules))
+
+        (define %build-host-inputs
+          #+(input-tuples->gexp build-inputs))
+
+        (define %build-target-inputs
+          (append #$(input-tuples->gexp host-inputs)
+                  #+(input-tuples->gexp target-inputs)))
+
+        (define %build-inputs
+          (append %build-host-inputs %build-target-inputs))
+
+        (define %outputs
+          #$(outputs->gexp outputs))
+
+        (glib-or-gtk-build #:source #+source
+                           #:system #$system
+                           #:build #$build
+                           #:target #$target
+                           #:outputs %outputs
+                           #:inputs %build-target-inputs
+                           #:native-inputs %build-host-inputs
+                           #:search-paths '#$(sexp->gexp
+                                              (map search-path-specification->sexp
+                                                   search-paths))
+                           #:native-search-paths '#$(sexp->gexp
+                                                     (map search-path-specification->sexp
+                                                          native-search-paths))
+                           #:phases #$(if (pair? phases)
+                                          (sexp->gexp phases)
+                                          phases)
+                           #:glib-or-gtk-wrap-excluded-outputs
+                           #$glib-or-gtk-wrap-excluded-outputs
+                           #:configure-flags #$configure-flags
+                           #:make-flags #$make-flags
+                           #:out-of-source? #$out-of-source?
+                           #:tests? #$tests?
+                           #:test-target #$test-target
+                           #:parallel-build? #$parallel-build?
+                           #:parallel-tests? #$parallel-tests?
+                           #:validate-runpath? #$validate-runpath?
+                           #:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
+                           #:patch-shebangs? #$patch-shebangs?
+                           #:strip-binaries? #$strip-binaries?
+                           #:strip-flags #$(sexp->gexp strip-flags)
+                           #:strip-directories
+                           #$(sexp->gexp strip-directories))))
+
+
+  (mlet %store-monad ((guile (package->derivation (or guile (default-guile))
+                                                  system #:graft? #f)))
+    (gexp->derivation name builder
+                      #:system system
+                      #:target target
+                      #:modules imported-modules
+                      #:allowed-references allowed-references
+                      #:disallowed-references disallowed-references
+                      #:guile-for-build guile)))
+
 (define glib-or-gtk-build-system
   (build-system
     (name 'glib-or-gtk)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 12/52] gnu: dbus-cairo: Add missing bash-minimal input.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (9 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 11/52] build-system/glib-or-gtk: Support cross-compilaton Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 13/52] gnu: polkit: Prevent cross-compilation build error Maxime Devos
                     ` (39 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

If absent, this causes the 'glib-or-gtk-wrap' phase to fail.

* gnu/packages/glib.scm
  (cairo)[inputs]: Add "bash-minimal", but only when cross-compiling
  to avoid a world-rebuild.
---
 gnu/packages/gtk.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 24c24d5653..3470691e51 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -61,6 +61,7 @@
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages build-tools)
   #:use-module (gnu packages texinfo)
@@ -174,7 +175,11 @@ tools have full access to view and control running applications.")
        ("pkg-config" ,pkg-config)
        ("python" ,python-wrapper)))
     (inputs
-     `(("drm" ,libdrm)
+     ;; TODO(core-updates): make this unconditional
+     `(,@(if (%current-target-system)
+             `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap
+             '())
+       ("drm" ,libdrm)
        ("ghostscript" ,ghostscript)
        ("libspectre" ,libspectre)
        ("poppler" ,poppler)))
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 13/52] gnu: polkit: Prevent cross-compilation build error.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (10 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 12/52] gnu: dbus-cairo: Add missing bash-minimal input Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 14/52] gnu: gobject-introspection: Don't build introspection data when cross-compiling Maxime Devos
                     ` (38 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

Alternative ‘os types’ include RedHat and Gentoo, which
don't seem applicable.

* gnu/packages/polkit.scm (polkit)[arguments]<#:configure-flags>:
  Set "--with-os-type" to "unknown".
---
 gnu/packages/polkit.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm
index f495d51c83..585e0d8087 100644
--- a/gnu/packages/polkit.scm
+++ b/gnu/packages/polkit.scm
@@ -101,7 +101,12 @@
        ("gobject-introspection" ,gobject-introspection)))
     (arguments
      `(#:configure-flags '("--sysconfdir=/etc"
-                           "--enable-man-pages")
+                           "--enable-man-pages"
+                           ;; Prevent ‘configure: error: cannot check for
+                           ;; file existence when cross compiling’.
+                           ,@(if (%current-target-system)
+                                 '("--with-os-type=unknown")
+                                 '()))
        #:phases
        (modify-phases %standard-phases
          (add-after
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 14/52] gnu: gobject-introspection: Don't build introspection data when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (11 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 13/52] gnu: polkit: Prevent cross-compilation build error Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 15/52] gobject-introspection: Fix inputs " Maxime Devos
                     ` (37 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/glib.scm
  (gobject-introspection)[arguments]<#:configure-flags>: Set
  gi_cross_use_prebuilt_gi to 'true'.
  (gobject-introspection)[arguments]<#:phases>{set-typelibs}: New phase,
  avoid undefined variable in "meson.build".
---
 gnu/packages/glib.scm | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index fc1c5eb271..060122f42b 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -398,8 +398,28 @@ functions for strings and common data structures.")
                        "gobject-introspection-absolute-shlib-path.patch"))))
     (build-system meson-build-system)
     (arguments
-     `(#:phases
+     `(,@(if (%current-target-system)
+             `(#:configure-flags
+               '("-Dgi_cross_use_prebuilt_gi=true"
+                 ;; Building introspection data requires running binaries
+                 ;; for ‘host’ on ‘build’, so don't do that.
+                 ;;
+                 ;; TODO: it would be nice to have introspection data anyways.
+                 ;; Would copying the introspection data from a native
+                 ;; 'gobject-introspection' work, or is introspection data
+                 ;; architecture-dependent?
+                 "-Dbuild_introspection_data=false"))
+             '())
+       #:phases
        (modify-phases %standard-phases
+         ,@(if (%current-target-system)
+               ;; 'typelibs' is undefined.
+               `((add-after 'unpack 'set-typelibs
+                   (lambda _
+                     (substitute* "meson.build"
+                       (("\\bsources: typelibs\\b")
+                        "sources: []")))))
+               '())
          (add-after 'unpack 'do-not-use-/usr/bin/env
            (lambda _
              (substitute* "tools/g-ir-tool-template.in"
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 15/52] gobject-introspection: Fix inputs when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (12 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 14/52] gnu: gobject-introspection: Don't build introspection data when cross-compiling Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 16/52] gobject-introspection: Correct library name " Maxime Devos
                     ` (36 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/glib.scm
  (gobject-introspection)[native-inputs]: Add 'bison' and 'flex'
  when cross-compiling.
  (gobject-introspection)[inputs]: Use 'python' instead of 'python-wrapper'
  when cross-compiling.  Remove 'bison', 'flex' when cross-compiling.
---
 gnu/packages/glib.scm | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 060122f42b..ac38cd40d2 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -428,11 +428,19 @@ functions for strings and common data structures.")
              #t)))))
     (native-inputs
      `(("glib" ,glib "bin")
-       ("pkg-config" ,pkg-config)))
+       ("pkg-config" ,pkg-config)
+       ;; TODO(core-updates): Unconditionally place "flex" and "bison"
+       ;; in 'native-inputs'.
+       ,@(if (%current-target-system)
+             `(("bison" ,bison)
+               ("flex" ,flex))
+             '())))
     (inputs
-     `(("bison" ,bison)
-       ("flex" ,flex)
-       ("python" ,python-wrapper)
+     `(,@(if (%current-target-system)
+             `(("python" ,python))
+             `(("bison" ,bison)
+               ("flex" ,flex)
+               ("python" ,python-wrapper)))
        ("zlib" ,zlib)))
     (propagated-inputs
      `(("glib" ,glib)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 16/52] gobject-introspection: Correct library name when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (13 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 15/52] gobject-introspection: Fix inputs " Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-30 12:58     ` [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Mathieu Othacehe
  2021-08-25 18:02   ` [bug#50201] [PATCH 17/52] gnu: atk: Disable introspection when cross-compiling Maxime Devos
                     ` (35 subsequent siblings)
  50 siblings, 1 reply; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/glib.scm
  (gobject-introspection)[arguments]<#:phases>{rename-library}:
  Correct the name of the python extension when cross-compiling.
---
 gnu/packages/glib.scm | 37 ++++++++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index ac38cd40d2..0c2f548f62 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -411,21 +411,40 @@ functions for strings and common data structures.")
                  "-Dbuild_introspection_data=false"))
              '())
        #:phases
+       ,#~
        (modify-phases %standard-phases
-         ,@(if (%current-target-system)
-               ;; 'typelibs' is undefined.
-               `((add-after 'unpack 'set-typelibs
-                   (lambda _
-                     (substitute* "meson.build"
-                       (("\\bsources: typelibs\\b")
-                        "sources: []")))))
-               '())
+         #$@(if (%current-target-system)
+                ;; 'typelibs' is undefined.
+                `((add-after 'unpack 'set-typelibs
+                    (lambda _
+                      (substitute* "meson.build"
+                        (("\\bsources: typelibs\\b")
+                         "sources: []")))))
+                '())
          (add-after 'unpack 'do-not-use-/usr/bin/env
            (lambda _
              (substitute* "tools/g-ir-tool-template.in"
                (("#!@PYTHON_CMD@")
                 (string-append "#!" (which "python3"))))
-             #t)))))
+             #t))
+         #$@(if (%current-target-system)
+               ;; Meson gives python extensions an incorrect name, see
+               ;; <https://github.com/mesonbuild/meson/issues/7049>.
+                #~((add-after 'install 'rename-library
+                     (lambda* (#:key build target #:allow-other-keys)
+                       (define dir
+                         (string-append #$output
+                                        "/lib/gobject-introspection/giscanner"))
+                       ;; python uses strings like 'x86_64-linux-gnu', not
+                       ;; 'x86_64-unknown-linux-gnu'.
+                       (define (normalise-system system)
+                         ((@ (ice-9 string-fun) string-replace-substring)
+                          system "-unknown-" "-"))
+                       (define (extension system)
+                         (string-append dir "/_giscanner.cpython-39-"
+                                        (normalise-system system) ".so"))
+                       (rename-file (extension build) (extension target)))))
+                #~()))))
     (native-inputs
      `(("glib" ,glib "bin")
        ("pkg-config" ,pkg-config)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 17/52] gnu: atk: Disable introspection when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (14 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 16/52] gobject-introspection: Correct library name " Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-30 13:00     ` [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Mathieu Othacehe
  2021-08-25 18:02   ` [bug#50201] [PATCH 18/52] gnu: bdb: Fix cross-compilation build errors Maxime Devos
                     ` (34 subsequent siblings)
  50 siblings, 1 reply; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gtk.scm
  (atk)[arguments]<#:configure-flags>: Set -Dintrospection=false
  when cross-compiling.
---
 gnu/packages/gtk.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 3470691e51..7ca1161844 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -27,6 +27,7 @@
 ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -120,7 +121,13 @@
                 "1217cmmykjgkkim0zr1lv5j13733m4w5vipmy4ivw0ll6rz28xpv"))))
     (build-system meson-build-system)
     (arguments
-     `(#:glib-or-gtk? #t))  ; To wrap binaries and/or compile schemas
+     `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas
+       ,@(if (%current-target-system)
+             `(#:configure-flags
+               ;; introspection requires running binaries for the host system
+               ;; on the build system.
+               '("-Dintrospection=false"))
+             '())))
     (propagated-inputs `(("glib" ,glib))) ; required by atk.pc
     (native-inputs
      `(("gettext" ,gettext-minimal)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 18/52] gnu: bdb: Fix cross-compilation build errors.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (15 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 17/52] gnu: atk: Disable introspection when cross-compiling Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:02   ` [bug#50201] [PATCH 19/52] gnu: graphene: Don't build introspection data when cross-compiling Maxime Devos
                     ` (33 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/dbm.scm
  (bdb-4.8)[arguments]<#:phases>{update-config.sub}: Update 'config.sub'
  when cross-compiling for 'powerpc64le' or 'aarch64'.
---
 gnu/packages/dbm.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm
index ce84ef9eda..607e4aecf8 100644
--- a/gnu/packages/dbm.scm
+++ b/gnu/packages/dbm.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,6 +25,7 @@
 
 (define-module (gnu packages dbm)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -57,6 +59,19 @@
        #:disallowed-references ("doc")
        #:phases
        (modify-phases %standard-phases
+         ;; The configure script is too old to recognise aarch64 and
+         ;; powerpc64le as valid architectures.  The trick below works
+         ;; for "--build", but not for "--host", so update config.sub.
+         ,@(if (and (%current-target-system)
+                    (or (target-ppc64le? (%current-target-system))
+                        (target-aarch64? (%current-target-system))))
+               `((add-after 'unpack 'update-config.sub
+                   (lambda* (#:key native-inputs #:allow-other-keys)
+                     (delete-file "dist/config.sub")
+                     (symlink
+                      (search-input-file native-inputs "/bin/config.sub")
+                      "dist/config.sub"))))
+               '())
          (replace 'configure
            (lambda* (#:key target outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))
@@ -97,6 +112,12 @@
                        ;; of db_cxx.h into C++ files works; it leads to
                        ;; HAVE_CXX_STDHEADERS being defined in db_cxx.h.
                        "--enable-cxx")))))))
+    (native-inputs
+     (if (and (%current-target-system)
+              (or (target-ppc64le? (%current-target-system))
+                  (target-aarch64? (%current-target-system))))
+         `(("config" ,config)) ; for config.sub
+         '()))
     (synopsis "Berkeley database")
     (description
      "Berkeley DB is an embeddable database allowing developers the choice of
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 19/52] gnu: graphene: Don't build introspection data when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (16 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 18/52] gnu: bdb: Fix cross-compilation build errors Maxime Devos
@ 2021-08-25 18:02   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 20/52] gnu: gamin: Recognise aarch64 as architecture " Maxime Devos
                     ` (32 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:02 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gtk.scm (graphene)[arguments]<#:configure-flags>: Set
  introspection=false when cross-compiling.
---
 gnu/packages/gtk.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 7ca1161844..cd764da7f3 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -2287,7 +2287,11 @@ Parcellite and adds bugfixes and features.")
      `(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
        #:configure-flags
        (list
-        "-Dinstalled_tests=false")))
+        "-Dinstalled_tests=false"
+        ,@(if (%current-target-system)
+              ;; Introspection requires running binaries for 'host' on 'build'.
+              '("-Dintrospection=false")
+              '()))))
     (native-inputs
      `(("git" ,git-minimal)
        ("gobject-introspection" ,gobject-introspection)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 20/52] gnu: gamin: Recognise aarch64 as architecture when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (17 preceding siblings ...)
  2021-08-25 18:02   ` [bug#50201] [PATCH 19/52] gnu: graphene: Don't build introspection data when cross-compiling Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 21/52] gnu: gamin: Fix 'configure' script " Maxime Devos
                     ` (31 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gnome.scm
  (gamin)[arguments]<#:phases>{replace-config.sub}: Update 'config.sub'
  when cross-compiling.
  (gamin)[native-inputs]: Add "config" when cross-compiling.
---
 gnu/packages/gnome.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index b23fe4a662..c9ccfad6f2 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -60,6 +60,7 @@
 ;;; Copyright © 2020, 2021 Sébastien Lerique <sl@eauchat.org>
 ;;; Copyright © 2021 Trevor Hass <thass@okstate.edu>
 ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -11073,6 +11074,13 @@ repository and commit your work.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         ;; The 'config.sub' is too old to recognise aarch64.
+         ,@(if (and=> (%current-target-system) target-aarch64?)
+               `((add-after 'unpack 'replace-config.sub
+                   (lambda _
+                     (delete-file "config.sub")
+                     (symlink (which "config.sub") "config.sub"))))
+               '())
          (add-after 'unpack 'remove-deprecated-macro
            (lambda _
              (substitute* '("server/gam_node.c"
@@ -11084,7 +11092,10 @@ repository and commit your work.")
     (inputs
      `(("glib" ,glib)))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("pkg-config" ,pkg-config)
+       ,@(if (and=> (%current-target-system) target-aarch64?)
+             `(("config" ,config))
+             '())))
     (home-page "https://people.gnome.org/~veillard/gamin/")
     (synopsis "File alteration monitor")
     (description
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 21/52] gnu: gamin: Fix 'configure' script when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (18 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 20/52] gnu: gamin: Recognise aarch64 as architecture " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 22/52] gnu: iso-codes: Move inputs to native-inputs " Maxime Devos
                     ` (30 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gnome.scm
  (gamin)[arguments]<#:phases>{set-have-abstract-sockets}: Override
  test for ‘abstract sockets’ when cross-compiling.
---
 gnu/packages/gnome.scm | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index c9ccfad6f2..3f7dcb7988 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -11088,7 +11088,31 @@ repository and commit your work.")
                             "server/gam_node.h"
                             "server/gam_subscription.c")
                (("G_CONST_RETURN") "const"))
-             #t)))))
+             #t))
+         ;; The configure script runs a test program unconditionally,
+         ;; without an option to manually set the test result.
+         ;; Override this test anyway.
+         ,@(if (%current-target-system)
+               `((add-after 'bootstrap 'set-have-abstract-sockets
+                   (lambda _
+                     (define in-abstract-sockets-test? #f)
+                     (substitute* "configure"
+                       (("^#### Abstract sockets\n$")
+                        (set! in-abstract-sockets-test? #t)
+                        "#### Abstract sockets\n")
+                       (("^have_abstract_sockets=no\n$")
+                        (set! in-abstract-sockets-test? #f)
+                        ;; ‘Abstract sockets’ appear to be Linux-only.
+                        (string-append "have_abstract_sockets="
+                                       ,(if (target-linux?)
+                                            "yes"
+                                            "no")
+                                       "\nif false; then\nif false; then :\n"))
+                       (("^(.*\n)$" line)
+                        (if in-abstract-sockets-test?
+                            "" ; delete
+                            line))))))
+               '()))))
     (inputs
      `(("glib" ,glib)))
     (native-inputs
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 22/52] gnu: iso-codes: Move inputs to native-inputs when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (19 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 21/52] gnu: gamin: Fix 'configure' script " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 23/52] gnu: heimdal: Fix inputs " Maxime Devos
                     ` (29 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/iso-codes.scm
  (iso-codes)[inputs]: Move "gettext", "perl" and "python" to ...
  (iso-codes)[native-inputs]: ... here when cross-compiling.
---
 gnu/packages/iso-codes.scm | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/iso-codes.scm b/gnu/packages/iso-codes.scm
index 637390d734..b2cfd3434c 100644
--- a/gnu/packages/iso-codes.scm
+++ b/gnu/packages/iso-codes.scm
@@ -44,10 +44,19 @@
               (base32
                "1q6x9c5x4x0x4q11iygldsmxdyzhz1mb4n8im76glwsgqsqyjs80"))))
     (build-system gnu-build-system)
+    ;; TODO(staging): Unconditionally move inputs to native-inputs.
+    (native-inputs
+     (if (%current-target-system)
+         `(("python" ,python-wrapper)
+           ("perl" ,perl)
+           ("gettext" ,gettext-minimal))
+         '()))
     (inputs
-     `(("gettext" ,gettext-minimal)
-       ("perl" ,perl)
-       ("python" ,python-wrapper)))
+     `(,@(if (%current-target-system)
+             '()
+             `(("gettext" ,gettext-minimal)
+               ("perl" ,perl)
+               ("python" ,python-wrapper)))))
     (synopsis "Various ISO standards")
     (description
      "This package provides lists of various ISO standards (e.g. country,
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 23/52] gnu: heimdal: Fix inputs when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (20 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 22/52] gnu: iso-codes: Move inputs to native-inputs " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 24/52] gnu: heimdal: Fix linking error " Maxime Devos
                     ` (28 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/kerberos.scm
  (heimdal)[inputs]: Add "bash-minimal" when cross-compiling.
  (heimdal)[native-inputs]: Add 'perl' when cross-compiling.
---
 gnu/packages/kerberos.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm
index 01fea23ec1..6f3491acf6 100644
--- a/gnu/packages/kerberos.scm
+++ b/gnu/packages/kerberos.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -30,6 +31,7 @@
 (define-module (gnu packages kerberos)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages dbm)
   #:use-module (gnu packages perl)
@@ -244,8 +246,15 @@ After installation, the system administrator should generate keys using
        #:parallel-tests? #f))
     (native-inputs `(("e2fsprogs" ,e2fsprogs)     ;for 'compile_et'
                      ("texinfo" ,texinfo)
-                     ("unzip" ,unzip)))           ;for tests
+                     ("unzip" ,unzip)             ;for tests
+                     ,@(if (%current-target-system)
+                           `(("perl" ,perl))
+                           '())))
     (inputs `(("readline" ,readline)
+              ;; TODO(core-updates): Make this input unconditional.
+              ,@(if (%current-target-system)
+                    `(("bash-minimal" ,bash-minimal))
+                    '())
               ("bdb" ,bdb)
               ("e2fsprogs" ,e2fsprogs)            ;for libcom_err
               ("sqlite" ,sqlite)))
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 24/52] gnu: heimdal: Fix linking error when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (21 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 23/52] gnu: heimdal: Fix inputs " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 25/52] gnu: heimdal: Refer to cross-compiled bash Maxime Devos
                     ` (27 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/kerberos.scm (heimdal)[arguments]<#:configure-flags>:
  Set ac_cv_func_getpwnam_r_posix=yes when cross-compiling.
---
 gnu/packages/kerberos.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm
index 6f3491acf6..54dd5dffc1 100644
--- a/gnu/packages/kerberos.scm
+++ b/gnu/packages/kerberos.scm
@@ -207,7 +207,7 @@ After installation, the system administrator should generate keys using
                   #t))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags (list
+     `(#:configure-flags (list
                           ;; Avoid 7 MiB of .a files.
                           "--disable-static"
 
@@ -222,8 +222,13 @@ After installation, the system administrator should generate keys using
                           ;; Do not build sqlite.
                           (string-append
                            "--with-sqlite3="
-                           (assoc-ref %build-inputs "sqlite")))
+                           (assoc-ref %build-inputs "sqlite"))
 
+                          ;; The configure script is too pessimistic.
+                          ;; Setting this also resolves a linking error.
+                          ,@(if (%current-target-system)
+                                '("ac_cv_func_getpwnam_r_posix=yes")
+                                '()))
        #:phases (modify-phases %standard-phases
                   (add-before 'configure 'pre-configure
                     (lambda _
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 25/52] gnu: heimdal: Refer to cross-compiled bash.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (22 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 24/52] gnu: heimdal: Fix linking error " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 26/52] gnu: heimdal: Use the cross-compiled bash in "su" Maxime Devos
                     ` (26 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/kerberos.scm
  (heimdal)[arguments]<#:phases>{pre-configure}: Let "appl/afsutil/pagsh.c"
  refer to the cross-compiled bash instead of the native bash when
  cross-compiling.
---
 gnu/packages/kerberos.scm | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm
index 54dd5dffc1..9afc6a363f 100644
--- a/gnu/packages/kerberos.scm
+++ b/gnu/packages/kerberos.scm
@@ -231,11 +231,24 @@ After installation, the system administrator should generate keys using
                                 '()))
        #:phases (modify-phases %standard-phases
                   (add-before 'configure 'pre-configure
-                    (lambda _
-                      (substitute* '("appl/afsutil/pagsh.c"
-                                     "tools/Makefile.in")
-                        (("/bin/sh") (which "sh")))
-                      #t))
+                    ;; TODO(core-updates): Unconditionally use the
+                    ;; %current-target-system branch.
+                    (,(if (%current-target-system)
+                          'lambda*
+                          'lambda)
+                     ,(if (%current-target-system)
+                          '(#:key inputs #:allow-other-keys)
+                          '_)
+                     ,@(if (%current-target-system)
+                           '((substitute* '("appl/afsutil/pagsh.c")
+                               (("/bin/sh")
+                                (search-input-file inputs "bin/sh")))
+                             (substitute* '("tools/Makefile.in")
+                               (("/bin/sh") (which "sh"))))
+                           '((substitute* '("appl/afsutil/pagsh.c"
+                                            "tools/Makefile.in")
+                               (("/bin/sh") (which "sh")))
+                             #t))))
                   (add-before 'check 'pre-check
                     (lambda _
                       ;; For 'getxxyyy-test'.
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 26/52] gnu: heimdal: Use the cross-compiled bash in "su".
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (23 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 25/52] gnu: heimdal: Refer to cross-compiled bash Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 27/52] gnu: heimdal: Find tools when cross-compiling Maxime Devos
                     ` (25 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/kerberos.scm
  (heimdal)[arguments]<#:phases>{pre-configure}: Replace _PATH_BSHELL
  with the cross-compiled bin/sh when cross-compiling.
---
 gnu/packages/kerberos.scm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm
index 9afc6a363f..126cdf4342 100644
--- a/gnu/packages/kerberos.scm
+++ b/gnu/packages/kerberos.scm
@@ -240,9 +240,15 @@ After installation, the system administrator should generate keys using
                           '(#:key inputs #:allow-other-keys)
                           '_)
                      ,@(if (%current-target-system)
-                           '((substitute* '("appl/afsutil/pagsh.c")
+                           '((substitute* '("appl/afsutil/pagsh.c" "appl/su/su.c")
                                (("/bin/sh")
-                                (search-input-file inputs "bin/sh")))
+                                (search-input-file inputs "bin/sh"))
+                               ;; Use the cross-compiled bash instead of the
+                               ;; native bash (XXX shouldn't _PATH_BSHELL point
+                               ;; to a cross-compiled bash?).
+                               (("_PATH_BSHELL")
+                                (string-append
+                                 "\"" (search-input-file inputs "bin/sh") "\"")))
                              (substitute* '("tools/Makefile.in")
                                (("/bin/sh") (which "sh"))))
                            '((substitute* '("appl/afsutil/pagsh.c"
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 27/52] gnu: heimdal: Find tools when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (24 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 26/52] gnu: heimdal: Use the cross-compiled bash in "su" Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 28/52] gnu: heimdal: Use libcom_err from input " Maxime Devos
                     ` (24 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/kerberos.scm
  (heimdal)[arguments]<#:configure-flags>: Set --with-cross-tools.
  (heimdal)[arguments]<#:phases>{pre-configure}: Override
  ac_cv_PROG_COMPILE_ET.
---
 gnu/packages/kerberos.scm | 51 ++++++++++++++++++++++++---------------
 1 file changed, 32 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm
index 126cdf4342..85f54a4acc 100644
--- a/gnu/packages/kerberos.scm
+++ b/gnu/packages/kerberos.scm
@@ -50,6 +50,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu))
 
@@ -207,28 +208,33 @@ After installation, the system administrator should generate keys using
                   #t))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags (list
-                          ;; Avoid 7 MiB of .a files.
-                          "--disable-static"
+     `(#:configure-flags
+       ,#~(list
+           ;; Avoid 7 MiB of .a files.
+           "--disable-static"
 
-                          ;; Do not build libedit.
-                          (string-append
-                           "--with-readline-lib="
-                           (assoc-ref %build-inputs "readline") "/lib")
-                          (string-append
-                           "--with-readline-include="
-                           (assoc-ref %build-inputs "readline") "/include")
+           ;; Do not build libedit.
+           (string-append
+            "--with-readline-lib="
+            (assoc-ref %build-inputs "readline") "/lib")
+           (string-append
+            "--with-readline-include="
+            (assoc-ref %build-inputs "readline") "/include")
 
-                          ;; Do not build sqlite.
-                          (string-append
-                           "--with-sqlite3="
-                           (assoc-ref %build-inputs "sqlite"))
+           ;; Do not build sqlite.
+           (string-append
+            "--with-sqlite3="
+            (assoc-ref %build-inputs "sqlite"))
 
-                          ;; The configure script is too pessimistic.
-                          ;; Setting this also resolves a linking error.
-                          ,@(if (%current-target-system)
-                                '("ac_cv_func_getpwnam_r_posix=yes")
-                                '()))
+           #$@(if (%current-target-system)
+                  ;; The configure script is too pessimistic.
+                  ;; Setting this also resolves a linking error.
+                  #~("ac_cv_func_getpwnam_r_posix=yes"
+                     ;; Allow 'slc' and 'asn1_compile' to be found.
+                     (string-append "--with-cross-tools="
+                                    #+(file-append this-package
+                                                   "/libexec/heimdal")))
+                  #~()))
        #:phases (modify-phases %standard-phases
                   (add-before 'configure 'pre-configure
                     ;; TODO(core-updates): Unconditionally use the
@@ -239,6 +245,13 @@ After installation, the system administrator should generate keys using
                      ,(if (%current-target-system)
                           '(#:key inputs #:allow-other-keys)
                           '_)
+                     ,@(if (%current-target-system)
+                           `((substitute* "configure"
+                               ;; Our 'compile_et' is not in --with-cross-tools,
+                               ;; which confuses heimdal.
+                               (("ac_cv_prog_COMPILE_ET=\\$\\{with_cross_tools\\}compile_et")
+                                "ac_cv_PROG_COMPILE_ET=compile_et")))
+                           '())
                      ,@(if (%current-target-system)
                            '((substitute* '("appl/afsutil/pagsh.c" "appl/su/su.c")
                                (("/bin/sh")
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 28/52] gnu: heimdal: Use libcom_err from input when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (25 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 27/52] gnu: heimdal: Find tools when cross-compiling Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 29/52] gnu: json-glib: Add missing 'bash-minimal' input Maxime Devos
                     ` (23 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/kerberos.scm
  (heimdal)[arguments]<#:phases>{pre-configure}: Consider ${krb_cv_com_err}
  to be 'yes' when cross-compiling.
---
 gnu/packages/kerberos.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm
index 85f54a4acc..82609ce66e 100644
--- a/gnu/packages/kerberos.scm
+++ b/gnu/packages/kerberos.scm
@@ -247,6 +247,10 @@ After installation, the system administrator should generate keys using
                           '_)
                      ,@(if (%current-target-system)
                            `((substitute* "configure"
+                               ;; The e2fsprogs input is included for libcom_err,
+                               ;; let's use it even if cross-compiling.
+                               (("test \"\\$\\{krb_cv_com_err\\}\" = \"yes\"")
+                                ":")
                                ;; Our 'compile_et' is not in --with-cross-tools,
                                ;; which confuses heimdal.
                                (("ac_cv_prog_COMPILE_ET=\\$\\{with_cross_tools\\}compile_et")
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 29/52] gnu: json-glib: Add missing 'bash-minimal' input.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (26 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 28/52] gnu: heimdal: Use libcom_err from input " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 30/52] gnu: json-glib: Find docbook inputs when cross-compiling Maxime Devos
                     ` (22 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gnome.scm (json-glib)[inputs]: Add "bash-minimal" when
  cross-compiling (for wrapper scripts).
---
 gnu/packages/gnome.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 3f7dcb7988..f0f3c0aeef 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4610,6 +4610,11 @@ configuration storage systems.")
        ("gtk-doc" ,gtk-doc)
        ("pkg-config" ,pkg-config)
        ("xsltproc" ,libxslt)))
+    (inputs
+     ;; TODO(core-updates): Make this input unconditional.
+     (if (%current-target-system)
+         `(("bash-minimal" ,bash-minimal))
+         '()))
     (propagated-inputs
      `(("glib" ,glib)))                 ;according to json-glib-1.0.pc
     (home-page "https://wiki.gnome.org/Projects/JsonGlib")
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 30/52] gnu: json-glib: Find docbook inputs when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (27 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 29/52] gnu: json-glib: Add missing 'bash-minimal' input Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 31/52] gnu: json-glib: Don't build gtk documentation " Maxime Devos
                     ` (21 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gnome.scm (json-glib)[arguments]<#:phases>{patch-docbook}:
  Look up "docbook-xml" in 'native-inputs', not 'inputs', when
  cross-compiling.
---
 gnu/packages/gnome.scm | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index f0f3c0aeef..c0b6d010c7 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4581,15 +4581,24 @@ configuration storage systems.")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-docbook
-           (lambda* (#:key inputs #:allow-other-keys)
+           ;; TODO(core-updates): Use (or native-inputs inputs)
+           ;; unconditionally.
+           (lambda* (#:key ,@(if (%current-target-system)
+                                 '(native-inputs)
+                                 '()) inputs #:allow-other-keys)
              (with-directory-excursion "doc"
                (substitute* (find-files "." "\\.xml$")
                  (("http://www.oasis-open.org/docbook/xml/4\\.3/")
-                  (string-append (assoc-ref inputs "docbook-xml")
+                  (string-append (assoc-ref ,(if (%current-target-system)
+                                                 '(or native-inputs inputs)
+                                                 'inputs)
+                                            "docbook-xml")
                                  "/xml/dtd/docbook/")))
                (substitute* "meson.build"
                  (("http://docbook.sourceforge.net/release/xsl/current/")
-                  (string-append (assoc-ref inputs "docbook-xsl")
+                  (string-append (assoc-ref ,(if (%current-target-system)
+                                                 '(or native-inputs inputs)
+                                                 'inputs) "docbook-xsl")
                                  "/xml/xsl/docbook-xsl-1.79.2/"))))
              #t))
          (add-after 'install 'move-docs
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 31/52] gnu: json-glib: Don't build gtk documentation when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (28 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 30/52] gnu: json-glib: Find docbook inputs when cross-compiling Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 32/52] gnu: json-glib: Don't build introspection data " Maxime Devos
                     ` (20 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gnome.scm
  (json-glib)[arguments]<#:configue-flags>: Set gtk_doc=disables when
  cross-compiling.
  (json-glib)[arguments]<#:phases>{move-docs}: Don't run when cross-compiling
  ...
  (json-glib)[arguments]<#:phases>{stub-docs}: ... instead, create an empty
  directory where the documentation would be.
---
 gnu/packages/gnome.scm | 31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index c0b6d010c7..febbe10ee8 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4577,7 +4577,12 @@ configuration storage systems.")
        #:configure-flags
        (list
         "-Ddocs=true"
-        "-Dman=true")
+        "-Dman=true"
+        ,@(if (%current-target-system)
+              ;; If enabled, gtkdoc-scangobj will try to execute a
+              ;; cross-compiled binary.
+              '("-Dgtk_doc=disabled")
+              '()))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-docbook
@@ -4601,15 +4606,21 @@ configuration storage systems.")
                                                  'inputs) "docbook-xsl")
                                  "/xml/xsl/docbook-xsl-1.79.2/"))))
              #t))
-         (add-after 'install 'move-docs
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (doc (assoc-ref outputs "doc")))
-               (mkdir-p (string-append doc "/share"))
-               (rename-file
-                (string-append out "/share/gtk-doc")
-                (string-append doc "/share/gtk-doc"))
-               #t))))))
+         ;; When cross-compiling, there are no docs to move.
+         ,(if (%current-target-system)
+              '(add-after 'install 'stub-docs
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   ;; The daemon doesn't like empty output paths.
+                   (mkdir (assoc-ref outputs "doc"))))
+              '(add-after 'install 'move-docs
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (let* ((out (assoc-ref outputs "out"))
+                          (doc (assoc-ref outputs "doc")))
+                     (mkdir-p (string-append doc "/share"))
+                     (rename-file
+                      (string-append out "/share/gtk-doc")
+                      (string-append doc "/share/gtk-doc"))
+                     #t)))))))
     (native-inputs
      `(("docbook-xml" ,docbook-xml-4.3)
        ("docbook-xsl" ,docbook-xsl)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 32/52] gnu: json-glib: Don't build introspection data when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (29 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 31/52] gnu: json-glib: Don't build gtk documentation " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 33/52] gnu: libthai: Add datrie as native-input " Maxime Devos
                     ` (19 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gnome.scm
  (json-glib)[arguments]<#:configure-flags>: Set introspection=false when
  cross-compiling.
---
 gnu/packages/gnome.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index febbe10ee8..6d7efb8382 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4581,7 +4581,10 @@ configuration storage systems.")
         ,@(if (%current-target-system)
               ;; If enabled, gtkdoc-scangobj will try to execute a
               ;; cross-compiled binary.
-              '("-Dgtk_doc=disabled")
+              '("-Dgtk_doc=disabled"
+                ;; Trying to build introspection data when cross-compiling
+                ;; causes errors during linking.
+                "-Dintrospection=disabled")
               '()))
        #:phases
        (modify-phases %standard-phases
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 33/52] gnu: libthai: Add datrie as native-input when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (30 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 32/52] gnu: json-glib: Don't build introspection data " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 34/52] gnu: libdaemon: Support cross-compilation to aarch64-linux-gnu Maxime Devos
                     ` (18 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

This allows the cross-build to succeed.

* gnu/packages/gnome.scm
  (libthai)[native-inputs]: Add "datrie" when cross-compiling.
---
 gnu/packages/gtk.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index cd764da7f3..48abbdcd77 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -328,7 +328,11 @@ representing trie.  Trie is a kind of digital search tree.")
                        "/share/doc/libthai/html"))))
     (native-inputs
      `(("doxygen" ,doxygen)
-       ("pkg-config" ,pkg-config)))
+       ("pkg-config" ,pkg-config)
+       ;; TODO(core-updates): Make this input unconditional.
+       ,@(if (%current-target-system)
+             `(("datrie" ,libdatrie)) ; for 'trietool'
+             '())))
     (propagated-inputs
      `(("datrie" ,libdatrie)))
     (synopsis "Thai language support library")
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 34/52] gnu: libdaemon: Support cross-compilation to aarch64-linux-gnu.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (31 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 33/52] gnu: libthai: Add datrie as native-input " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 35/52] gnu: avahi: Find 'TARGET-pkg-config' when cross-compiling Maxime Devos
                     ` (17 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/libdaemon.scm
  (libdaemon)[native-inputs]: Add "config" when cross-compiling for
  aarch64.
  (libdaemon)[arguments]<#:phases>{update-config.sub}: When cross-compiling
  for aarch64, update the "config.sub" script.
---
 gnu/packages/libdaemon.scm | 42 ++++++++++++++++++++++++++------------
 1 file changed, 29 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/libdaemon.scm b/gnu/packages/libdaemon.scm
index e47d66cfa7..9dc851e823 100644
--- a/gnu/packages/libdaemon.scm
+++ b/gnu/packages/libdaemon.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -17,8 +18,10 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages libdaemon)
+  #:use-module (gnu packages autotools)
   #:use-module (guix licenses)
   #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module (guix download)
   #:use-module (guix build-system gnu))
 
@@ -45,21 +48,34 @@
                "0d5qlq5ab95wh1xc87rqrh1vx6i8lddka1w3f1zcqvcqdxgyn8zx"))
              (file-name (string-append name "-" version ".tar.gz"))))
     (build-system gnu-build-system)
-    (arguments
-     (if (%current-target-system)
-         ;; The 'setpgrp' test cannot provide an answer when cross-compiling,
-         ;; so provide the right one for glibc.
-         `(#:configure-flags (list "ac_cv_func_setpgrp_void=yes"
-
-                                   ;; TODO: Move this globally on the next
-                                   ;; rebuild cycle.
-                                   ;; Set a valid localstatedir for the
-                                   ;; benefit of the default
-                                   ;; 'daemon_pid_file_proc', used by the
-                                   ;; Hurd's console client.
-                                   "--localstatedir=/var"))
+    (native-inputs
+     (if (and=> (%current-target-system) target-aarch64?)
+         `(("config" ,config)) ; for config.sub
          '()))
+    (arguments
+     `(,@(if (%current-target-system)
+             ;; The 'setpgrp' test cannot provide an answer when cross-compiling,
+             ;; so provide the right one for glibc.
+             `(#:configure-flags (list "ac_cv_func_setpgrp_void=yes"
 
+                                       ;; TODO: Move this globally on the next
+                                       ;; rebuild cycle.
+                                       ;; Set a valid localstatedir for the
+                                       ;; benefit of the default
+                                       ;; 'daemon_pid_file_proc', used by the
+                                       ;; Hurd's console client.
+                                       "--localstatedir=/var"))
+             '())
+       ,@(if (and=> (%current-target-system) target-aarch64?)
+             `(#:phases
+               (modify-phases %standard-phases
+                 (add-before 'configure 'update-config.sub
+                   (lambda _
+                     ;; Replace outdated config.sub such that aarch64
+                     ;; will be recognised as an architecture.
+                     (delete-file "config.sub")
+                     (symlink (which "config.sub") "config.sub")))))
+             '())))
     ;; XXX: Stale URL, missing replacement.  See <http://bugs.gnu.org/18639>.
     (home-page "http://0pointer.de/lennart/projects/libdaemon/")
 
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 35/52] gnu: avahi: Find 'TARGET-pkg-config' when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (32 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 34/52] gnu: libdaemon: Support cross-compilation to aarch64-linux-gnu Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 36/52] gnu: avahi: Use the cross-compiled bash Maxime Devos
                     ` (16 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

The configure script first tests whether "pkg-config" is in PATH,
and then uses "TARGET-pkg-config".  Pretend "pkg-config" exists.

* gnu/packages/avahi.scm (avah)[arguments]<#:configure-flags>: Set
  ac_cv_prog_have_pkg_config=yes when cross-compiling.
---
 gnu/packages/avahi.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm
index 602f9d7997..5582df479e 100644
--- a/gnu/packages/avahi.scm
+++ b/gnu/packages/avahi.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -58,7 +59,7 @@
                  #t))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--with-distro=none"
+     `(#:configure-flags '("--with-distro=none"
                            "--disable-static"
                            "--localstatedir=/var" ; for the DBus socket
                            "--disable-python"
@@ -68,7 +69,10 @@
                            "--enable-tests"
                            "--disable-qt4" "--disable-qt5"
                            "--disable-gtk" "--disable-gtk3"
-                           "--enable-compat-libdns_sd")))
+                           "--enable-compat-libdns_sd"
+                           ,@(if (%current-target-system)
+                                 '("ac_cv_prog_have_pkg_config=yes")
+                                 '()))))
     (inputs
      `(("dbus" ,dbus)
        ("expat" ,expat)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 36/52] gnu: avahi: Use the cross-compiled bash.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (33 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 35/52] gnu: avahi: Find 'TARGET-pkg-config' when cross-compiling Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 37/52] gnu: at-spi2-core: Don't cross-compile documentation Maxime Devos
                     ` (15 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/avahi.scm (avahi)[arguments]<#:phases>{patch-more-shebangs}:
  Replace the bash in the shebangs in "/etc/avahi" with a cross-compiled bash.
---
 gnu/packages/avahi.scm | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm
index 5582df479e..7dcaa17a76 100644
--- a/gnu/packages/avahi.scm
+++ b/gnu/packages/avahi.scm
@@ -23,9 +23,11 @@
 (define-module (gnu packages avahi)
   #:use-module ((guix licenses) #:select (lgpl2.1+))
   #:use-module (guix packages)
+  #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages dbm)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
@@ -72,9 +74,28 @@
                            "--enable-compat-libdns_sd"
                            ,@(if (%current-target-system)
                                  '("ac_cv_prog_have_pkg_config=yes")
-                                 '()))))
+                                 '()))
+       ;; TODO(core-updates): Make this unconditional.
+       ,@(if (%current-target-system)
+             `(#:modules ((srfi srfi-26)
+                          (guix build utils)
+                          (guix build gnu-build-system))
+               #:phases
+               ,#~(modify-phases %standard-phases
+                    (add-after 'patch-shebangs 'patch-more-shebangs
+                      (lambda* (#:key inputs #:allow-other-keys)
+                        (define path
+                          `(,(dirname (search-input-file inputs "bin/sh"))))
+                        (for-each
+                         (cut patch-shebang <> path)
+                         (find-files (string-append #$output "/etc/avahi")))))))
+             '())))
     (inputs
-     `(("dbus" ,dbus)
+     ;; TODO(core-updates): Make this input unconditional.
+     `(,@(if (%current-target-system)
+             `(("bash-minimal" ,bash-minimal))
+             '())
+       ("dbus" ,dbus)
        ("expat" ,expat)
        ("gdbm" ,gdbm)
        ("glib" ,glib)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 37/52] gnu: at-spi2-core: Don't cross-compile documentation.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (34 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 36/52] gnu: avahi: Use the cross-compiled bash Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 38/52] gnu: at-spi2-core: Find docbook when cross-compiling Maxime Devos
                     ` (14 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gtk.scm
  (at-spi2-core)[arguments]<#:configure-flags>: Set docs=false when
  cross-compiling.
  (at-spi2-core)[arguments]<#:phases>{move-documentation}: Remove when
  cross-compiling.
---
 gnu/packages/gtk.scm | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 48abbdcd77..73b805f6fe 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -724,9 +724,13 @@ scaled, composited, modified, saved, or rendered.")
     (build-system meson-build-system)
     (outputs '("out" "doc"))
     (arguments
-     '(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
+     `(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
        #:configure-flags
-       (list "-Ddocs=true")
+       ;; Generating documentation requires running binaries for the host
+       ;; on the build machine.
+       (list ,(if (%current-target-system)
+                  "-Ddocs=false"
+                  "-Ddocs=true"))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'set-documentation-path
@@ -748,16 +752,18 @@ scaled, composited, modified, saved, or rendered.")
                  (("http://.*/docbookx\\.dtd")
                   (string-append xmldoc "/docbookx.dtd")))
                #t)))
-         (add-after 'install 'move-documentation
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (doc (assoc-ref outputs "doc")))
-               (copy-recursively
-                (string-append out "/share/gtk-doc")
-                (string-append doc "/share/gtk-doc"))
-               (delete-file-recursively
-                (string-append out "/share/gtk-doc")))
-             #t))
+         ,@(if (%current-target-system)
+               '()
+               '((add-after 'install 'move-documentation
+                   (lambda* (#:key outputs #:allow-other-keys)
+                     (let ((out (assoc-ref outputs "out"))
+                           (doc (assoc-ref outputs "doc")))
+                       (copy-recursively
+                        (string-append out "/share/gtk-doc")
+                        (string-append doc "/share/gtk-doc"))
+                       (delete-file-recursively
+                        (string-append out "/share/gtk-doc")))
+                     #t))))
          (add-after 'install 'check
            (lambda _
              (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 38/52] gnu: at-spi2-core: Find docbook when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (35 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 37/52] gnu: at-spi2-core: Don't cross-compile documentation Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 39/52] gnu: at-spi2-core: Add missing "bash-minimal" input Maxime Devos
                     ` (13 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gtk.scm
  (at-spi2-core)[arguments]<#:phases>{patch-docbook-sgml}: Look up
  "docbook-sxml" in 'native-inputs' instead of 'inputs' when cross-compiling.
---
 gnu/packages/gtk.scm | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 73b805f6fe..49208716eb 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -744,10 +744,17 @@ scaled, composited, modified, saved, or rendered.")
            (lambda* (#:key outputs #:allow-other-keys)
              (mkdir-p (string-append (assoc-ref outputs "doc") "/share"))
              #t))
+         ;; TODO(core-updates): Unconditionally use (or native-inputs inputs)
          (add-after 'unpack 'patch-docbook-sgml
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let* ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
-                                           "/xml/dtd/docbook")))
+           (lambda* (#:key ,@(if (%current-target-system)
+                                 '(native-inputs)
+                                 '()) inputs #:allow-other-keys)
+             (let* ((xmldoc
+                     (string-append (assoc-ref ,(if (%current-target-system)
+                                                    '(or native-inputs inputs)
+                                                    'inputs)
+                                               "docbook-xml")
+                                    "/xml/dtd/docbook")))
                (substitute* "doc/libatspi/libatspi-docs.sgml"
                  (("http://.*/docbookx\\.dtd")
                   (string-append xmldoc "/docbookx.dtd")))
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 39/52] gnu: at-spi2-core: Add missing "bash-minimal" input.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (36 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 38/52] gnu: at-spi2-core: Find docbook when cross-compiling Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 40/52] gnu: xorg: Unify --disable-malloc0-returnsnull code Maxime Devos
                     ` (12 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gtk.scm
  (at-spi2-core)[inputs]: Add "bash-minimal" when cross-compiling.
---
 gnu/packages/gtk.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 49208716eb..1d6be00e60 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -781,6 +781,11 @@ scaled, composited, modified, saved, or rendered.")
              (setenv "DBUS_FATAL_WARNINGS" "0") ;
              (invoke "dbus-launch" "ninja" "test")))
          (delete 'check))))
+    (inputs
+     ;; TODO(core-updates): Make this input unconditional.
+     (if (%current-target-system)
+         `(("bash-minimal" ,bash-minimal))
+         '()))
     (propagated-inputs
      ;; atspi-2.pc refers to all these.
      `(("dbus" ,dbus)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 40/52] gnu: xorg: Unify --disable-malloc0-returnsnull code.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (37 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 39/52] gnu: at-spi2-core: Add missing "bash-minimal" input Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 41/52] gnu: libxinerama: Add --disable-malloc0-returnsnull when necessary Maxime Devos
                     ` (11 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

The idea is to keep the comments in one place, instead of copying
them over and over.  It's also documented more now.

* gnu/packages/xorg.scm
  (malloc0-flags): New procedure.
  (libxext,libxrender,libx11,libxt): Use new procedures.
---
 gnu/packages/xorg.scm | 32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index def751c62c..0197e785cb 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -102,6 +102,16 @@
 
 
 
+;; When cross-compiling certain packages, "--disable-malloc0returnsnull"
+;; needs to be passed.  Otherwise, the configure script will try to run a
+;; binary for the host on the build machine.
+(define (malloc0-flags)
+  (if (%current-target-system)
+      ;; At least on glibc-based systems, malloc(0) evaluates to a non-NULL
+      ;; pointer (except in out-of-memory situations).  On other systems,
+      ;; --enable-malloc0returnsnull might be required instead.
+      '("--disable-malloc0returnsnull")
+      '()))
 
 ;; packages without propagated input
 ;; (rationale for this separation: The packages in PROPAGATED_INPUTS need to
@@ -4792,10 +4802,7 @@ cannot be adequately worked around on the client side of the wire.")
              (string-append "--mandir="
                             (assoc-ref %outputs "doc")
                             "/share/man")
-             ;; Disable zero malloc check that fails when cross-compiling.
-             ,@(if (%current-target-system)
-                   '("--disable-malloc0returnsnull")
-                   '()))))
+             ,@(malloc0-flags))))
     (propagated-inputs
       `(("xorgproto" ,xorgproto)))
     (inputs
@@ -4885,11 +4892,7 @@ cannot be adequately worked around on the client side of the wire.")
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
-       (list "--disable-static"
-             ;; Disable zero malloc check that fails when cross-compiling.
-             ,@(if (%current-target-system)
-                   '("--disable-malloc0returnsnull")
-                   '()))))
+       (list "--disable-static" ,@(malloc0-flags))))
     (propagated-inputs
       `(("xorgproto" ,xorgproto)))
     (inputs
@@ -5562,11 +5565,7 @@ draggable titlebars and borders.")
                             (assoc-ref %outputs "doc")
                             "/share/man")
              "--disable-static"
-
-             ;; Disable zero malloc check that fails when cross-compiling.
-             ,@(if (%current-target-system)
-                   '("--disable-malloc0returnsnull")
-                   '()))))
+             ,@(malloc0-flags))))
     (propagated-inputs
       `(("xorgproto" ,xorgproto)
         ("libxcb" ,libxcb)))
@@ -5644,10 +5643,7 @@ draggable titlebars and borders.")
                             (assoc-ref %outputs "doc")
                             "/share/man")
              "--disable-static"
-             ;; Disable zero malloc check that fails when cross-compiling.
-             ,@(if (%current-target-system)
-                   '("--disable-malloc0returnsnull")
-                   '()))))
+             ,@(malloc0-flags))))
     (propagated-inputs
       `(("libx11" ,libx11)
         ("libice" ,libice)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 41/52] gnu: libxinerama: Add --disable-malloc0-returnsnull when necessary.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (38 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 40/52] gnu: xorg: Unify --disable-malloc0-returnsnull code Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 42/52] gnu: libxi: " Maxime Devos
                     ` (10 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/xorg.scm
  (libxinerama)[arguments]<#:configure-flags>: Add malloc0-flags.
---
 gnu/packages/xorg.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 0197e785cb..5d1fd6fa80 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -4833,7 +4833,7 @@ cannot be adequately worked around on the client side of the wire.")
             "086p0axqj57nvkaqa6r00dnr9kyrn1m8blgf0zjy25zpxkbxn200"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--disable-static")))
+     `(#:configure-flags '("--disable-static" ,@(malloc0-flags))))
     (propagated-inputs
       `(("xorgproto" ,xorgproto)))
     (inputs
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 42/52] gnu: libxi: Add --disable-malloc0-returnsnull when necessary.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (39 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 41/52] gnu: libxinerama: Add --disable-malloc0-returnsnull when necessary Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 43/52] gnu: libxrandr: " Maxime Devos
                     ` (9 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/xorg.scm
  (libxi)[arguments]<#:configure-flags>: Add malloc0-flags.
---
 gnu/packages/xorg.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 5d1fd6fa80..eecfacd0ec 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -5208,10 +5208,11 @@ new API's in libXft, or the legacy API's in libX11.")
     (build-system gnu-build-system)
     (outputs '("out" "doc"))             ;man pages represent 28% of the total
     (arguments
-     '(#:configure-flags (list "--disable-static"
+     `(#:configure-flags (list "--disable-static"
                                (string-append "--mandir="
                                               (assoc-ref %outputs "doc")
-                                              "/share/man"))))
+                                              "/share/man")
+                               ,@(malloc0-flags))))
     (propagated-inputs
       `(("xorgproto" ,xorgproto)
         ("libx11" ,libx11)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 43/52] gnu: libxrandr: Add --disable-malloc0-returnsnull when necessary.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (40 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 42/52] gnu: libxi: " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 44/52] gnu: libxxf85vm: " Maxime Devos
                     ` (8 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/xorg.scm
  (libxrandr)[arguments]<#:configure-flags>: Add malloc0-flags.
---
 gnu/packages/xorg.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index eecfacd0ec..385a1cb3bc 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -5241,7 +5241,7 @@ new API's in libXft, or the legacy API's in libX11.")
             "08z0mqywrm7ij8bxlfrx0d2wy6kladdmkva1nw5k6qix82z0xsla"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--disable-static")))
+     `(#:configure-flags '("--disable-static" ,@(malloc0-flags))))
     (propagated-inputs
       ;; In accordance with xrandr.pc.
       `(("libx11" ,libx11)
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 44/52] gnu: libxxf85vm: Add --disable-malloc0-returnsnull when necessary.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (41 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 43/52] gnu: libxrandr: " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 45/52] gnu: Add pkg-config-for-build Maxime Devos
                     ` (7 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/xorg.scm
  (libxxf86vm)[arguments]<#:configure-flags>: Add malloc0-flags.
---
 gnu/packages/xorg.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 385a1cb3bc..30e8fb1db1 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -5302,7 +5302,7 @@ new API's in libXft, or the legacy API's in libX11.")
             "0mydhlyn72i7brjwypsqrpkls3nm6vxw0li8b2nw0caz7kwjgvmg"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--disable-static")))
+     `(#:configure-flags '("--disable-static" ,@(malloc0-flags))))
     (propagated-inputs
       `(("libxext" ,libxext)
         ("xorgproto" ,xorgproto)))
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 45/52] gnu: Add pkg-config-for-build.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (42 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 44/52] gnu: libxxf85vm: " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-30 13:13     ` [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Mathieu Othacehe
  2021-08-25 18:03   ` [bug#50201] [PATCH 46/52] gnu: wayland: Find wayland-scanner when cross-compiling Maxime Devos
                     ` (6 subsequent siblings)
  50 siblings, 1 reply; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/pkg-config.scm
  (pkg-config-for-build): New variable.
---
 gnu/packages/pkg-config.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/pkg-config.scm b/gnu/packages/pkg-config.scm
index 9c632532be..9d1588338e 100644
--- a/gnu/packages/pkg-config.scm
+++ b/gnu/packages/pkg-config.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,8 +22,10 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
+  #:use-module (gnu packages bash)
   #:use-module (guix memoization)
   #:export (pkg-config))
 
@@ -130,3 +133,36 @@ build, or a GNU triplet."
 ;; environment or not.
 (define-syntax pkg-config
   (identifier-syntax (pkg-config-for-target (%current-target-system))))
+
+;; This hack allows for using both "pkg-config" and "TARGET-pkg-config"
+;; at the same time.  Simply using '%pkg-config' and 'pkg-config' won't
+;; work because they both use the "PKG_CONFIG_PATH" environment variable.
+(define-public pkg-config-for-build
+  (package
+    (inherit (hidden-package pkg-config))
+    (name "pkg-config-for-build")
+    (version "0")
+    (source #f)
+    (build-system trivial-build-system)
+    (inputs
+     `(("bash-minimal" ,bash-minimal)
+       ("pkg-config" ,%pkg-config)))
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       ,#~(begin
+            (use-modules (guix build utils))
+            (define where (string-append #$output "/bin/pkg-config"))
+            (mkdir-p (dirname where))
+            (call-with-output-file where
+              (lambda (port)
+                (format port "#!~a
+export PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH_FOR_BUILD\"
+exec ~a \"$@\""
+                        (search-input-file %build-inputs "bin/bash")
+                        (search-input-file %build-inputs "bin/pkg-config"))))
+            (chmod where #o500))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "PKG_CONFIG_PATH_FOR_BUILD")
+            (files '("lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig")))))))
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 46/52] gnu: wayland: Find wayland-scanner when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (43 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 45/52] gnu: Add pkg-config-for-build Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 47/52] gnu: wayland: Find docbook-xml " Maxime Devos
                     ` (5 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/freedesktop.scm (wayland)[native-inputs]: Add
  pkg-config-for-build and 'this-package' when cross-compiling.
---
 gnu/packages/freedesktop.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 0f6bb72a1f..9384ecd3f2 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1006,7 +1006,11 @@ Python.")
        ("doxygen" ,doxygen)
        ("pkg-config" ,pkg-config)
        ("xmlto" ,xmlto)
-       ("xsltproc" ,libxslt)))
+       ("xsltproc" ,libxslt)
+       ,@(if (%current-target-system)
+             `(("pkg-config-for-build" ,pkg-config-for-build)
+               ("wayland" ,this-package)) ; for wayland-scanner
+             '())))
     (inputs
      `(("expat" ,expat)
        ("libxml2" ,libxml2)))           ; for XML_CATALOG_FILES
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 47/52] gnu: wayland: Find docbook-xml when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (44 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 46/52] gnu: wayland: Find wayland-scanner when cross-compiling Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 48/52] gnu: libproxy: Don't run tests " Maxime Devos
                     ` (4 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/freedesktop.scm
  (wayland)[arguments]<#:phases>{patchdocbook-xml}: Look in 'native-inputs'
  instead of 'inputs' when cross-compiling.
---
 gnu/packages/freedesktop.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 9384ecd3f2..2e696f3848 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -979,14 +979,22 @@ Python.")
         #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-docbook-xml
-           (lambda* (#:key inputs #:allow-other-keys)
+           ;; TODO(core-updates): Use 'native-inputs' unconditionally
+           (lambda* (#:key ,@(if (%current-target-system)
+                                 '(native-inputs)
+                                 '())
+                     inputs #:allow-other-keys)
              (with-directory-excursion "doc"
                (substitute* (find-files "." "\\.xml$")
                  (("http://www.oasis-open.org/docbook/xml/4\\.5/")
-                  (string-append (assoc-ref inputs "docbook-xml")
+                  (string-append (assoc-ref ,(if (%current-target-system)
+                                                 '(or native-inputs inputs)
+                                                 'inputs) "docbook-xml")
                                  "/xml/dtd/docbook/"))
                  (("http://www.oasis-open.org/docbook/xml/4\\.2/")
-                  (string-append (assoc-ref inputs "docbook-xml-4.2")
+                  (string-append (assoc-ref ,(if (%current-target-system)
+                                                 '(or native-inputs inputs)
+                                                 'inputs) "docbook-xml-4.2")
                                  "/xml/dtd/docbook/"))))
              #t))
          (add-after 'install 'move-doc
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 48/52] gnu: libproxy: Don't run tests when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (45 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 47/52] gnu: wayland: Find docbook-xml " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 49/52] gnu: gdk-pixbuf: Find docbook " Maxime Devos
                     ` (3 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/networking.scm
  (libproxy)[arguments]]<#:phases>{check}: Respect #:tests? when
  cross-compiling.
---
 gnu/packages/networking.scm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index db01771fc7..fe50c0eb27 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -44,6 +44,7 @@
 ;;; Copyright © 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
 ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2224,8 +2225,13 @@ sockets in Perl.")
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-                  (lambda _
-                    (invoke "ctest" "-E" "url-test"))))))
+           ;; TODO(core-updates): Make this unconditional.
+           ,(if (%current-target-system)
+                '(lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     (invoke "ctest" "-E" "url-test")))
+                '(lambda _
+                   (invoke "ctest" "-E" "url-test")))))))
     (synopsis "Library providing automatic proxy configuration management")
     (description "Libproxy handles the details of HTTP/HTTPS proxy
 configuration for applications across all scenarios.  Applications using
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 49/52] gnu: gdk-pixbuf: Find docbook when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (46 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 48/52] gnu: libproxy: Don't run tests " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 50/52] gnu: gdk-pixbuf: Add bash-minimal input " Maxime Devos
                     ` (2 subsequent siblings)
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gtk.scm
  (gdk-pixbuf)[arguments]<#:phases>{patch-docbook}: Look for docbook
  in 'native-inputs' instead of 'inputs' when cross-compiling.
---
 gnu/packages/gtk.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 1d6be00e60..8bf55ccf14 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -628,15 +628,23 @@ highlighting and other features typical of a source code editor.")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-docbook
-           (lambda* (#:key inputs #:allow-other-keys)
+           ;; TODO(core-updates): Unconditionally look in (or native-inputs inputs)
+           (lambda* (#:key ,@(if (%current-target-system)
+                                 '(native-inputs)
+                                 '())
+                     inputs #:allow-other-keys)
              (with-directory-excursion "docs"
                (substitute* "meson.build"
                  (("http://docbook.sourceforge.net/release/xsl/current/")
-                  (string-append (assoc-ref inputs "docbook-xsl")
+                  (string-append (assoc-ref ,(if (%current-target-system)
+                                                 '(or native-inputs inputs)
+                                                 'inputs) "docbook-xsl")
                                  "/xml/xsl/docbook-xsl-1.79.2/")))
                (substitute* (find-files "." "\\.xml$")
                  (("http://www.oasis-open.org/docbook/xml/4\\.3/")
-                  (string-append (assoc-ref inputs "docbook-xml")
+                  (string-append (assoc-ref ,(if (%current-target-system)
+                                                 '(or native-inputs inputs)
+                                                 'inputs) "docbook-xml")
                                  "/xml/dtd/docbook/"))))
              #t))
          (add-before 'configure 'disable-failing-tests
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 50/52] gnu: gdk-pixbuf: Add bash-minimal input when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (47 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 49/52] gnu: gdk-pixbuf: Find docbook " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 51/52] gnu: pango: " Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 52/52] gnu: at-spi2-atk: Don't compile tests " Maxime Devos
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gtk.scm
  (gdk-pixbuf)[inputs]: Add "bash-minimal" when cross-compiling.
---
 gnu/packages/gtk.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 8bf55ccf14..74c4eee155 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -668,7 +668,10 @@ highlighting and other features typical of a source code editor.")
        ;; Used for testing and required at runtime.
        ("shared-mime-info" ,shared-mime-info)))
     (inputs
-     `(("jasper" ,jasper)
+     `(,@(if (%current-target-system)
+             `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap
+             '())
+       ("jasper" ,jasper)
        ("libjpeg" ,libjpeg-turbo)
        ("libpng"  ,libpng)
        ("libtiff" ,libtiff)))
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 51/52] gnu: pango: Add bash-minimal input when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (48 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 50/52] gnu: gdk-pixbuf: Add bash-minimal input " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  2021-08-25 18:03   ` [bug#50201] [PATCH 52/52] gnu: at-spi2-atk: Don't compile tests " Maxime Devos
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gtk.scm
  (pango)[inputs]: Add "bash-minimal" when cross-compiling.
---
 gnu/packages/gtk.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 74c4eee155..5409d0c510 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -383,7 +383,11 @@ applications.")
        ("libxft" ,libxft)
        ("libxrender" ,libxrender)))
     (inputs
-     `(("zlib" ,zlib)))
+     ;; TODO(core-updates): Unconditionally add "bash-minimal"
+     `(,@(if (%current-target-system)
+             `(("bash-minimal" ,bash-minimal)) ; for glib-or-gtk-wrap
+             '())
+       ("zlib" ,zlib)))
     (native-inputs
      `(("glib" ,glib "bin")             ; glib-mkenums, etc.
        ("gobject-introspection" ,gobject-introspection) ; g-ir-compiler, etc.
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH 52/52] gnu: at-spi2-atk: Don't compile tests when cross-compiling.
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
                     ` (49 preceding siblings ...)
  2021-08-25 18:03   ` [bug#50201] [PATCH 51/52] gnu: pango: " Maxime Devos
@ 2021-08-25 18:03   ` Maxime Devos
  50 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-25 18:03 UTC (permalink / raw)
  To: 50201; +Cc: Maxime Devos

* gnu/packages/gtk.scm
  (at-spi2-atk)[arguments]<#:configure-flags>: Set tests=false when
  cross-compiling.
---
 gnu/packages/gtk.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index 5409d0c510..dceb5069fd 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -856,6 +856,10 @@ is part of the GNOME accessibility project.")
     (build-system meson-build-system)
     (arguments
      `(#:glib-or-gtk? #t     ; To wrap binaries and/or compile schemas
+       ;; Compiling tests requires "libxml2" to be in 'inputs'.
+       ,@(if (%current-target-system)
+             `(#:configure-flags '("-Dtests=false"))
+             '())
        #:phases
        (modify-phases %standard-phases
          (replace 'check
-- 
2.33.0





^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-08-25 17:55 [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Maxime Devos
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
@ 2021-08-28 13:33 ` Mathieu Othacehe
  2021-08-30 12:16   ` Maxime Devos
  2021-08-30 12:19 ` Maxime Devos
  2 siblings, 1 reply; 71+ messages in thread
From: Mathieu Othacehe @ 2021-08-28 13:33 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 50201


Hello Maxime,

> It should not cause any rebuilds.  You can test with
> ./pre-inst-env guix build gtk+ --target=aarch64-linux-gnu.
> There is still some work to be done though:

Thanks for this series, that a great step forward. I will have a closer
look later, but as a general remark, should we really target the 
core-updates-frozen branch? 

Maybe it would make more sense to target the core-updates branch as
there's still some work required to get gtk+ to cross-build.

Mathieu




^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-08-28 13:33 ` [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Mathieu Othacehe
@ 2021-08-30 12:16   ` Maxime Devos
  2021-08-30 12:30     ` Mathieu Othacehe
  0 siblings, 1 reply; 71+ messages in thread
From: Maxime Devos @ 2021-08-30 12:16 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 50201

[-- Attachment #1: Type: text/plain, Size: 2881 bytes --]

Mathieu Othacehe schreef op za 28-08-2021 om 15:33 [+0200]:
> Hello Maxime,
> 
> > It should not cause any rebuilds.  You can test with
> > ./pre-inst-env guix build gtk+ --target=aarch64-linux-gnu.
> > There is still some work to be done though:
> 
> Thanks for this series, that a great step forward. I will have a closer
> look later, but as a general remark, should we really target the 
> core-updates-frozen branch? 
>
> Maybe it would make more sense to target the core-updates branch as
> there's still some work required to get gtk+ to cross-build.

Going by the patch series title: ‘Support cross-compilation in
glib-or-gtk-build-system’, I don't see why this would have to go in
core-updates instead of core-updates-frozen, because:

  (1) no rebuilds, unless I missed something (*)
  (2) due to (1), it doesn't introduce bugs
  (3) after this patch series, glib-or-gtk-build-system _does_ support
      support cross-compilation

(*) In one patch, I unconditionally added a glib:bin input.  IIRC, it failed
    to build natively previously, but I'd better check again ..

For example, cairo, which uses glib-or-gtk-build-system, now cross-compiles
for aarch64-linux-gnu.  True, ideally gtk+ would cross-compile as well,
but cairo being cross-compilable is already useful (e.g., it's a
dependency of harfbuzz which is a dependency of qtbase which is a dependency
of graphical Qt software.) (**)

(**) qtbase (indirectly) depends on perl-file-mimeinfo and 'perl-build-system'
doesn't support cross-compilation, so this argument is probably not really
convincing ...  Maybe texlive-bin would be a
better example?(***)
(***) The dependency libungif fails to cross-compile/

Also, hacking on master (or core-updates-frozen) is simpler on than on core-updates,
due to more substitutes, and it is more appealing to me because the cross-compilation
support would be available earlier to most people than if it the patches were based
on core-updates.

As a general principle, I prefer basing patches on 'master'.  That wasn't possible
here due to the use of G-exps in glib-or-gtk-build-system, so I based the patches
on 'core-updates-frozen' instead.  That goes a bit against
(guix)Submitting Patches though, so I would understand if the patches will have to
be rebased on core-updates:

  When we decide to start building the ‘staging’ or ‘core-updates’
  branches, they will be forked and renamed with the suffix
  ‘-frozen’, at which time only bug fixes may be pushed to the frozen
  branches.

unless ‘let glib-or-gtk-build-system support cross-compilation’ counts as a bug fix.
To me, this is not all that different from other cross-compilation fixes like
"CC=gcc" --> (string-append "CC=" (cc-for-target)) or moving inputs between
'native-inputs' and 'inputs', but YMMV.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-08-25 17:55 [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Maxime Devos
  2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
  2021-08-28 13:33 ` [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Mathieu Othacehe
@ 2021-08-30 12:19 ` Maxime Devos
  2 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-08-30 12:19 UTC (permalink / raw)
  To: 50201

[-- Attachment #1: Type: text/plain, Size: 715 bytes --]

Maxime Devos schreef op wo 25-08-2021 om 19:55 [+0200]:
> Hi guix,
> 
> This patch series does two things:
> 
>   * let 'glib-or-gtk-build-system' support cross-compilation
> 
>   * fix many (but not all) cross-compilation errors that prevent
>     "guix build gtk+ --target=aarch64-linux-gnu" from succeeding.
> 
> It should not cause any rebuilds.  You can test with
> ./pre-inst-env guix build gtk+ --target=aarch64-linux-gnu.

Be aware that I don't have an aarch64-linux-gnu machine to test this on.
Some binaries of some packages I've run through qemu-aarch64 and I've
run "guix gc --references [...]" on a few store items to check if it
looks reaonable, but that's it.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-08-30 12:16   ` Maxime Devos
@ 2021-08-30 12:30     ` Mathieu Othacehe
  0 siblings, 0 replies; 71+ messages in thread
From: Mathieu Othacehe @ 2021-08-30 12:30 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 50201


Hello Maxime,

> Going by the patch series title: ‘Support cross-compilation in
> glib-or-gtk-build-system’, I don't see why this would have to go in
> core-updates instead of core-updates-frozen, because:
>
>   (1) no rebuilds, unless I missed something (*)
>   (2) due to (1), it doesn't introduce bugs
>   (3) after this patch series, glib-or-gtk-build-system _does_ support
>       support cross-compilation
>
> (*) In one patch, I unconditionally added a glib:bin input.  IIRC, it failed
>     to build natively previously, but I'd better check again ..

I made this suggestion mostly because there are quite a few
"TODO(core-updates)" that could be spared by basing this series on
core-updates directly.

>   When we decide to start building the ‘staging’ or ‘core-updates’
>   branches, they will be forked and renamed with the suffix
>   ‘-frozen’, at which time only bug fixes may be pushed to the frozen
>   branches.

Yeah this series is near the limit between a bug fix and a feature
addition. Anyway, let's go for the core-updates-frozen branch if there
are no other objections.

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-08-25 18:02   ` [bug#50201] [PATCH 16/52] gobject-introspection: Correct library name " Maxime Devos
@ 2021-08-30 12:58     ` Mathieu Othacehe
  2021-09-03 12:35       ` Maxime Devos
  0 siblings, 1 reply; 71+ messages in thread
From: Mathieu Othacehe @ 2021-08-30 12:58 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 50201


Hey,

> +                         (string-append dir "/_giscanner.cpython-39-"
> +                                        (normalise-system system) ".so"))

Won't this be "cpython-310-" or so when we will update the Python
package definition?

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-08-25 18:02   ` [bug#50201] [PATCH 17/52] gnu: atk: Disable introspection when cross-compiling Maxime Devos
@ 2021-08-30 13:00     ` Mathieu Othacehe
  2021-08-30 16:45       ` Maxime Devos
  0 siblings, 1 reply; 71+ messages in thread
From: Mathieu Othacehe @ 2021-08-30 13:00 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 50201


Hey,

> +               ;; introspection requires running binaries for the host system
> +               ;; on the build system.
> +               '("-Dintrospection=false"))

Nix is often ahead of Guix regarding cross-compilation support. Did you
have a chance to see how they are dealing with introspection in the
context of cross-compilation?

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-08-25 18:03   ` [bug#50201] [PATCH 45/52] gnu: Add pkg-config-for-build Maxime Devos
@ 2021-08-30 13:13     ` Mathieu Othacehe
  2021-09-02 14:53       ` Maxime Devos
  0 siblings, 1 reply; 71+ messages in thread
From: Mathieu Othacehe @ 2021-08-30 13:13 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 50201


Hey,

> +    (native-search-paths
> +     (list (search-path-specification
> +            (variable "PKG_CONFIG_PATH_FOR_BUILD")
> +            (files '("lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig")))))))

You could maybe extract the files list from the %pkg-config definition
not to duplicate it?

Mathieu




^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-08-30 13:00     ` [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Mathieu Othacehe
@ 2021-08-30 16:45       ` Maxime Devos
  2021-08-31  9:49         ` Mathieu Othacehe
  0 siblings, 1 reply; 71+ messages in thread
From: Maxime Devos @ 2021-08-30 16:45 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 50201

[-- Attachment #1: Type: text/plain, Size: 4908 bytes --]

Mathieu Othacehe schreef op ma 30-08-2021 om 15:00 [+0200]:
> Hey,
> 
> > +               ;; introspection requires running binaries for the host system
> > +               ;; on the build system.
> > +               '("-Dintrospection=false"))
> 
> Nix is often ahead of Guix regarding cross-compilation support. Did you
> have a chance to see how they are dealing with introspection in the
> context of cross-compilation?

It appears that, say, atk can be cross-compiled on Nix, but other than that,
Nix doesn't seem to be ahead here.  We seem to be in good company here.  I found
the following

Nix setting -Dintrospection=false too when cross-compiling:
https://github.com/NixOS/nixpkgs/issues/72868

Nix people finding gobject-introspection is hard to cross-compile
https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+introspection

Nix people using an emulator (presumably QEMU?):
https://github.com/NixOS/nixpkgs/pull/88222/files

Unfortunately, it appears that introspection data is architecture-dependent:
<https://archive.md/U8rm2>, so just copying over the data from a natively
compiled version won't work (*).

One ‘solution’ is to run g-ir-scanner under QEMU:
<https://maxice8.github.io/8-cross-the-gir/>.  That isn't really cross-compilation
though, but emulated compilation, so it won't work with the Hurd.
Might be good enough for cross-compiling between Linux targets though ...

Here is an alternative idea that I won't attempt in this patch series:

(*) One solution would be to copy it over anyway and substitute things(***) where needed,
    and re-generate the typelib data.  That seems rather prone to mistakes though,
    so maybe we should then hash the adjusted introspection data and compare the hash
    to the hash of what we now the introspection data must be (**).

    Of course, we can't just guess that, so maybe when compiling atk natively for,
    say, x86_64-linux, a message

    ‘new introspection hashes: ("x86_64-linux-gnu" ("Atk-1.0" "THE-HASH"))’
    or
    ‘stale introspection hash: "Atk-1.0" "THE-OLD-HASH" "THE-NEW-HASH"

    followed by:

    ‘Please add it to #:gir-hashes to help cross-compilers.’

    could be printed (maybe even fail the build?).

    This hash checking and substitution could be implemented with an additional
    build phase for meson-build-system (#:gir would be an additional argument for
    meson-build-system).

    Something like:

    (package
      (name "atk")
      [...]
      (arguments
        `(#:gir-hashes
          (("x86_64-linux-gnu" ("Atk-1.0" "THE-HASH"))
           ("powerpc64-linux-gnu"
            ("Atk-1.0"
             ;; XXX(core-updates): We forgot to update the hash,
             ;; and now we're stuck with it unless we want a world-rebuild
             ;; for powerpc64le-linux (other architectures would be unaffected).
             ;; Use the right hash when cross-compiling.
             ,(if (%current-target-system)
                  "THE-CORRECT-HASH"
                  "THE-OLD-HASH"))
           ;; XXX I forgot the triplet, imagine you saw the triplet here instead ...
           ("i586-hurd" ...)
           ...)
          #:gir-substitutions
          ;; TODO: need to thing of a good scheme here ...
          ((replace-value c:identifier "ARCHITECTURE_DEPENDENT"
            ((? architecture "ppc64le") "x")
            ((? ...) "y"))
           (replace-value c:identifier "KERNEL_DEPENDENT"
            ((? kernel-os "linux-gnu") "x")
            ((? kernel-os "gnu") "y"))
           ;; Only x86_64 has this quirk.
           (replace-value c:identifier "QUIRK"
            ((? architecture "x86_64") "yes)
            (otherwise "no"))))
     [...])

    A limitation of this solution is that someone needs to compile it natively
    for the target architecture first (possibly emulated with QEMU).

(**) The .gir includes the name of the shared library, so maybe compute the hash
     modulo store references to avoid invalidating the reference hashes every time
     an (indirect) dependency is updated.

(***) An ordinary 'substitute*' won't work well, something specific for .gir XML
      would be needed.  E.g., consider the following (in this case architecture-independent)
      snippet from Atk-1.0.gir:

      <member name="alert"
              value="2"
              c:identifier="ATK_ROLE_ALERT"
              glib:nick="alert">
        <doc xml:space="preserve"
             filename="../atk/atkobject.h"
             line="39">An object which is an alert to the user. Assistive Technologies typically respond to ATK_ROLE_ALERT by reading the entire onscreen co>
      </member>

      Sometimes the ‘value="..."’ part is architecture-dependent, and needs to
      be adjusted for the target architecture.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-08-30 16:45       ` Maxime Devos
@ 2021-08-31  9:49         ` Mathieu Othacehe
  2021-09-11 21:30           ` Maxime Devos
  0 siblings, 1 reply; 71+ messages in thread
From: Mathieu Othacehe @ 2021-08-31  9:49 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 50201


Hey,

Thanks for investigating it.

> One ‘solution’ is to run g-ir-scanner under QEMU:
> <https://maxice8.github.io/8-cross-the-gir/>.  That isn't really cross-compilation
> though, but emulated compilation, so it won't work with the Hurd.
> Might be good enough for cross-compiling between Linux targets though ...

Yes, looks like some projects such as Yocto[1] and Void[2] are also
using this solution. Requiring transparent emulating through QEMU while
cross-compiling will for sure make the process more complex. Restricting
this support to architectures that can be emulated by QEMU is also an
important limitation.

> (*) One solution would be to copy it over anyway and substitute things(***) where needed,
>     and re-generate the typelib data.  That seems rather prone to mistakes though,
>     so maybe we should then hash the adjusted introspection data and compare the hash
>     to the hash of what we now the introspection data must be (**).

This is a very interesting idea, I'm not familiar with this
introspection mechanism an couldn't judge how hard the substitution
would be. Maybe we could bring this topic upstream, to see what's their
opinion about it.

That's a whole new topic anyway, that shouldn't block the current
patchset we are discussing.

Thanks,

Mathieu

[1]: https://www.openembedded.org/pipermail/openembedded-core/2015-November/113390.html
[2]: https://voidlinux.org/news/2019/02/cross-gobject.html




^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-08-30 13:13     ` [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Mathieu Othacehe
@ 2021-09-02 14:53       ` Maxime Devos
  2021-09-22 19:10         ` Ludovic Courtès
  0 siblings, 1 reply; 71+ messages in thread
From: Maxime Devos @ 2021-09-02 14:53 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 50201


[-- Attachment #1.1: Type: text/plain, Size: 653 bytes --]

Mathieu Othacehe schreef op ma 30-08-2021 om 15:13 [+0200]:
> Hey,
> 
> > +    (native-search-paths
> > +     (list (search-path-specification
> > +            (variable "PKG_CONFIG_PATH_FOR_BUILD")
> > +            (files '("lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig")))))))
> 
> You could maybe extract the files list from the %pkg-config definition
> not to duplicate it?

Done in local checkout.  Also, the package inherits from %pkg-config instead
of pkg-config now (doesn't change the derivations but seems more proper).

Let me now when I should send a v2 (I'll look into the cpython-39 issue first).

Greetings,
Maxime

[-- Attachment #1.2: 0001-SQUASH-pkg-config-Inherit-pkg-config-search-path-spe.patch --]
[-- Type: text/x-patch, Size: 1402 bytes --]

From 8403f97eac354a02efa92f0a3ced7c95523fad12 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Thu, 2 Sep 2021 15:18:54 +0200
Subject: [PATCH] SQUASH! pkg-config! Inherit %pkg-config & search-path-spec

---
 gnu/packages/pkg-config.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/pkg-config.scm b/gnu/packages/pkg-config.scm
index 9d1588338e..2b4173a7db 100644
--- a/gnu/packages/pkg-config.scm
+++ b/gnu/packages/pkg-config.scm
@@ -139,7 +139,7 @@ build, or a GNU triplet."
 ;; work because they both use the "PKG_CONFIG_PATH" environment variable.
 (define-public pkg-config-for-build
   (package
-    (inherit (hidden-package pkg-config))
+    (inherit (hidden-package %pkg-config))
     (name "pkg-config-for-build")
     (version "0")
     (source #f)
@@ -163,6 +163,8 @@ exec ~a \"$@\""
                         (search-input-file %build-inputs "bin/pkg-config"))))
             (chmod where #o500))))
     (native-search-paths
-     (list (search-path-specification
-            (variable "PKG_CONFIG_PATH_FOR_BUILD")
-            (files '("lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig")))))))
+     (map (lambda (original)
+            (search-path-specification
+             (inherit original)
+             (variable "PKG_CONFIG_FOR_BUILD")))
+          (package-native-search-paths %pkg-config)))))
-- 
2.33.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-08-30 12:58     ` [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Mathieu Othacehe
@ 2021-09-03 12:35       ` Maxime Devos
  2021-09-19 15:43         ` Mathieu Othacehe
  0 siblings, 1 reply; 71+ messages in thread
From: Maxime Devos @ 2021-09-03 12:35 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 50201


[-- Attachment #1.1: Type: text/plain, Size: 528 bytes --]

                                                                      Mathieu Othacehe schreef op ma 30-08-2021 om 14:58 [+0200]:
> Hey,
> 
> > +                         (string-append dir "/_giscanner.cpython-39-"
> > +                                        (normalise-system system) ".so"))
> 
> Won't this be "cpython-310-" or so when we will update the Python
> package definition?

Indeed.  I attached a patch independent of python's version number,
to be squashed in the v2 patch series.

Greetings,
Maxime

[-- Attachment #1.2: 0001-SQUASH-gobject-introspection-C-extension-correction.patch --]
[-- Type: text/x-patch, Size: 3982 bytes --]

From 653b54de7b24db588a6d063beab82ae2218153e5 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Fri, 3 Sep 2021 13:25:10 +0200
Subject: [PATCH] SQUASH! gobject-introspection! C extension correction!

* gnu/packages/glib.scm
  (python-extension-suffix, correct-library-name-phase): New procedures.
  (gobject-introspection)[arguments]<#:phases>{rename-library}: New phase.
---
 gnu/packages/glib.scm | 54 ++++++++++++++++++++++++++++++++-----------
 1 file changed, 41 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 0c2f548f62..6a9c2ac318 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -381,6 +381,42 @@ functions for strings and common data structures.")
                   (string-append doc html))
                  #t)))))))))
 
+(define (python-extension-suffix python triplet)
+  "Determine the suffix for C extensions for PYTHON when compiled
+for TRIPLET."
+  ;; python uses strings like 'x86_64-linux-gnu' instead of
+  ;; 'x86_64-unknown-linux-gnu'.
+  (define normalised-system
+    (string-replace-substring triplet "-unknown-" "-"))
+  (define major.minor (version-major+minor (package-version python)))
+  (define majorminor (string-delete #\. major.minor))
+  (string-append
+    ;; If guix' python package used "--with-pydebug", a #\d would
+    ;; need to be added, likewise "--with-pymalloc" and "--with-wide-unicode"
+    ;; would require a #\m and #\u, see cpython's configure.ac.
+    ".cpython-" majorminor "-" normalised-system
+    (if (target-mingw? triplet)
+        ".dll"
+        ".so")))
+
+(define (correct-library-name-phase python name)
+  "Return a G-exp evaluating to a phase renaming the python extension NAME
+from what Meson thinks its name should be to what python expects its name
+to be.  NAME must not include the platform-specific suffix.  This can only
+be used when cross-compiling."
+  #~(lambda _
+      (define name #$name)
+      (define native-suffix
+        #$(python-extension-suffix python
+                                   (nix-system->gnu-triplet (%current-system))))
+      (define target-suffix
+        #$(python-extension-suffix python (%current-target-system)))
+      (define native-name
+        (string-append name native-suffix))
+      (define target-name
+        (string-append name target-suffix))
+      (rename-file native-name target-name)))
+
 (define gobject-introspection
   (package
     (name "gobject-introspection")
@@ -431,19 +467,11 @@ functions for strings and common data structures.")
                ;; Meson gives python extensions an incorrect name, see
                ;; <https://github.com/mesonbuild/meson/issues/7049>.
                 #~((add-after 'install 'rename-library
-                     (lambda* (#:key build target #:allow-other-keys)
-                       (define dir
-                         (string-append #$output
-                                        "/lib/gobject-introspection/giscanner"))
-                       ;; python uses strings like 'x86_64-linux-gnu', not
-                       ;; 'x86_64-unknown-linux-gnu'.
-                       (define (normalise-system system)
-                         ((@ (ice-9 string-fun) string-replace-substring)
-                          system "-unknown-" "-"))
-                       (define (extension system)
-                         (string-append dir "/_giscanner.cpython-39-"
-                                        (normalise-system system) ".so"))
-                       (rename-file (extension build) (extension target)))))
+                     #$(correct-library-name-phase
+                         (this-package-input "python")
+                         #~(string-append #$output
+                                          "/lib/gobject-introspection/giscanner"
+                                          "/_giscanner"))))
                 #~()))))
     (native-inputs
      `(("glib" ,glib "bin")
-- 
2.33.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-08-31  9:49         ` Mathieu Othacehe
@ 2021-09-11 21:30           ` Maxime Devos
  0 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-09-11 21:30 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 50201

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

Mathieu Othacehe schreef op di 31-08-2021 om 11:49 [+0200]:
> Hey,
> 
> Thanks for investigating it.
> 
> > One ‘solution’ is to run g-ir-scanner under QEMU:
> > <https://maxice8.github.io/8-cross-the-gir/>;.  That isn't really cross-compilation
> > though, but emulated compilation, so it won't work with the Hurd.
> > Might be good enough for cross-compiling between Linux targets though ...
> 
> Yes, looks like some projects such as Yocto[1] and Void[2] are also
> using this solution.Requiring transparent emulating through QEMU while
> cross-compiling will for sure make the process more complex.

FWIW, IIUC, qemu-binfmt-style _transparent_ emulation is not required.  "meson" can
be told where to find the QEMU binary, with an option in the ‘cross file’.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-09-03 12:35       ` Maxime Devos
@ 2021-09-19 15:43         ` Mathieu Othacehe
  2021-09-19 18:25           ` Maxime Devos
  0 siblings, 1 reply; 71+ messages in thread
From: Mathieu Othacehe @ 2021-09-19 15:43 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 50201


Hello Maxime,

> Indeed.  I attached a patch independent of python's version number,
> to be squashed in the v2 patch series.

Nice, thanks. The series doesn't apply anymore, would you have a branch
somewhere that I could use?

Mathieu




^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-09-19 15:43         ` Mathieu Othacehe
@ 2021-09-19 18:25           ` Maxime Devos
  2021-09-20 11:22             ` bug#50201: " Mathieu Othacehe
  0 siblings, 1 reply; 71+ messages in thread
From: Maxime Devos @ 2021-09-19 18:25 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 50201

[-- Attachment #1: Type: text/plain, Size: 565 bytes --]

Mathieu Othacehe schreef op zo 19-09-2021 om 15:43 [+0000]:
> Hello Maxime,
> 
> > Indeed.  I attached a patch independent of python's version number,
> > to be squashed in the v2 patch series.
> 
> Nice, thanks. The series doesn't apply anymore, would you have a branch
> somewhere that I could use?

The merge conflicts were trivial (in the copyright lines).
Anyway, you could find a rebased branch at <https://notabug.org/maximed/guix-gnunet/src/gtk-cross-fixes1>
(untested) (commit: 3936dfc4d1c29bb5311caa3597ca272c8326f0c3).

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 71+ messages in thread

* bug#50201: [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-09-19 18:25           ` Maxime Devos
@ 2021-09-20 11:22             ` Mathieu Othacehe
  0 siblings, 0 replies; 71+ messages in thread
From: Mathieu Othacehe @ 2021-09-20 11:22 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 50201-done


Hello,

I pushed the series, with a minor modification to add a reference to our
discussion on introspection data cross-compilation.

It would be nice to remove the associated TODOs on core-updates while
this is still fresh.

Thanks for your work on that topic,

Mathieu




^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-09-02 14:53       ` Maxime Devos
@ 2021-09-22 19:10         ` Ludovic Courtès
  2021-09-23 10:38           ` Maxime Devos
  0 siblings, 1 reply; 71+ messages in thread
From: Ludovic Courtès @ 2021-09-22 19:10 UTC (permalink / raw)
  To: Maxime Devos; +Cc: Mathieu Othacehe, 50201

Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

> --- a/gnu/packages/pkg-config.scm
> +++ b/gnu/packages/pkg-config.scm
> @@ -139,7 +139,7 @@ build, or a GNU triplet."
>  ;; work because they both use the "PKG_CONFIG_PATH" environment variable.
>  (define-public pkg-config-for-build
>    (package
> -    (inherit (hidden-package pkg-config))
> +    (inherit (hidden-package %pkg-config))
>      (name "pkg-config-for-build")
>      (version "0")
>      (source #f)
> @@ -163,6 +163,8 @@ exec ~a \"$@\""
>                          (search-input-file %build-inputs "bin/pkg-config"))))
>              (chmod where #o500))))
>      (native-search-paths
> -     (list (search-path-specification
> -            (variable "PKG_CONFIG_PATH_FOR_BUILD")
> -            (files '("lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig")))))))
> +     (map (lambda (original)
> +            (search-path-specification
> +             (inherit original)
> +             (variable "PKG_CONFIG_FOR_BUILD")))
> +          (package-native-search-paths %pkg-config)))))

Isn’t that a typo, “PKG_CONFIG_FOR_BUILD” instead of
“PKG_CONFIG_PATH_FOR_BUILD” or (string-append name "_FOR_BUILD")?

The original spec above looked more appropriate to me.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-09-22 19:10         ` Ludovic Courtès
@ 2021-09-23 10:38           ` Maxime Devos
  2021-09-23 16:53             ` Maxime Devos
  0 siblings, 1 reply; 71+ messages in thread
From: Maxime Devos @ 2021-09-23 10:38 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Mathieu Othacehe, 50201


[-- Attachment #1.1: Type: text/plain, Size: 897 bytes --]

Ludovic Courtès schreef op wo 22-09-2021 om 21:10 [+0200]:
> 
> >      (native-search-paths
> > -     (list (search-path-specification
> > -            (variable "PKG_CONFIG_PATH_FOR_BUILD")
> > -            (files '("lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig")))))))
> > +     (map (lambda (original)
> > +            (search-path-specification
> > +             (inherit original)
> > +             (variable "PKG_CONFIG_FOR_BUILD")))
> > +          (package-native-search-paths %pkg-config)))))
> 
> Isn’t that a typo, “PKG_CONFIG_FOR_BUILD” instead of
> “PKG_CONFIG_PATH_FOR_BUILD” or (string-append name "_FOR_BUILD")?
> 
> The original spec above looked more appropriate to me.

Yes, it's a typo.  The attached patch should fix it (now running
./pre-inst-env guix build --target=... ...).  I wonder how I could have
missed this.

Greetings,
Maxime.

[-- Attachment #1.2: 0001-gnu-pkg-config-Fix-typo-in-search-paths.patch --]
[-- Type: text/x-patch, Size: 952 bytes --]

From d365cf26069984d2a10ea6f9cb1aafea023d30e6 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Thu, 23 Sep 2021 12:33:01 +0200
Subject: [PATCH core-updates-frozen] gnu: pkg-config: Fix typo in search
 paths.

* gnu/packages/pkg-config.scm
  (pkg-config-for-build)[native-search-paths]: Use "PKG_CONFIG_PATH_FOR_BUILD"
  instead of "PKG_CONFIG_PATH".
---
 gnu/packages/pkg-config.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/pkg-config.scm b/gnu/packages/pkg-config.scm
index 2b4173a7db..dd0d18ae36 100644
--- a/gnu/packages/pkg-config.scm
+++ b/gnu/packages/pkg-config.scm
@@ -166,5 +166,5 @@ exec ~a \"$@\""
      (map (lambda (original)
             (search-path-specification
              (inherit original)
-             (variable "PKG_CONFIG_FOR_BUILD")))
+             (variable "PKG_CONFIG_PATH_FOR_BUILD")))
           (package-native-search-paths %pkg-config)))))
-- 
2.33.0


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors
  2021-09-23 10:38           ` Maxime Devos
@ 2021-09-23 16:53             ` Maxime Devos
  0 siblings, 0 replies; 71+ messages in thread
From: Maxime Devos @ 2021-09-23 16:53 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Mathieu Othacehe, 50201

[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]

Maxime Devos schreef op do 23-09-2021 om 12:38 [+0200]:
> Ludovic Courtès schreef op wo 22-09-2021 om 21:10 [+0200]:
> > >      (native-search-paths
> > > -     (list (search-path-specification
> > > -            (variable "PKG_CONFIG_PATH_FOR_BUILD")
> > > -            (files '("lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig")))))))
> > > +     (map (lambda (original)
> > > +            (search-path-specification
> > > +             (inherit original)
> > > +             (variable "PKG_CONFIG_FOR_BUILD")))
> > > +          (package-native-search-paths %pkg-config)))))
> > 
> > Isn’t that a typo, “PKG_CONFIG_FOR_BUILD” instead of
> > “PKG_CONFIG_PATH_FOR_BUILD” or (string-append name "_FOR_BUILD")?
> > 
> > The original spec above looked more appropriate to me.
> 
> Yes, it's a typo.  The attached patch should fix it (now running
> ./pre-inst-env guix build --target=... ...). [...]

No pkg-config related build failures when doing
‘./pre-inst-env guix build --target=... gtk+’ so far.

>   I wonder how I could have
> missed this.
> 
> Greetings,
> Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 71+ messages in thread

end of thread, other threads:[~2021-09-23 16:54 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-25 17:55 [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Maxime Devos
2021-08-25 18:02 ` [bug#50201] [PATCH 01/52] gnu: dbus-glib: Support cross-compilation Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 02/52] gnu: elogind: Make #:configure-flags a G-exp Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 03/52] gnu: elogind: Fix cross-compilation Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 04/52] gnu: libcap: Fix cross-compilation build failures Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 05/52] gnu: perl: Find 'bash' when cross-compiling Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 06/52] gnu: nspr: Adjust to Mozilla cross-compilation conventions Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 07/52] gnu: nspr: Don't retain references to native inputs Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 08/52] gnu: mozjs-60: Fix cross-compilation build errors Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 09/52] gnu: poppler: Find pkg-config when cross-compiling Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 10/52] build-system/meson: Allow 'configure-flags' to be a G-exp Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 11/52] build-system/glib-or-gtk: Support cross-compilaton Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 12/52] gnu: dbus-cairo: Add missing bash-minimal input Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 13/52] gnu: polkit: Prevent cross-compilation build error Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 14/52] gnu: gobject-introspection: Don't build introspection data when cross-compiling Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 15/52] gobject-introspection: Fix inputs " Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 16/52] gobject-introspection: Correct library name " Maxime Devos
2021-08-30 12:58     ` [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Mathieu Othacehe
2021-09-03 12:35       ` Maxime Devos
2021-09-19 15:43         ` Mathieu Othacehe
2021-09-19 18:25           ` Maxime Devos
2021-09-20 11:22             ` bug#50201: " Mathieu Othacehe
2021-08-25 18:02   ` [bug#50201] [PATCH 17/52] gnu: atk: Disable introspection when cross-compiling Maxime Devos
2021-08-30 13:00     ` [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Mathieu Othacehe
2021-08-30 16:45       ` Maxime Devos
2021-08-31  9:49         ` Mathieu Othacehe
2021-09-11 21:30           ` Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 18/52] gnu: bdb: Fix cross-compilation build errors Maxime Devos
2021-08-25 18:02   ` [bug#50201] [PATCH 19/52] gnu: graphene: Don't build introspection data when cross-compiling Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 20/52] gnu: gamin: Recognise aarch64 as architecture " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 21/52] gnu: gamin: Fix 'configure' script " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 22/52] gnu: iso-codes: Move inputs to native-inputs " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 23/52] gnu: heimdal: Fix inputs " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 24/52] gnu: heimdal: Fix linking error " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 25/52] gnu: heimdal: Refer to cross-compiled bash Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 26/52] gnu: heimdal: Use the cross-compiled bash in "su" Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 27/52] gnu: heimdal: Find tools when cross-compiling Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 28/52] gnu: heimdal: Use libcom_err from input " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 29/52] gnu: json-glib: Add missing 'bash-minimal' input Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 30/52] gnu: json-glib: Find docbook inputs when cross-compiling Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 31/52] gnu: json-glib: Don't build gtk documentation " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 32/52] gnu: json-glib: Don't build introspection data " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 33/52] gnu: libthai: Add datrie as native-input " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 34/52] gnu: libdaemon: Support cross-compilation to aarch64-linux-gnu Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 35/52] gnu: avahi: Find 'TARGET-pkg-config' when cross-compiling Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 36/52] gnu: avahi: Use the cross-compiled bash Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 37/52] gnu: at-spi2-core: Don't cross-compile documentation Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 38/52] gnu: at-spi2-core: Find docbook when cross-compiling Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 39/52] gnu: at-spi2-core: Add missing "bash-minimal" input Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 40/52] gnu: xorg: Unify --disable-malloc0-returnsnull code Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 41/52] gnu: libxinerama: Add --disable-malloc0-returnsnull when necessary Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 42/52] gnu: libxi: " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 43/52] gnu: libxrandr: " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 44/52] gnu: libxxf85vm: " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 45/52] gnu: Add pkg-config-for-build Maxime Devos
2021-08-30 13:13     ` [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Mathieu Othacehe
2021-09-02 14:53       ` Maxime Devos
2021-09-22 19:10         ` Ludovic Courtès
2021-09-23 10:38           ` Maxime Devos
2021-09-23 16:53             ` Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 46/52] gnu: wayland: Find wayland-scanner when cross-compiling Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 47/52] gnu: wayland: Find docbook-xml " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 48/52] gnu: libproxy: Don't run tests " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 49/52] gnu: gdk-pixbuf: Find docbook " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 50/52] gnu: gdk-pixbuf: Add bash-minimal input " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 51/52] gnu: pango: " Maxime Devos
2021-08-25 18:03   ` [bug#50201] [PATCH 52/52] gnu: at-spi2-atk: Don't compile tests " Maxime Devos
2021-08-28 13:33 ` [bug#50201] [PATCH core-updates-frozen 0/52] Support cross-compilation in glib-or-gtk-build-system and fix cross-compilation errors Mathieu Othacehe
2021-08-30 12:16   ` Maxime Devos
2021-08-30 12:30     ` Mathieu Othacehe
2021-08-30 12:19 ` Maxime Devos

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.