GNU bug report logs - #56872
[PATCH] gnu: mu: Update to 1.8.7.

Previous Next

Package: guix-patches;

Reported by: muradm <mail <at> muradm.net>

Date: Mon, 1 Aug 2022 13:13:02 UTC

Severity: normal

Tags: patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

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

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

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


Report forwarded to guix-patches <at> gnu.org:
bug#56872; Package guix-patches. (Mon, 01 Aug 2022 13:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to muradm <mail <at> muradm.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 01 Aug 2022 13:13:02 GMT) Full text and rfc822 format available.

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

From: muradm <mail <at> muradm.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: mu: Update to 1.8.7.
Date: Mon,  1 Aug 2022 16:11:59 +0300
since 1.8:
* mu is built with meson build system.
* guile support is deprecated.

* gnu/packages/mail.scm (mu): Update to 1.8.7.
[source]: Changing from release tarball to checkout.
[build-system]: Changing to meson-build-system.
[native-inputs]: Removed glib:bin and tzdata, added gnupg amd texinfo.
[inputs]: Removed guile added coreutils (for /bin/rm command).
[arguments]: Removed obsolete 'patch-configure, 'fix-ffi and
'check-tz-setup phases. Added 'patch-bin-in-sources for
introduced /bin/rm command. Renamed and updated 'patch-bin-sh-in-tests
to 'patch-bin-in-tests.
---
 gnu/packages/mail.scm | 68 ++++++++++++++++++-------------------------
 1 file changed, 28 insertions(+), 40 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 556c5b4305..b57099de4d 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1161,57 +1161,45 @@ (define-public emacs-mew
 (define-public mu
   (package
     (name "mu")
-    (version "1.6.11")
+    (version "1.8.7")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/djcb/mu/releases/"
-                                  "download/" version "/"
-                                  "mu-" version ".tar.xz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/djcb/mu")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "13gchks9znyw0axw1wlks7f7h4442rfagmj7kx0jm3qhvi0b5sk0"))))
-    (build-system gnu-build-system)
+                "0yfbw234yqnqfnsn5bj1hqwpy78pkxn05vl18z8nvsqdmpzal4gx"))))
+    (build-system meson-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("glib" ,glib "bin")             ; for gtester
-       ("emacs" ,emacs-minimal)
-       ("tzdata" ,tzdata-for-tests)))   ; for mu/test/test-mu-query.c
+     (list pkg-config
+           emacs-minimal
+           gnupg                              ; for tests
+           texinfo))
     (inputs
-     (list xapian guile-3.0 glib gmime))
+     (list coreutils glib gmime xapian))
     (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (guix build emacs-utils))
