GNU bug report logs - #54580
[PATCH staging?] gnu: mrustc: Update to 0.10.

Previous Next

Package: guix-patches;

Reported by: Pierre Langlois <pierre.langlois <at> gmx.com>

Date: Sat, 26 Mar 2022 13:35:01 UTC

Severity: normal

Tags: patch

Done: Pierre Langlois <pierre.langlois <at> gmx.com>

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 54580 in the body.
You can then email your comments to 54580 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#54580; Package guix-patches. (Sat, 26 Mar 2022 13:35:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 26 Mar 2022 13:35:01 GMT) Full text and rfc822 format available.

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

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: guix-patches <at> gnu.org
Subject: [PATCH staging?] gnu: mrustc: Update to 0.10.
Date: Sat, 26 Mar 2022 13:27:15 +0000
[Message part 1 (text/plain, inline)]
Hi Guix!

Good news everyone, I managed to get a aarch64 build of Rust by updating
mrustc to 0.10!  Sadly, i686 is still unsupported, due to the build
using too much memory, it must be the same for other 32-bit architectures.

I tested this on a pinebookpro which only has 4G of RAM, I had to attach
16G of swap for the initial rust <at> 1.39 build to succeed, then the whole
rust chain took about 5 days!  I also tested on my x86_64 desktop.

Here's the patch! After it we should be able to follow-up and enable
Gnome and friends.

That being said, I wasn't entirely sure where this patch should go,
ideally it would be good to have a staging branch rather than
core-updates, WDYT?  Maybe we can do this along with a rust version
update?

PS: I also tried to build rust 1.54 with the new mrustc update, to
shorten the chain, but I've not had any successes with it yet.

[signature.asc (application/pgp-signature, inline)]
[0001-gnu-mrustc-Update-to-0.10.patch (text/x-patch, inline)]
From 555b3b21ead25d09b56e6287d5542da1abfb13c4 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois <at> gmx.com>
Date: Sat, 26 Mar 2022 13:21:17 +0000
Subject: [PATCH] gnu: mrustc: Update to 0.10.

And enable rust for aarch64-linux!

* gnu/packages/rust.scm (%mrustc-commit): Update hash.
(%mrustc-source): Update to 0.10.
(rust-1.39)[arguments]: Move and adapt the substitute* that prevent
fetching sources.  Patch /bin/sh in run_rustc/rustc_proxy.sh.
[supported-systems]: Add aarch64-linux.
---
 gnu/packages/rust.scm | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 26d6df7a94..7a841e4326 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -124,9 +124,9 @@ (define* (rust-bootstrapped-package base-rust version checksum)
 ;;; to be used in source form.  The latest support for bootstrapping from
 ;;; 1.39.0 is not yet released so use the latest commit (see:
 ;;; https://github.com/thepowersgang/mrustc/issues/185).
-(define %mrustc-commit "c7066542f8e93d320323749216bf3c82aecb67c2")
+(define %mrustc-commit "b364724f15fd6fce8234ad8add68107c23a22151")
 (define %mrustc-source
-  (let* ((version "0.9")
+  (let* ((version "0.10")
          (commit %mrustc-commit)
          (revision "1")
          (name "mrustc"))
@@ -138,7 +138,7 @@ (define %mrustc-source
       (file-name (git-file-name name (git-version version revision commit)))
       (sha256
        (base32
-        "0zv1x6601s5fnnkcdlqkc4bknisqz569qb0iyb9rjsmaf1kh0na3")))))
+        "0f7kh4n2663sn0z3xib8gzw0s97qpvwag40g2vs3bfjlrbpgi9z0")))))

 ;;; Rust 1.39 is special in that it is built with mrustc, which shortens the
 ;;; bootstrap path.
