From: Pierre Langlois <pierre.langlois@gmx.com>
To: Pierre Langlois <pierre.langlois@gmx.com>
Cc: 54580@debbugs.gnu.org
Subject: [bug#54580] [PATCH staging?] gnu: mrustc: Update to 0.10.
Date: Sat, 26 Mar 2022 14:16:06 +0000 [thread overview]
Message-ID: <87h77kajc9.fsf@gmx.com> (raw)
In-Reply-To: <87lewwbzwy.fsf@gmx.com>
[-- Attachment #1.1: Type: text/plain, Size: 2213 bytes --]
Pierre Langlois <pierre.langlois@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@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@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.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-mrustc-Update-to-0.10.patch --]
[-- Type: text/x-patch, Size: 3767 bytes --]
From cdf2c194834ff55428a22988e4d90f0c133e9eb3 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@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 | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 26d6df7a94..67dc5cdaf3 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -121,12 +121,10 @@ (define* (rust-bootstrapped-package base-rust version checksum)
(package-native-inputs base-rust))))))
;;; Note: mrustc's only purpose is to be able to bootstap Rust; it's designed
-;;; 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")
+;;; to be used in source form.
+(define %mrustc-commit "b364724f15fd6fce8234ad8add68107c23a22151")
(define %mrustc-source
- (let* ((version "0.9")
+ (let* ((version "0.10")
(commit %mrustc-commit)
(revision "1")
(name "mrustc"))
@@ -138,7 +136,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 +235,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 +247,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 +324,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
next prev parent reply other threads:[~2022-03-26 14:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-26 13:27 [bug#54580] [PATCH staging?] gnu: mrustc: Update to 0.10 Pierre Langlois
2022-03-26 14:16 ` Pierre Langlois [this message]
2022-03-26 14:58 ` Maxime Devos
2022-03-26 15:05 ` Pierre Langlois
2022-05-09 14:22 ` Efraim Flashner
2022-05-09 22:12 ` bug#54580: " Pierre Langlois
2022-03-26 15:09 ` [bug#54439] [bug#54580] " Maxime Devos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h77kajc9.fsf@gmx.com \
--to=pierre.langlois@gmx.com \
--cc=54580@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.