-       #:imported-modules (,@%gnu-build-system-modules
+     `(#:modules ((guix build meson-build-system)
+                  (guix build emacs-utils)
+                  (guix build utils))
+       #:imported-modules (,@%meson-build-system-modules
                            (guix build emacs-utils))
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-configure
-           ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
-           ;; so our Emacs package can't find it.  Setting "--with-lispdir"
-           ;; configure flag doesn't help because "mu4e" will be added to
-           ;; the lispdir anyway, so we have to modify "configure.ac".
-           (lambda _
-             (substitute* "configure"
-               (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") ""))))
-         (add-after 'unpack 'patch-bin-sh-in-tests
+         (add-after 'unpack 'patch-bin-in-sources
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "lib/utils/mu-utils.cc"
+               (("/bin/rm") (search-input-file inputs "/bin/rm")))))
+         (add-after 'patch-bin-in-sources 'patch-bin-in-tests
            (lambda _
              (substitute* '("guile/tests/test-mu-guile.cc"
-                            "mu/test-mu-cmd.cc"
-                            "mu/test-mu-cmd-cfind.cc"
-                            "mu/test-mu-query.cc")
-               (("/bin/sh") (which "sh")))))
-         (add-before 'install 'fix-ffi
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "guile/mu.scm"
-               (("\"libguile-mu\"")
-                (format #f "\"~a/lib/libguile-mu\""
-                        (assoc-ref outputs "out"))))))
-         (add-before 'check 'check-tz-setup
-           (lambda* (#:key inputs #:allow-other-keys)
-             ;; For mu/test/test-mu-query.c
-             (setenv "TZDIR"
-                     (search-input-directory inputs "share/zoneinfo"))))
+                            "mu/tests/test-mu-cmd.cc"
+                            "mu/tests/test-mu-cmd-cfind.cc"
+                            "mu/tests/test-mu-query.cc")
+               (("/bin/sh") (which "sh")))
+             (substitute* '("lib/tests/bench-indexer.cc")
+               (("/bin/rm") (which "rm")))))
          (add-after 'install 'install-emacs-autoloads
            (lambda* (#:key outputs #:allow-other-keys)
              (emacs-generate-autoloads
-- 
2.37.1





Information forwarded to guix-patches <at> gnu.org:
bug#56872; Package guix-patches. (Mon, 01 Aug 2022 13:42:02 GMT) Full text and rfc822 format available.

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

From: muradm <mail <at> muradm.net>
To: 56872 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: mu: Update to 1.8.7.
Date: Mon,  1 Aug 2022 16:41:01 +0300
since 1.8:
* mu is built with meson build system.
* guile support is deprecated.

* gnu/packages/mail.scm (mu): Update to 1.8.7.
[source]: Changing from release tarball to checkout.
[build-system]: Changing to meson-build-system.
[native-inputs]: Removed glib:bin and tzdata, added gnupg amd texinfo.
[inputs]: Removed guile added coreutils (for /bin/rm command).
[arguments]: Removed obsolete 'patch-configure, 'fix-ffi and
'check-tz-setup phases. Added 'patch-bin-in-sources for
introduced /bin/rm command. Renamed and updated 'patch-bin-sh-in-tests
to 'patch-bin-in-tests.
---
 gnu/packages/mail.scm | 66 +++++++++++++++++--------------------------
 1 file changed, 26 insertions(+), 40 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 556c5b4305..2c06a1a9ba 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -48,6 +48,7 @@
 ;;; Copyright © 2022 Justin Veilleux <terramorpha <at> cock.li>
 ;;; Copyright © 2022 Thiago Jung Bauermann <bauermann <at> kolabnow.com>
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv <at> posteo.net>
+;;; Copyright © 2022 muradm <mail <at> muradm.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1161,57 +1162,42 @@ (define-public emacs-mew
 (define-public mu
   (package
     (name "mu")
-    (version "1.6.11")
+    (version "1.8.7")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/djcb/mu/releases/"
-                                  "download/" version "/"
-                                  "mu-" version ".tar.xz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/djcb/mu")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "13gchks9znyw0axw1wlks7f7h4442rfagmj7kx0jm3qhvi0b5sk0"))))
-    (build-system gnu-build-system)
+                "0yfbw234yqnqfnsn5bj1hqwpy78pkxn05vl18z8nvsqdmpzal4gx"))))
+    (build-system meson-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("glib" ,glib "bin")             ; for gtester
-       ("emacs" ,emacs-minimal)
-       ("tzdata" ,tzdata-for-tests)))   ; for mu/test/test-mu-query.c
+     (list emacs-minimal
+           gnupg                              ; for tests
+           pkg-config
+           texinfo))
     (inputs
-     (list xapian guile-3.0 glib gmime))
+     (list glib gmime xapian))
     (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (guix build emacs-utils))
-       #:imported-modules (,@%gnu-build-system-modules
+     `(#:modules ((guix build meson-build-system)
+                  (guix build emacs-utils)
+                  (guix build utils))
+       #:imported-modules (,@%meson-build-system-modules
                            (guix build emacs-utils))
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-configure
-           ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
-           ;; so our Emacs package can't find it.  Setting "--with-lispdir"
-           ;; configure flag doesn't help because "mu4e" will be added to
-           ;; the lispdir anyway, so we have to modify "configure.ac".
-           (lambda _
-             (substitute* "configure"
-               (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") ""))))
-         (add-after 'unpack 'patch-bin-sh-in-tests
+         (add-after 'unpack 'patch-bin-in-tests
            (lambda _
              (substitute* '("guile/tests/test-mu-guile.cc"
-                            "mu/test-mu-cmd.cc"
-                            "mu/test-mu-cmd-cfind.cc"
-                            "mu/test-mu-query.cc")
-               (("/bin/sh") (which "sh")))))
-         (add-before 'install 'fix-ffi
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "guile/mu.scm"
-               (("\"libguile-mu\"")
-                (format #f "\"~a/lib/libguile-mu\""
-                        (assoc-ref outputs "out"))))))
-         (add-before 'check 'check-tz-setup
-           (lambda* (#:key inputs #:allow-other-keys)
-             ;; For mu/test/test-mu-query.c
-             (setenv "TZDIR"
-                     (search-input-directory inputs "share/zoneinfo"))))
+                            "mu/tests/test-mu-cmd.cc"
+                            "mu/tests/test-mu-cmd-cfind.cc"
+                            "mu/tests/test-mu-query.cc")
+               (("/bin/sh") (which "sh")))
+             (substitute* '("lib/utils/mu-utils.cc"
+                            "lib/tests/bench-indexer.cc")
+               (("/bin/rm") (which "rm")))))
          (add-after 'install 'install-emacs-autoloads
            (lambda* (#:key outputs #:allow-other-keys)
              (emacs-generate-autoloads
-- 
2.37.1





Information forwarded to guix-patches <at> gnu.org:
bug#56872; Package guix-patches. (Mon, 01 Aug 2022 13:46:02 GMT) Full text and rfc822 format available.

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

From: muradm <mail <at> muradm.net>
To: 56872 <at> debbugs.gnu.org
Subject: [PATCH v3] gnu: mu: Update to 1.8.7.
Date: Mon,  1 Aug 2022 16:44:54 +0300
since 1.8:
* mu is built with meson build system.
* guile support is deprecated.

* gnu/packages/mail.scm (mu): Update to 1.8.7.
[source]: Changing from release tarball to checkout.
[build-system]: Changing to meson-build-system.
[native-inputs]: Removed glib:bin and tzdata, added gnupg amd texinfo.
[inputs]: Removed guile added coreutils (for /bin/rm command).
[arguments]: Removed obsolete 'patch-configure, 'fix-ffi and
'check-tz-setup phases. Added 'patch-bin-in-sources for
introduced /bin/rm command. Renamed and updated 'patch-bin-sh-in-tests
to 'patch-bin-in-tests.
---
 gnu/packages/mail.scm | 66 +++++++++++++++++--------------------------
 1 file changed, 26 insertions(+), 40 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 556c5b4305..2c06a1a9ba 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -48,6 +48,7 @@
 ;;; Copyright © 2022 Justin Veilleux <terramorpha <at> cock.li>
 ;;; Copyright © 2022 Thiago Jung Bauermann <bauermann <at> kolabnow.com>
 ;;; Copyright © 2022 Guillaume Le Vaillant <glv <at> posteo.net>
+;;; Copyright © 2022 muradm <mail <at> muradm.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1161,57 +1162,42 @@ (define-public emacs-mew
 (define-public mu
   (package
     (name "mu")
-    (version "1.6.11")
+    (version "1.8.7")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/djcb/mu/releases/"
-                                  "download/" version "/"
-                                  "mu-" version ".tar.xz"))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/djcb/mu")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "13gchks9znyw0axw1wlks7f7h4442rfagmj7kx0jm3qhvi0b5sk0"))))
-    (build-system gnu-build-system)
+                "0yfbw234yqnqfnsn5bj1hqwpy78pkxn05vl18z8nvsqdmpzal4gx"))))
+    (build-system meson-build-system)
     (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("glib" ,glib "bin")             ; for gtester
-       ("emacs" ,emacs-minimal)
-       ("tzdata" ,tzdata-for-tests)))   ; for mu/test/test-mu-query.c
+     (list emacs-minimal
+           gnupg                              ; for tests
+           pkg-config
+           texinfo))
     (inputs
-     (list xapian guile-3.0 glib gmime))
+     (list glib gmime xapian))
     (arguments
-     `(#:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (guix build emacs-utils))
-       #:imported-modules (,@%gnu-build-system-modules
+     `(#:modules ((guix build meson-build-system)
+                  (guix build emacs-utils)
+                  (guix build utils))
+       #:imported-modules (,@%meson-build-system-modules
                            (guix build emacs-utils))
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-configure
-           ;; By default, elisp code goes to "share/emacs/site-lisp/mu4e",
-           ;; so our Emacs package can't find it.  Setting "--with-lispdir"
-           ;; configure flag doesn't help because "mu4e" will be added to
-           ;; the lispdir anyway, so we have to modify "configure.ac".
-           (lambda _
-             (substitute* "configure"
-               (("^ +lispdir=\"\\$\\{lispdir\\}/mu4e/\".*") ""))))
-         (add-after 'unpack 'patch-bin-sh-in-tests
+         (add-after 'unpack 'patch-bin-in-tests
            (lambda _
              (substitute* '("guile/tests/test-mu-guile.cc"
-                            "mu/test-mu-cmd.cc"
-                            "mu/test-mu-cmd-cfind.cc"
-                            "mu/test-mu-query.cc")
-               (("/bin/sh") (which "sh")))))
-         (add-before 'install 'fix-ffi
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "guile/mu.scm"
-               (("\"libguile-mu\"")
-                (format #f "\"~a/lib/libguile-mu\""
-                        (assoc-ref outputs "out"))))))
-         (add-before 'check 'check-tz-setup
-           (lambda* (#:key inputs #:allow-other-keys)
-             ;; For mu/test/test-mu-query.c
-             (setenv "TZDIR"
-                     (search-input-directory inputs "share/zoneinfo"))))
+                            "mu/tests/test-mu-cmd.cc"
+                            "mu/tests/test-mu-cmd-cfind.cc"
+                            "mu/tests/test-mu-query.cc")
+               (("/bin/sh") (which "sh")))
+             (substitute* '("lib/utils/mu-utils.cc"
+                            "lib/tests/bench-indexer.cc")
+               (("/bin/rm") (which "rm")))))
          (add-after 'install 'install-emacs-autoloads
            (lambda* (#:key outputs #:allow-other-keys)
              (emacs-generate-autoloads
-- 
2.37.1





Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Mon, 01 Aug 2022 14:07:01 GMT) Full text and rfc822 format available.

Notification sent to muradm <mail <at> muradm.net>:
bug acknowledged by developer. (Mon, 01 Aug 2022 14:07:02 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 56872-done <at> debbugs.gnu.org
Subject: [PATCH] gnu: mu: Update to 1.8.7.
Date: Mon, 01 Aug 2022 16:05:09 +0200
Applied with commit 7e3234cb709076c8f4514f8b9320a0585dd9c958.

I made a few changes while you were worknig on v2 and v3, so the result
is an amalgamation of these patches.

-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#56872; Package guix-patches. (Tue, 02 Aug 2022 16:26:02 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: muradm <mail <at> muradm.net>, 56872 <at> debbugs.gnu.org
Subject: Re: [bug#56872] [PATCH v2] gnu: mu: Update to 1.8.7.
Date: Tue, 2 Aug 2022 18:25:51 +0200
[Message part 1 (text/plain, inline)]
On 01-08-2022 15:41, muradm wrote:
> +             (substitute* '("lib/utils/mu-utils.cc"
> +                            "lib/tests/bench-indexer.cc")
> +               (("/bin/rm") (which "rm")))))

The lib/utils/mu-utils.cc + 'which' looks wrong when cross-compiling -- 
try using search-input-file on 'inputs' instead (which looks in 
native-inputs (which happens to be merged with inputs when compiling 
natively))).

(If it does not end up in the binary, then 'which' should be fine)

> [inputs]: Removed guile added coreutils (for /bin/rm command).
I'm not seeing coreutils in there.

Greetings,
Maxime

[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#56872; Package guix-patches. (Tue, 02 Aug 2022 19:08:02 GMT) Full text and rfc822 format available.

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

From: muradm <mail <at> muradm.net>
To: Maxime Devos <maximedevos <at> telenet.be>, 56872 <at> debbugs.gnu.org
Subject: Re: [bug#56872] [PATCH v2] gnu: mu: Update to 1.8.7.
Date: Tue, 02 Aug 2022 22:03:06 +0300
[Message part 1 (text/plain, inline)]
Hi,

This patch worked for me in my host.
I don't have any environment to see if working when
actually cross-compiling.

For the comment on coreutils, yeah missed update when removed.

[0001-gnu-mu-Fix-cross-compiling.patch (text/x-patch, inline)]
From b688acbb5b9d6d65606edf2164cad09c9cf06225 Mon Sep 17 00:00:00 2001
From: muradm <mail <at> muradm.net>
Date: Tue, 2 Aug 2022 21:57:57 +0300
Subject: [PATCH] gnu: mu: Fix cross-compiling.
To: Maxime Devos <maximedevos <at> telenet.be>,
    56872 <at> debbugs.gnu.org

* gnu/packages/mail.scm (mu)[arguments]: Use search-input-file
to find /bin/sh and /bin/rm from inputs.
---
 gnu/packages/mail.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index ca4b3e819e..3776157c0b 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1189,15 +1189,15 @@ (define-public mu
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-bin-references
-           (lambda _
+           (lambda* (#:key inputs #:allow-other-keys)
              (substitute* '("guile/tests/test-mu-guile.cc"
                             "mu/tests/test-mu-cmd.cc"
                             "mu/tests/test-mu-cmd-cfind.cc"
                             "mu/tests/test-mu-query.cc")
-               (("/bin/sh") (which "sh")))
+               (("/bin/sh") (search-input-file inputs "/bin/sh")))
              (substitute* '("lib/tests/bench-indexer.cc"
                             "lib/utils/mu-utils.cc")
-               (("/bin/rm") (which "rm")))))
+               (("/bin/rm") (search-input-file inputs "/bin/rm")))))
          (add-after 'install 'install-emacs-autoloads
            (lambda* (#:key outputs #:allow-other-keys)
              (emacs-generate-autoloads
-- 
2.37.1

[Message part 3 (text/plain, inline)]
Maxime Devos <maximedevos <at> telenet.be> writes:

> [[PGP Signed Part:Undecided]]
>
> On 01-08-2022 15:41, muradm wrote:
>> +             (substitute* '("lib/utils/mu-utils.cc"
>> +                            "lib/tests/bench-indexer.cc")
>> +               (("/bin/rm") (which "rm")))))
>
> The lib/utils/mu-utils.cc + 'which' looks wrong when 
> cross-compiling
> -- try using search-input-file on 'inputs' instead (which looks 
> in
> native-inputs (which happens to be merged with inputs when 
> compiling
> natively))).
>
> (If it does not end up in the binary, then 'which' should be 
> fine)
>
>> [inputs]: Removed guile added coreutils (for /bin/rm command).
> I'm not seeing coreutils in there.
>
> Greetings,
> Maxime
>
> [2. OpenPGP public key --- application/pgp-keys; 
> OpenPGP_0x49E3EE22191725EE.asc]...
>
> [[End of PGP Signed Part]]

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#56872; Package guix-patches. (Tue, 02 Aug 2022 19:15:02 GMT) Full text and rfc822 format available.

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