@@ -237,10 +237,11 @@ (define rust-1.39
                      ,(string-take %mrustc-commit 7) "\\\""
                      " -D VERSION_BUILDTIME="
                      "\"\\\"Thu, 01 Jan 1970 00:00:01 +0000\\\"\""
-                     " -D VERSION_GIT_ISDIRTY=0\n"))
+                     " -D VERSION_GIT_ISDIRTY=0\n")))
+                 (substitute* "minicargo.mk"
                    ;; Do not try to fetch sources from the Internet.
-                   ((": \\$\\(RUSTC_SRC_DL\\)")
-                    ":"))
+                   (("\\$\\(MINICARGO\\) \\$\\(RUSTC_SRC_DL\\)")
+                    "$(MINICARGO)"))
                  (substitute* "run_rustc/Makefile"
                    (("[$]Vtime ")
                     "$V ")
@@ -248,6 +249,9 @@ (define rust-1.39
                    (("-j [[:digit:]]+ ")
                     "")
                    ;; Patch the shebang of a generated wrapper for rustc
+                   (("#!/bin/sh")
+                    (string-append "#!" (which "sh"))))
+                 (substitute* "run_rustc/rustc_proxy.sh"
                    (("#!/bin/sh")
                     (string-append "#!" (which "sh"))))))))
          (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums
@@ -322,9 +326,9 @@ (define rust-1.39
 safety and thread safety guarantees.")
     (home-page "https://github.com/thepowersgang/mrustc")

-    ;; So far mrustc is x86_64-only.  It may support i686 soon:
+    ;; So far mrustc is (x86_64|aarch64)-only.  It may support i686 soon:
     ;; <https://github.com/thepowersgang/mrustc/issues/78>.
-    (supported-systems '("x86_64-linux"))
+    (supported-systems '("x86_64-linux" "aarch64-linux"))

     ;; Dual licensed.
     (license (list license:asl2.0 license:expat))))
--
2.34.0

[Message part 4 (text/plain, inline)]
Thanks,
Pierre

Information forwarded to guix-patches <at> gnu.org:
bug#54580; Package guix-patches. (Sat, 26 Mar 2022 14:19:02 GMT) Full text and rfc822 format available.

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

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Pierre Langlois <pierre.langlois <at> gmx.com>
Cc: 54580 <at> debbugs.gnu.org
Subject: Re: [bug#54580] [PATCH staging?] gnu: mrustc: Update to 0.10.
Date: Sat, 26 Mar 2022 14:16:06 +0000
[Message part 1 (text/plain, inline)]
Pierre Langlois <pierre.langlois <at> gmx.com> writes:

> [[PGP Signed Part:Undecided]]
> Hi Guix!
>
> Good news everyone, I managed to get a aarch64 build of Rust by updating
> mrustc to 0.10!  Sadly, i686 is still unsupported, due to the build
> using too much memory, it must be the same for other 32-bit architectures.
>
> I tested this on a pinebookpro which only has 4G of RAM, I had to attach
> 16G of swap for the initial rust <at> 1.39 build to succeed, then the whole
> rust chain took about 5 days!  I also tested on my x86_64 desktop.
>
> Here's the patch! After it we should be able to follow-up and enable
> Gnome and friends.
>
> That being said, I wasn't entirely sure where this patch should go,
> ideally it would be good to have a staging branch rather than
> core-updates, WDYT?  Maybe we can do this along with a rust version
> update?
>
> PS: I also tried to build rust 1.54 with the new mrustc update, to
> shorten the chain, but I've not had any successes with it yet.
>
> [[End of PGP Signed Part]]
> From 555b3b21ead25d09b56e6287d5542da1abfb13c4 Mon Sep 17 00:00:00 2001
> From: Pierre Langlois <pierre.langlois <at> gmx.com>
> Date: Sat, 26 Mar 2022 13:21:17 +0000
> Subject: [PATCH] gnu: mrustc: Update to 0.10.
>
> And enable rust for aarch64-linux!
>
> * gnu/packages/rust.scm (%mrustc-commit): Update hash.
> (%mrustc-source): Update to 0.10.
> (rust-1.39)[arguments]: Move and adapt the substitute* that prevent
> fetching sources.  Patch /bin/sh in run_rustc/rustc_proxy.sh.
> [supported-systems]: Add aarch64-linux.
> ---
>  gnu/packages/rust.scm | 20 ++++++++++++--------
>  1 file changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
> index 26d6df7a94..7a841e4326 100644
> --- a/gnu/packages/rust.scm
> +++ b/gnu/packages/rust.scm
> @@ -124,9 +124,9 @@ (define* (rust-bootstrapped-package base-rust version checksum)
>  ;;; to be used in source form.  The latest support for bootstrapping from
>  ;;; 1.39.0 is not yet released so use the latest commit (see:
>  ;;; https://github.com/thepowersgang/mrustc/issues/185).

Oh, I forgot to adapt this comment, the last sentence can be removed now
there's a release.  Attached a fixed patch.

[signature.asc (application/pgp-signature, inline)]
[0001-gnu-mrustc-Update-to-0.10.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#54580; Package guix-patches. (Sat, 26 Mar 2022 14:59:01 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Pierre Langlois <pierre.langlois <at> gmx.com>
Cc: 54580 <at> debbugs.gnu.org
Subject: Re: [bug#54580] [PATCH staging?] gnu: mrustc: Update to 0.10.
Date: Sat, 26 Mar 2022 15:58:33 +0100
[Message part 1 (text/plain, inline)]
Pierre Langlois schreef op za 26-03-2022 om 14:16 [+0000]:
> +    (supported-systems '("x86_64-linux" "aarch64-linux"))

Looks nice!  Does this mean that the Rust version of librsvg can now
be used in 'librsvg-for-system' on aarch64?

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

Information forwarded to guix-patches <at> gnu.org:
bug#54580; Package guix-patches. (Sat, 26 Mar 2022 15:10:03 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Pierre Langlois <pierre.langlois <at> gmx.com>, 54580 <at> debbugs.gnu.org, 
 54439 <at> debbugs.gnu.org
Subject: Re: [bug#54580] [PATCH staging?] gnu: mrustc: Update to 0.10.
Date: Sat, 26 Mar 2022 16:09:28 +0100
[Message part 1 (text/plain, inline)]
Pierre Langlois schreef op za 26-03-2022 om 13:27 [+0000]:
> That being said, I wasn't entirely sure where this patch should go,
> ideally it would be good to have a staging branch rather than
> core-updates, WDYT?  Maybe we can do this along with a rust version
> update?

While it would cause many rebuilds, it seems highly unlikely to
actually break anything, as it only changes some early parts of the
Rust bootstrapping process, so build farm capacity permitting, I would
go with a staging branch (not necessarily the "staging" branch, just
_a_ staging branch).

Doing it together with a rust version update seems reasonable to me
(see <https://issues.guix.gnu.org/54439#10>).

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

Information forwarded to guix-patches <at> gnu.org:
bug#54580; Package guix-patches. (Sat, 26 Mar 2022 15:13:02 GMT) Full text and rfc822 format available.

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

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>, 54580 <at> debbugs.gnu.org
Subject: Re: [bug#54580] [PATCH staging?] gnu: mrustc: Update to 0.10.
Date: Sat, 26 Mar 2022 15:05:22 +0000
[Message part 1 (text/plain, inline)]
Maxime Devos <maximedevos <at> telenet.be> writes:

> [[PGP Signed Part:Undecided]]
> Pierre Langlois schreef op za 26-03-2022 om 14:16 [+0000]:
>> +    (supported-systems '("x86_64-linux" "aarch64-linux"))
>
> Looks nice!  Does this mean that the Rust version of librsvg can now
> be used in 'librsvg-for-system' on aarch64?

Yup! :-D

--8<---------------cut here---------------start------------->8---
sapin ~/guix [env]$ uname -a
Linux sapin 5.16.16-gnu #1 SMP PREEMPT 1 aarch64 GNU/Linux
sapin ~/guix [env]$ ./pre-inst-env guix build librsvg 
/gnu/store/rqccc75f1iymm58fjjfwx91l2q595zix-librsvg-2.50.7-debug
/gnu/store/mkyzy04sg4hqwiajd513mpdq976mxc48-librsvg-2.50.7-doc
/gnu/store/1578swy07wm06ywnk49y5gxnwwb4haxn-librsvg-2.50.7
--8<---------------cut here---------------end--------------->8---

Better yet, I have Gnome/GDM running on the pinebook pro! Now I'm also
trying to see if we can get icecat to build :cross-fingers:.  However it
still requires a few more changes to enable gnome, I'm having issues
with the following packages for example:

  - libmpeg3 doesn't build
  - exiv2's tests fail
  - mediasdk, svt-hevc seem to be x86-only.

I've not looked in details, just disabled tests/packages, we can look
into those more after we unblock rust.

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

Information forwarded to guix-patches <at> gnu.org:
bug#54580; Package guix-patches. (Mon, 09 May 2022 14:24:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Pierre Langlois <pierre.langlois <at> gmx.com>
Cc: 54580 <at> debbugs.gnu.org
Subject: Re: [bug#54580] [PATCH staging?] gnu: mrustc: Update to 0.10.
Date: Mon, 9 May 2022 17:22:50 +0300
[Message part 1 (text/plain, inline)]
On Sat, Mar 26, 2022 at 02:16:06PM +0000, Pierre Langlois wrote:
> 
> Pierre Langlois <pierre.langlois <at> gmx.com> writes:
> 
> > [[PGP Signed Part:Undecided]]
> > Hi Guix!
> >
> > Good news everyone, I managed to get a aarch64 build of Rust by updating
> > mrustc to 0.10!  Sadly, i686 is still unsupported, due to the build
> > using too much memory, it must be the same for other 32-bit architectures.
> >
> > I tested this on a pinebookpro which only has 4G of RAM, I had to attach
> > 16G of swap for the initial rust <at> 1.39 build to succeed, then the whole
> > rust chain took about 5 days!  I also tested on my x86_64 desktop.
> >
> > Here's the patch! After it we should be able to follow-up and enable
> > Gnome and friends.
> >
> > That being said, I wasn't entirely sure where this patch should go,
> > ideally it would be good to have a staging branch rather than
> > core-updates, WDYT?  Maybe we can do this along with a rust version
> > update?
> >
> > PS: I also tried to build rust 1.54 with the new mrustc update, to
> > shorten the chain, but I've not had any successes with it yet.
> >

Go ahead and push it to staging. I have high on my TODO list to get it
working with 1.54.

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

Reply sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
You have taken responsibility. (Mon, 09 May 2022 22:15:01 GMT) Full text and rfc822 format available.

Notification sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
bug acknowledged by developer. (Mon, 09 May 2022 22:15:01 GMT) Full text and rfc822 format available.

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

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>, 54580-done <at> debbugs.gnu.org
Subject: Re: [bug#54580] [PATCH staging?] gnu: mrustc: Update to 0.10.
Date: Mon, 09 May 2022 23:12:15 +0100
[Message part 1 (text/plain, inline)]
Hi!

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

> [[PGP Signed Part:Undecided]]
> On Sat, Mar 26, 2022 at 02:16:06PM +0000, Pierre Langlois wrote:
>> 
>> Pierre Langlois <pierre.langlois <at> gmx.com> writes:
>> 
>> > [[PGP Signed Part:Undecided]]
>> > Hi Guix!
>> >
>> > Good news everyone, I managed to get a aarch64 build of Rust by updating
>> > mrustc to 0.10!  Sadly, i686 is still unsupported, due to the build
>> > using too much memory, it must be the same for other 32-bit architectures.
>> >
>> > I tested this on a pinebookpro which only has 4G of RAM, I had to attach
>> > 16G of swap for the initial rust <at> 1.39 build to succeed, then the whole
>> > rust chain took about 5 days!  I also tested on my x86_64 desktop.
>> >
>> > Here's the patch! After it we should be able to follow-up and enable
>> > Gnome and friends.
>> >
>> > That being said, I wasn't entirely sure where this patch should go,
>> > ideally it would be good to have a staging branch rather than
>> > core-updates, WDYT?  Maybe we can do this along with a rust version
>> > update?
>> >
>> > PS: I also tried to build rust 1.54 with the new mrustc update, to
>> > shorten the chain, but I've not had any successes with it yet.
>> >
>
> Go ahead and push it to staging. I have high on my TODO list to get it
> working with 1.54.

Oh cool I see you've pushed it already, thanks! Closing.
[signature.asc (application/pgp-signature, inline)]

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

This bug report was last modified 1 year 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.