From: "(" <paren <at> disroot.org>
To: "muradm" <mail <at> muradm.net>, "Maxime Devos" <maximedevos <at> telenet.be>,
 <56872 <at> debbugs.gnu.org>
Subject: Re: [bug#56872] [PATCH v2] gnu: mu: Update to 1.8.7.
Date: Tue, 02 Aug 2022 20:14:51 +0100
On Tue Aug 2, 2022 at 8:03 PM BST, muradm wrote:
> I don't have any environment to see if working when
> actually cross-compiling.
You can cross-compile to any architecture you want if you add
`qemu-binfmt-service-type` to your system config and specify
the architectures you want. Then you just need to do something
like:

ʃ guix build --system=aarch64-linux mu
ʃ guix build --system=riscv64-linux mu

Also, on x86-64, you can cross-compile to x86-32 without any
emulation:

ʃ guix build --system=i686-linux mu

    -- (




Information forwarded to guix-patches <at> gnu.org:
bug#56872; Package guix-patches. (Tue, 02 Aug 2022 19:29:01 GMT) Full text and rfc822 format available.

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

From: muradm <mail <at> muradm.net>
To: "(" <paren <at> disroot.org>
Cc: Maxime Devos <maximedevos <at> telenet.be>, 56872 <at> debbugs.gnu.org
Subject: Re: [bug#56872] [PATCH v2] gnu: mu: Update to 1.8.7.
Date: Tue, 02 Aug 2022 22:27:10 +0300
[Message part 1 (text/plain, inline)]
Thanks, I know.
My laptop won't survive, to be correct.
That what I ment :)

"(" <paren <at> disroot.org> writes:

> On Tue Aug 2, 2022 at 8:03 PM BST, muradm wrote:
>> I don't have any environment to see if working when
>> actually cross-compiling.
> You can cross-compile to any architecture you want if you add
> `qemu-binfmt-service-type` to your system config and specify
> the architectures you want. Then you just need to do something
> like:
>
> ʃ guix build --system=aarch64-linux mu
> ʃ guix build --system=riscv64-linux mu
>
> Also, on x86-64, you can cross-compile to x86-32 without any
> emulation:
>
> ʃ guix build --system=i686-linux mu
>
>     -- (

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#56872; Package guix-patches. (Tue, 02 Aug 2022 19:54:02 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: "(" <paren <at> disroot.org>, muradm <mail <at> muradm.net>, 56872 <at> debbugs.gnu.org
Subject: Re: [bug#56872] [PATCH v2] gnu: mu: Update to 1.8.7.
Date: Tue, 2 Aug 2022 21:53:15 +0200
[Message part 1 (text/plain, inline)]
On 02-08-2022 21:14, ( wrote:
> On Tue Aug 2, 2022 at 8:03 PM BST, muradm wrote:
>> I don't have any environment to see if working when
>> actually cross-compiling.
> You can cross-compile to any architecture you want if you add
> `qemu-binfmt-service-type` to your system config and specify
> the architectures you want. Then you just need to do something
> like:
>
> ʃ guix build --system=aarch64-linux mu
> ʃ guix build --system=riscv64-linux mu
>
> Also, on x86-64, you can cross-compile to x86-32 without any
> emulation:
>
> ʃ guix build --system=i686-linux mu
>
>      -- (

This is 'QEMU transparent emulation' -- from Guix' perspective, this is 
not cross-compilation (see: transparent), but rather it is as-if you 
were compiling natively on a aarch64 or riscv64 instead of 
cross-compiling from a <insert your CPU type> to aarch64 or riscv64.

Instead, try:

$ guix build --target=aarch64-linux-gnu mu
$ guix build --target=aarch64-linux-gnu mu

, which exercises Guix' cross-compilation codepaths.

--system: system to run the compilation process on (possibly emulated)

--target: system to cross-compile _to_/system on which the _result_ of 
compilation will be run.

Also, you don't need a aarch64 or riscv64 to check the references (try 
"guix graph --type=references $(./pre-inst-env guix build mu 
--target=..." or "guix gc --references $(./pre-inst-env guix build mu 
--target=...)") and check that the 'mu' doesn't point to coreutils).

Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#56872; Package guix-patches. (Tue, 02 Aug 2022 20:00:02 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: muradm <mail <at> muradm.net>, "(" <paren <at> disroot.org>
Cc: 56872 <at> debbugs.gnu.org
Subject: Re: [bug#56872] [PATCH v2] gnu: mu: Update to 1.8.7.
Date: Tue, 2 Aug 2022 21:59:56 +0200
[Message part 1 (text/plain, inline)]
On 02-08-2022 21:27, muradm wrote:
>
> Thanks, I know.
> My laptop won't survive, to be correct.
> That what I ment :)

The build farm has substitutes for the cross-compiler and the 
cross-compiled glib (at least if you are cross-compiling from 
x86_64-linux), so except for downloading some additional substitutes, 
cross-compiling mu should not take much longer than compiling natively 
(assuming the substitute server is authorised).

In fact, for me it finished after a few seconds because of dependency 
pth fails to cross-compile:

> checking size of short... grep: /usr/include/features.h: No such file 
> or directory
> [...]
>
> ./libtool --mode=compile --quiet aarch64-linux-gnu-gcc -c -I. -O2 
> -pipe pth_mctx.c
> pth_mctx.c: In function '__pth_mctx_set':
> pth_mctx.c:480:2: error: #error "Unsupported Linux (g)libc version 
> and/or platform"
>   480 | #error "Unsupported Linux (g)libc version and/or platform"
>       |  ^~~~~
> make: *** [Makefile:155: pth_mctx.lo] Error 1
> error: in phase 'build': uncaught exception:
>
Greetings,
Maxime.

[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#56872; Package guix-patches. (Tue, 02 Aug 2022 20:17:02 GMT) Full text and rfc822 format available.

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

From: muradm <mail <at> muradm.net>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: "\(" <paren <at> disroot.org>, 56872 <at> debbugs.gnu.org
Subject: Re: [bug#56872] [PATCH v2] gnu: mu: Update to 1.8.7.
Date: Tue, 02 Aug 2022 23:13:53 +0300
[Message part 1 (text/plain, inline)]
From below error I see that it is pth package failing to build.
Most likely there are others that are not getting built.
Does it mean that it was never built before mu-1.8.7?
Does it mean that we sould restrict mu-1.8.7 by platform?

Maxime Devos <maximedevos <at> telenet.be> writes:

> [[PGP Signed Part:Undecided]]
>
> On 02-08-2022 21:27, muradm wrote:
>>
>> Thanks, I know.
>> My laptop won't survive, to be correct.
>> That what I ment :)
>
> The build farm has substitutes for the cross-compiler and the
> cross-compiled glib (at least if you are cross-compiling from
> x86_64-linux), so except for downloading some additional 
> substitutes,
> cross-compiling mu should not take much longer than compiling 
> natively
> (assuming the substitute server is authorised).
>
> In fact, for me it finished after a few seconds because of 
> dependency
> pth fails to cross-compile:
>
>> checking size of short... grep: /usr/include/features.h: No 
>> such
>> file or directory
>> [...]
>>
>> ./libtool --mode=compile --quiet aarch64-linux-gnu-gcc -c -I. 
>> -O2
>> -pipe pth_mctx.c
>> pth_mctx.c: In function '__pth_mctx_set':
>> pth_mctx.c:480:2: error: #error "Unsupported Linux (g)libc 
>> version
>> and/or platform"
>>   480 | #error "Unsupported Linux (g)libc version and/or 
>> platform"
>>       |  ^~~~~
>> make: *** [Makefile:155: pth_mctx.lo] Error 1
>> error: in phase 'build': uncaught exception:
>>
> Greetings,
> Maxime.
>
> [2. OpenPGP public key --- application/pgp-keys; 
> OpenPGP_0x49E3EE22191725EE.asc]...
>
> [[End of PGP Signed Part]]

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#56872; Package guix-patches. (Tue, 02 Aug 2022 20:20:01 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: muradm <mail <at> muradm.net>
Cc: "\(" <paren <at> disroot.org>, 56872 <at> debbugs.gnu.org
Subject: Re: [bug#56872] [PATCH v2] gnu: mu: Update to 1.8.7.
Date: Tue, 2 Aug 2022 22:19:03 +0200
[Message part 1 (text/plain, inline)]
On 02-08-2022 22:13, muradm wrote:
> From below error I see that it is pth package failing to build.
> Most likely there are others that are not getting built.
> Does it mean that it was never built before mu-1.8.7?
> Does it mean that we sould restrict mu-1.8.7 by platform?
>
It fails to cross-compile to aarch64-linux (--target), but it compiles 
fine natively (--system without --target), so I don't think adjusting 
'supported-systems' is necessary.  Rather, it seems to me that pth' 
configure script should eventually be tweaked to support 
aarch64-linux-gnu not only when compiling natively, but also when 
cross-compiling.

Greetings,
Maxime.


[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 31 Aug 2022 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 296 days ago.

Previous Next


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