Rust: Add Rust 1.59, set default to 1.59.

  • Done
  • quality assurance status badge
Details
10 participants
  • Jim Newsome
  • kiasoc5
  • kiasoc5
  • Liliana Marie Prikler
  • Marius Bakke
  • Maxime Devos
  • Tobias Geerinckx-Rice
  • (
  • Paul Alesius
  • Pierre Langlois
Owner
unassigned
Submitted by
Paul Alesius
Severity
normal
Merged with
P
P
Paul Alesius wrote on 18 Mar 2022 01:21
(address . guix-patches@gnu.org)
CAL8jUGUYE0skaxR2q5e=ayeC_7qyOfGsNhH=CoYrb2hSb9E7wg@mail.gmail.com
---
gnu/packages/rust.scm | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)

Toggle diff (40 lines)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 26d6df7a94..3c5e913b97 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -784,11 +784,32 @@ (define rust-1.57
`("procps" ,procps)
(package-native-inputs base-rust))))))

+
+(define rust-1.58
+ (let ((base-rust
+ (rust-bootstrapped-package
+ rust-1.57 "1.58.0"
+ "0w6pdh87bd87xann6czz95z5bzlw58kbgii2jdmrjbiw5yik3m8a")))
+ (package
+ (inherit base-rust)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base-rust)
+ ((#:tests? _ #f)
+ #t)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; Remove as it doesn't exist in this distribution
+ (delete 'skip-shebang-tests))))))))
+
+(define rust-1.59
+ (rust-bootstrapped-package
+ rust-1.58 "1.59.0" "1yc5bwcbmbwyvpfq7zvra78l0r8y3lbv60kbr62fzz2vx2pfxj57"))
+
;;; Note: Only the latest versions of Rust are supported and tested. The
;;; intermediate rusts are built for bootstrapping purposes and should not
;;; be relied upon. This is to ease maintenance and reduce the time
;;; required to build the full Rust bootstrap chain.
-(define-public rust rust-1.57)
+(define-public rust rust-1.59)

(define-public rust-src
(hidden-package
--
2.34.0
L
L
Liliana Marie Prikler wrote on 18 Mar 2022 08:11
(address . control@debbugs.gnu.org)(address . paul@unnservice.com)
4d213332a2f29554b7ce8228eda9d45bf9a41f45.camel@ist.tugraz.at
merge 54439 53461
thanks

Note that Rust is a silent world rebuild. Thanks, cargo.
M
M
Maxime Devos wrote on 18 Mar 2022 09:23
83bde907290d34837da133149ed27c1bd80384dd.camel@telenet.be
Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
Toggle quote (3 lines)
> +         ((#:tests? _ #f)
> +          #t)

This is incorrect when cross-compiling, use
(->bool (not (%current-target-system)) instead.

Or simpler:

(substitute-keyword-arguments
(strip-keyword-arguments '(#:tests?) (package-arguments base-rust)))

Also, I'm wondering, should #:tests? #t be removed from 1.57?
From rust.scm:

;; Only the final Rust is tested, not the intermediate bootstrap
ones,
;; for performance and simplicity.
#:tests? #f
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjRBfRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vnQAQCA7Tjt8dQSR48lr2DXVbIUPqyR
e46Tj1u3XyYuS9YAmgD8Cb569ZcYh5GT8hVzhW26/7xSLabEdAIz3HlCsG6MEAM=
=Y1Yt
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 18 Mar 2022 09:25
c1b8a3c4b1f6f5889e74eb673506ab73df5f3744.camel@telenet.be
Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
Toggle quote (4 lines)
> +(define rust-1.59
> +  (rust-bootstrapped-package
> +   rust-1.58 "1.59.0" "1yc5bwcbmbwyvpfq7zvra78l0r8y3lbv60kbr62fzz2vx2pfxj57"))

I'm wondering, does rust@1.59 need to be built against rust@1.58, or
could it be built against an earlier version rust@1.57? I would prefer
the latter to avoid increasing the bootstrapping chain further.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjRB6BccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ixbAP9t/iwRAGnoot92V6i7B+ZnnXvA
hdeUNU3HPyOTdRkJWwD9H17Ky4Il3OTpNsCtojBt6xs9MU24xLbe/bmydB6TMAo=
=9Wey
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 18 Mar 2022 09:25
54b7fc16f49118548c4ed35666cad708e96312fd.camel@telenet.be
Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
Toggle quote (3 lines)
> +             ;; Remove as it doesn't exist in this distribution
> +             (delete 'skip-shebang-tests))))))))

I believe the conventional terminology is ‘this version’ or ‘this
release’, not ‘this distribution’.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjRCDBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7g7yAQDVpdAtJhJ2qfuD+yRrMm+u9ldv
ia4GGyPRtnEt8WyGCAEApHjIDNCzJ4oAR8JWqUq8pN7+Cn7vyvurDqrjNzpOag0=
=n7wJ
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 18 Mar 2022 09:26
95ce7147c3698f0aba2f4611cbaa81f64194b893.camel@telenet.be
Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
Toggle quote (3 lines)
> -(define-public rust rust-1.57)
> +(define-public rust rust-1.59)

Due to the large number of dependents this probably needs to be done on
core-updates (unverified)
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjRCPhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pZuAQDN54vQiCqLWFAEb0I0zlXHs6Cn
/Vf8MBDBcCGvmC3iIwEAt3Qb7WOWfRMsP/oXO/9+ATZjE/OSz9GcePFxdN7VxwA=
=OFUT
-----END PGP SIGNATURE-----


P
P
Paul Alesius wrote on 18 Mar 2022 09:55
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54439@debbugs.gnu.org)
CAL8jUGUGZSmDsSWg+buDqVy_fcUKiEngJsbe5uhcTDjmFDmPHA@mail.gmail.com
Thank you for the input.

I was unable to build the latest version (1.59) without also building
the intermediate versions (1.58), hence why the package declarations
for 1.57 and 1.58 remained intact with testing as I was verifying that
they build.

You're right, the bootstrapping releases should be trimmed down. I am
very new to Guile so if anyone wants to modify the patch while I learn
the build system to create a new patch, that would be fine with me.

/With regards
- Paul

On Fri, 18 Mar 2022 at 09:23, Maxime Devos <maximedevos@telenet.be> wrote:
Toggle quote (21 lines)
>
> Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
> > + ((#:tests? _ #f)
> > + #t)
>
> This is incorrect when cross-compiling, use
> (->bool (not (%current-target-system)) instead.
>
> Or simpler:
>
> (substitute-keyword-arguments
> (strip-keyword-arguments '(#:tests?) (package-arguments base-rust)))
>
> Also, I'm wondering, should #:tests? #t be removed from 1.57?
> From rust.scm:
>
> ;; Only the final Rust is tested, not the intermediate bootstrap
> ones,
> ;; for performance and simplicity.
> #:tests? #f
>
M
M
Maxime Devos wrote on 20 Mar 2022 14:58
162116806d4271d008df583cfa4300bb2d015a79.camel@telenet.be
Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
Toggle quote (3 lines)
> +             ;; Remove as it doesn't exist in this distribution
> +             (delete 'skip-shebang-tests))))))))

Is this necessary? This was not done in

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjczDBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7u1kAPwJKbML5yHjAv5ndtsSQPL+evIj
YPi8e+T8Vi1zgUAb5wEAlaEGIkf5WD37feNnda0S3/fTZZyUzEZrDnpfuFCYbg0=
=WRqj
-----END PGP SIGNATURE-----


P
P
Paul Alesius wrote on 20 Mar 2022 16:36
CAL8jUGUxYQGio=YBP3E-sC6PpmM-nUT4kVpcyVNVYZrL35KCdQ@mail.gmail.com
Nope, (delete 'skip-shebang-tests) didn't seem necessary, it must have been
something with my environment before.

The patch in https://issues.guix.gnu.org/54475#0 builds and tests for me
too, seemingly without testing the bootstrapping rustc.

With regards,
- Paul

On Sun, 20 Mar 2022 at 14:58, Maxime Devos <maximedevos@telenet.be> wrote:
Toggle quote (10 lines)
>
> Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
> > + ;; Remove as it doesn't exist in this distribution
> > + (delete 'skip-shebang-tests))))))))
>
> Is this necessary? This was not done in
> <https://issues.guix.gnu.org/54475#0>.
>
> Greetings,
> Maxime.
Attachment: file
K
K
kiasoc5 wrote on 21 Mar 2022 04:31
(address . 54439@debbugs.gnu.org)
MyeIXBV--3-2@tutanota.com
Is it safe to update mrustc at the same time as the rust version bump? So we can bootstrap from rust 1.54 to 1.59. Sorry, I don't have the time and hardware to help out more.
P
P
Pierre Langlois wrote on 26 Mar 2022 14:36
(address . kiasoc5@tutanota.com)
87r16oako6.fsf@gmx.com
Hi there,

kiasoc5--- via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (4 lines)
> Is it safe to update mrustc at the same time as the rust version bump? So we can
> bootstrap from rust 1.54 to 1.59. Sorry, I don't have the time and hardware to
> help out more.

Updating mrustc would be great, as an added bonus, the latest version
enables aarch64-linux support. I just submitted a patch for it [0], it
would be great to pick it up when next updating rust.


I did also play with boostrapping directly from 1.54, instead of just
updating mrustc, but it's not building for me yet. I'm attaching my WIP
patch in case somebody wants to take a look. Specifically, it's failing
during the cargo build phase, so when testing it I recommend to run the
cargo build first to reproduce the issue. I can post a log later, I
don't seem to find it just now :-).

Toggle snippet (22 lines)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 38ead406d0..21a6fe206f 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -305,12 +305,12 @@ (define rust-1.54
(chdir "../mrustc")
(setenv "MINICARGO_FLAGS" job-spec)
(setenv "CARGO_BUILD_JOBS" (number->string job-count))
- (display "Building rustc...\n")
- (apply invoke "make" "-f" "minicargo.mk" "output/rustc"
- job-spec make-flags)
(display "Building cargo...\n")
(apply invoke "make" "-f" "minicargo.mk" "output/cargo"
job-spec make-flags)
+ (display "Building rustc...\n")
+ (apply invoke "make" "-f" "minicargo.mk" "output/rustc"
+ job-spec make-flags)
(display "Rebuilding stdlib with rustc...\n")
;; Note: invoking make with -j would cause a compiler error
;; (unexpected panic).

Thanks,
Pierre
-----BEGIN PGP SIGNATURE-----

iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmI/GdkYHHBpZXJyZS5s
YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UnZQIALEH0hzY4693l1+1v9vQJsy3
Va+vMkIZWKNanMIUKsEG3le6v2hSPMQ/fT0bXfHi7inD4MN/oOXUd/upONOQQRfk
lGK8cHH/Vd6eDXTp+2+uETfDk8Ep3YntygZgQWj82RhElApRi8ueg62+5BaWJotf
kmJzBBzHPPs1zd6eBBDOkwWqXwhwL8BsFfbfhP0E/JGcToLILgVX/g+4que9xJSk
ywjsKvf/DX7Y8k/nWRC/A5hMRf9Huvpui6MUEaUGLencVun7TQL3T46kmEUuE7Gk
tVChv6+9h3jH41AgAbLwHHD4NBIDV53WUQHD8BDpCYpPdqpbfabeQ8Bfm8y8tco=
=s7dp
-----END PGP SIGNATURE-----

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 1/2] 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(-)

Toggle diff (66 lines)
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
M
M
Maxime Devos wrote on 26 Mar 2022 16:09
Re: [bug#54580] [PATCH staging?] gnu: mrustc: Update to 0.10.
730f00e80ab8469d6ce783ffff13cee76c533810.camel@telenet.be
Pierre Langlois schreef op za 26-03-2022 om 13:27 [+0000]:
Toggle quote (5 lines)
> 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

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYj8sqBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rZeAP9qbXGBTIH9uEqnHx/zB7y6Gzun
VE1JC6P0Za/Qki05qQEA2+Btzb7Ic4H8m+HjoMCYFf3V0aMpGnechw/zJuABmAQ=
=3Wue
-----END PGP SIGNATURE-----


K
K
kiasoc5 wrote on 11 Apr 2022 22:04
(name . 54439)(address . 54439@debbugs.gnu.org)
N-PDY_R----2@tutanota.com
Reminder that Rust 1.60 was released recently.
K
K
kiasoc5 wrote on 20 May 2022 04:39
(address . 54439@debbugs.gnu.org)
ecda5ead014c17b2ee0f3b01a14cd0afe599e115@disroot.org
Rust 1.61.0 is out
K
K
kiasoc5 wrote on 30 Jun 2022 20:57
(address . 54439@debbugs.gnu.org)
20220630185654.4642df77@aria
Rust 1.62.0 released today
T
T
Tobias Geerinckx-Rice wrote on 30 Jun 2022 22:17
Re: [bug#54439] Rust 1.61.0
949bbae409a1d1696db5a2a855e53b11@tobias.gr
Hi kiasoc5,

kiasoc5 wrote on 11 Apr 22:04 +0200
Toggle quote (2 lines)
> Reminder that Rust 1.60 was released recently.

kiasoc5 wrote on 20 May 04:39 +0200
Toggle quote (2 lines)
> Rust 1.61.0 is out

kiasoc5 wrote 60 minutes ago
Toggle quote (2 lines)
> Rust 1.62.0 released today

If you'd opened or contributed to this issue, would you be motivated by
such replies? I wouldn't...

There must be a more effective way to help move things forward.

Regardless, Rust release announcements don't need to be cross-posted to
the Guix bug trackers and all bug-guix@ subscribers.

Kind regards,

T G-R

Sent from a Web browser. Excuse or enjoy my brevity.
K
K
kiasoc5 wrote on 1 Jul 2022 03:11
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 54439@debbugs.gnu.org)
20220701011109.1a436efa@aria
I'm sorry, I won't cross-post future updates. I can try the bump
myself, it's just that I feel like this is too much of a challenge for
me.

On Thu, Jun 30 2022, 10:17:03 PM +0200
Tobias Geerinckx-Rice <me@tobias.gr> wrote:

Toggle quote (24 lines)
> Hi kiasoc5,
>
> kiasoc5 wrote on 11 Apr 22:04 +0200
> > Reminder that Rust 1.60 was released recently.
>
> kiasoc5 wrote on 20 May 04:39 +0200
> > Rust 1.61.0 is out
>
> kiasoc5 wrote 60 minutes ago
> > Rust 1.62.0 released today
>
> If you'd opened or contributed to this issue, would you be motivated
> by such replies? I wouldn't...
>
> There must be a more effective way to help move things forward.
>
> Regardless, Rust release announcements don't need to be cross-posted
> to the Guix bug trackers and all bug-guix@ subscribers.
>
> Kind regards,
>
> T G-R
>
> Sent from a Web browser. Excuse or enjoy my brevity.
(
(address . 54439@debbugs.gnu.org)
CL47X6F1N7SD.RHVVC7ZD1FN@guix-aspire
On Fri Jul 1, 2022 at 2:11 AM BST, kiasoc5 via Guix-patches via wrote:
Toggle quote (1 lines)
> I feel like this is too much of a challenge for me.
I updated Rust to 1.57 when I was new to Guix, it wasn't very hard at
all. The main problem was that the build took aaaaaaages. See commit
89afe76a164c53aef66e6f819137bd0c65089fe8.

-- (
K
K
kiasoc5 wrote on 3 Jul 2022 06:25
(address . 54439@debbugs.gnu.org)
20220703042511.6023daf8@aria
I got 1.60 to build by using LLVM 14. Rust 1.61 fails to build, one of
the tests hangs for many hours.

```
Finished release [optimized] target(s) in 47.43s
Running
`/tmp/guix-build-rust-1.61.0.drv-0/rustc-1.61.0-src/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/std-25ea6ffff3fb3704
--quiet`

running 945 tests
....................................................................................................
100/945
....................................................................................................
200/945
.....................................................................i..........................thread
'<unnamed>' panicked at 'explicit panic',
library/std/src/io/buffered/tests.rs:495:13 .... 300/945
........................................................................thread
'<unnamed>' panicked at 'explicit panic',
library/std/src/io/stdio/tests.rs:37:9 ............................
400/945
....................................................................................................
500/945
....................................................................................................
600/945
.............................................................................thread
'<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value:
RecvError', library/std/src/sync/mpsc/sync_tests.rs:346:28 ....thread
'<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value:
RecvError', library/std/src/sync/mpsc/sync_tests.rs:383:27 thread
'<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value:
SendError { .. }', library/std/src/sync/mpsc/sync_tests.rs:371:24
.......thread '<unnamed>' panicked at 'called `Result::unwrap()` on an
`Err` value: RecvError', library/std/src/sync/mpsc/sync_tests.rs:250:19
............ 700/945 ..............................thread '<unnamed>'
panicked at 'called `Result::unwrap()` on an `Err` value: RecvError',
library/std/src/sync/mpsc/tests.rs:322:28 ....thread '<unnamed>'
panicked at 'called `Result::unwrap()` on an `Err` value: RecvError',
library/std/src/sync/mpsc/tests.rs:359:27 thread '<unnamed>' panicked
at 'called `Result::unwrap()` on an `Err` value: SendError { .. }',
library/std/src/sync/mpsc/tests.rs:347:24 .......thread '<unnamed>'
panicked at 'called `Result::unwrap()` on an `Err` value: RecvError',
library/std/src/sync/mpsc/tests.rs:241:19
........................................thread '<unnamed>' panicked at
'explicit panic', library/std/src/sync/mutex/tests.rs:160:9 .thread
'<unnamed>' panicked at 'test panic in inner thread to poison mutex',
library/std/src/sync/mutex/tests.rs:114:9 ...thread 'thread
'<unnamed>.' panicked at 'test panic in inner thread to poison mutex',
library/std/src/sync/mutex/tests.rs<unnamed>' panicked at 'explicit
panic', library/std/src/sync/mutex/tests.rs:221:9 :90:9
............thread '<unnamed>' panicked at 'assertion failed: `(left ==
right)` left: `1`, right: `2`',
library/std/src/sync/mutex/tests.rs:184:9 .. 800/945 .thread
'<unnamed>' panicked at 'test panic in inner thread to poison RwLock',
library/std/src/sync/rwlock/tests.rs:238:9 .thread '<unnamed>' panicked
at 'test panic in inner thread to poison RwLock',
library/std/src/sync/rwlock/tests.rs:214:9 ..thread '.thread
'<unnamed>' panicked at 'explicit panic',
library/std/src/sync/rwlock/tests.rs:90:9 .thread '<unnamed>' panicked
at 'explicit panic', library/std/src/sync/rwlock/tests.rs:78:9 .thread
'<unnamed>' panicked at 'explicit panic',
library/std/src/sync/rwlock/tests.rs:65:9 .thread '<unnamed>' panicked
at 'explicit panic', library/std/src/sync/rwlock/tests.rs:52:9
....<unnamed>.' panicked at 'explicit panic',
..library/std/src/sync/rwlock/tests.rs:.150:9 ......i.panicked at
'crash now!',
library/std/src/sys/unix/process/process_unix/tests.rs:46:27 panicked
after panic::always_abort(), aborting.
............................................................................
900/945 ....thread '<unnamed>' panicked at 'explicit panic',
library/std/src/thread/tests.rs:87:33 .............thread '<unnamed>'
panicked at 'Box<dyn Any>', library/std/src/thread/tests.rs:222:9 note:
run with `RUST_BACKTRACE=1` environment variable to display a backtrace
.thread '<unnamed>' panicked at 'owned string',
library/std/src/thread/tests.rs:206:9 .thread '<unnamed>' panicked at
'Box<dyn Any>', library/std/src/thread/tests.rs:241:33 .thread
'<unnamed>' panicked at 'static string',
library/std/src/thread/tests.rs:190:9 .......................test
sys::unix::process::process_common::tests::test_process_group_no_posix_spawn
has been running for over 60 seconds test
sys::unix::process::process_common::tests::test_process_group_posix_spawn
has been running for over 60 seconds
``` (build hangs for several hours)



From 678e0772f265d0def67d33d062b4f99dc8d42d77 Mon Sep 17 00:00:00 2001
From: kiasoc5 <kiasoc5@disroot.org>
Date: Sat, 2 Jul 2022 15:50:43 -0400
Subject: [PATCH] add rust-1.6{0,1,2}

---
gnu/packages/rust.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 67dc5cdaf3..d49e622d85 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -786,6 +786,30 @@ (define rust-1.57
`("procps" ,procps)
(package-native-inputs base-rust))))))
+(define rust-1.58
+ (rust-bootstrapped-package
+ rust-1.57 "1.58.1"
"1iq7kj16qfpkx8gvw50d8rf7glbm6s0pj2y1qkrz7mi56vfsyfd8")) +
+(define rust-1.59
+ (rust-bootstrapped-package
+ rust-1.58 "1.59.0"
"1yc5bwcbmbwyvpfq7zvra78l0r8y3lbv60kbr62fzz2vx2pfxj57")) +
+(define rust-1.60
+ (let ((base-rust (rust-bootstrapped-package
+ rust-1.59 "1.60.0"
+
"1drqr0a26x1rb2w3kj0i6abhgbs3jx5qqkrcwbwdlx7n3inq5ji0")))
+ (package
+ (inherit base-rust)
+ (inputs (alist-replace "llvm" (list llvm-14)
+ (package-inputs base-rust))))))
+(define rust-1.61
+ (rust-bootstrapped-package
+ rust-1.60 "1.61.0"
"1vfs05hkf9ilk19b2vahqn8l6k17pl9nc1ky9kgspaascx8l62xd")) +
+(define rust-1.62
+ (rust-bootstrapped-package
+ rust-1.61 "1.62.0"
"09y06qmh7ihi9kgimpp3h4nj3cmgc1zypqyaba10dlk4kf07h23x")) +
;;; Note: Only the latest versions of Rust are supported and tested.
The ;;; intermediate rusts are built for bootstrapping purposes and
should not ;;; be relied upon. This is to ease maintenance and reduce
the time

base-commit: b7e414982d4d47f3a0e42ea177b9797dc4880e91
--
2.37.0
M
M
Maxime Devos wrote on 22 Jul 2022 02:09
Re: [bug#56684] [PATCH 1/3] Bump rust 1.57 -> 1.58
(address . control@debbugs.gnu.org)
c27ef8a0-0b8b-3480-1a73-70223ee22ac2@telenet.be
merge 54439 56684
thanks
You aren't bumping the version but adding a new version of the Rust
package, the old one is still there. Also, conventionally it is named
updating in Guix, and a commit message is missing. For examples see the
git history.
Are all the intermediate steps needed, or could you reduce the number of
new intermediate packages?
E.g., you could try going directly from 1.57 to 1.60 without
intermediate steps. If that's possible, it would be less inefficient to
compile.
Also, there are already patches for updating rust, see
already existing patches before posting duplicates, to avoid double
work, etc.
Greetings,
Maxime.
Attachment: OpenPGP_signature
J
J
Jim Newsome wrote on 4 Aug 2022 03:47
[PATCH core-updates] gnu: rust: Use rust-1.60.0
20220804014716.785308-1-jim@jimnewsome.net
Hi, I'm new to this project and this code-review workflow, so please bear with me :).

It looks like there have been a few attempts here at updating Rust, including [Paul's], [Felipe's], and [my own].


There's some discussion in this thread about using an updated mrustc and using that to cut out some earlier steps of the bootstrap chain. I propose leaving that out for the moment. It seems both nontrivial and orthogonal, so IMO would make more sense as its own thread / patch-set, which could be reviewed and merged independently, before or after this one.

I think there's some confusion about where and how tests are enabled/disabled. IIUC in the current baseline, they are disabled in `rust-1.55`, which is the first version built with an earlier "official" rust:

```
;; Only the final Rust is tested, not the intermediate bootstrap ones,
;; for performance and simplicity.
#:tests? #f
```

and subsequent versions inherit that via the `rust-bootstrapped-package` function.

The latest and public version (currently `rust-1.57`) re-enables most of the tests and fixes up some things so that the tests pass.

So I think the approach here when adding versions is to change the current latest (1.57) to the simpler form that keeps tests disabled, add any additional necessary steps, and have the test-reenabling code again in the latest version.

2 patches included:

* First is a pure refactor to decouple "rust-1.57" from "rust" to help avoid confusion in the future.
* Second adds 1.58, 1.59, and 1.60, and makes rust-1.60 the new rust.

In the latter patch I also tried building each version with a Rust 2 versions back instead of just 1 version back, to see if any can be left out. Unfortunately they couldn't. I'm including some of the errors in the comments for reference.

-Jim
J
J
Jim Newsome wrote on 4 Aug 2022 03:47
[PATCH core-updates 1/2] gnu: rust: decouple rust-1.57 and "rust"
7125a9c1de14dca78c45d16ddeb29339b49ffde7.1659577396.git.jnewsome@torproject.org
From: Jim Newsome <jnewsome@torproject.org>

* gnu/packages/rust.scm (rust-1.57, rust): decouple the definition of
rust-1.57, which happens to be the current latest, from the definition
of rust, which is always the latest. The latter re-enables tests and
extra components, which should always be done only on the final public
rust package, not specifically rust-1.57.
---
gnu/packages/rust.scm | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 759bf9a631..d85acef696 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -540,10 +540,18 @@ (define rust-1.56
(generate-all-checksums "vendor"))))))))))
(define rust-1.57
- (let ((base-rust
- (rust-bootstrapped-package
- rust-1.56 "1.57.0"
- "06jw8ka2p3kls8p0gd4p0chhhb1ia1mlvj96zn78n7qvp71zjiim")))
+ (rust-bootstrapped-package
+ rust-1.56 "1.57.0" "06jw8ka2p3kls8p0gd4p0chhhb1ia1mlvj96zn78n7qvp71zjiim"))
+
+;;; Note: Only the latest versions of Rust are supported and tested. The
+;;; intermediate rusts are built for bootstrapping purposes and should not
+;;; be relied upon. This is to ease maintenance and reduce the time
+;;; required to build the full Rust bootstrap chain.
+;;;
+;;; Here we take the latest included Rust, make it public, and re-enable tests
+;;; and extra components such as rustfmt.
+(define-public rust
+ (let ((base-rust rust-1.57))
(package
(inherit base-rust)
(outputs (cons "rustfmt" (package-outputs base-rust)))
@@ -682,12 +690,6 @@ (define rust-1.57
`("procps" ,procps)
(package-native-inputs base-rust))))))
-;;; Note: Only the latest versions of Rust are supported and tested. The
-;;; intermediate rusts are built for bootstrapping purposes and should not
-;;; be relied upon. This is to ease maintenance and reduce the time
-;;; required to build the full Rust bootstrap chain.
-(define-public rust rust-1.57)
-
(define-public rust-src
(hidden-package
(package

base-commit: 8a2b5f3f587459c11c037b9d372b4070263baae9
--
2.25.1
J
J
Jim Newsome wrote on 4 Aug 2022 03:47
[PATCH core-updates 2/2] gnu: rust: Use rust-1.60.0
42db48eec3d7011d13d49f816604c8338c3b6c43.1659577396.git.jnewsome@torproject.org
From: Jim Newsome <jnewsome@torproject.org>

* gnu/packages/rust.scm (rust-1.58, rust-1.59, rust-1.60, rust):
Add rust-1.58, rust-1.59, and rust-1.60, and update rust to
be based on rust-1.60 instead of rust-1.57.
---
gnu/packages/rust.scm | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)

Toggle diff (51 lines)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index d85acef696..ebad9dc9e5 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -541,8 +541,35 @@ (define rust-1.56
(define rust-1.57
(rust-bootstrapped-package
+ ;; Verified that it *doesn't* build with 1.55. e.g.:
+ ;; * feature `edition2021` is required
rust-1.56 "1.57.0" "06jw8ka2p3kls8p0gd4p0chhhb1ia1mlvj96zn78n7qvp71zjiim"))
+(define rust-1.58
+ (rust-bootstrapped-package
+ ;; Verified that it *doesn't* build with 1.56. e.g.:
+ ;; * error: attributes starting with `rustc` are reserved for use by the
+ ;; `rustc` compiler
+ ;; * error: cannot find attribute `rustc_do_not_const_check` in this scope
+ ;; * error[E0522]: definition of an unknown language item:
+ ;; `const_eval_select_ct`
+ rust-1.57 "1.58.1" "1iq7kj16qfpkx8gvw50d8rf7glbm6s0pj2y1qkrz7mi56vfsyfd8"))
+
+(define rust-1.59
+ (rust-bootstrapped-package
+ ;; Verified that it *doesn't* build with 1.57. e.g.:
+ ;; * error: `doc(primitive)` should never have been stable
+ ;; * error[E0522]: definition of an unknown language item:
+ ;; `generator_return`
+ ;; * error[E0206]: the trait `Copy` may not be implemented for this type
+ rust-1.58 "1.59.0" "1yc5bwcbmbwyvpfq7zvra78l0r8y3lbv60kbr62fzz2vx2pfxj57"))
+
+(define rust-1.60
+ (rust-bootstrapped-package
+ ;; Verified that it *doesn't* build with 1.58. e.g.:
+ ;; * error: unknown codegen option: `symbol-mangling-version`
+ rust-1.59 "1.60.0" "1drqr0a26x1rb2w3kj0i6abhgbs3jx5qqkrcwbwdlx7n3inq5ji0"))
+
;;; Note: Only the latest versions of Rust are supported and tested. The
;;; intermediate rusts are built for bootstrapping purposes and should not
;;; be relied upon. This is to ease maintenance and reduce the time
@@ -551,7 +578,7 @@ (define rust-1.57
;;; Here we take the latest included Rust, make it public, and re-enable tests
;;; and extra components such as rustfmt.
(define-public rust
- (let ((base-rust rust-1.57))
+ (let ((base-rust rust-1.60))
(package
(inherit base-rust)
(outputs (cons "rustfmt" (package-outputs base-rust)))
--
2.25.1
M
M
Marius Bakke wrote on 4 Aug 2022 13:03
Re: [bug#54439] [PATCH core-updates] gnu: rust: Use rust-1.60.0
871qtwqnhe.fsf@gnu.org
Jim Newsome <jim@jimnewsome.net> skriver:

Toggle quote (2 lines)
> Hi, I'm new to this project and this code-review workflow, so please bear with me :).

Welcome! You are doing great. :-)

Toggle quote (6 lines)
> It looks like there have been a few attempts here at updating Rust, including [Paul's], [Felipe's], and [my own].
>
> [Paul's]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54439#5
> [Felipe's]: https://issues.guix.gnu.org/54475#0
> [my own]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56684

Indeed. :-/

Toggle quote (2 lines)
> There's some discussion in this thread about using an updated mrustc and using that to cut out some earlier steps of the bootstrap chain. I propose leaving that out for the moment. It seems both nontrivial and orthogonal, so IMO would make more sense as its own thread / patch-set, which could be reviewed and merged independently, before or after this one.

This has recently been done on the 'staging' branch courtesy of Efraim.

Toggle quote (14 lines)
> I think there's some confusion about where and how tests are enabled/disabled. IIUC in the current baseline, they are disabled in `rust-1.55`, which is the first version built with an earlier "official" rust:
>
> ```
> ;; Only the final Rust is tested, not the intermediate bootstrap ones,
> ;; for performance and simplicity.
> #:tests? #f
> ```
>
> and subsequent versions inherit that via the `rust-bootstrapped-package` function.
>
> The latest and public version (currently `rust-1.57`) re-enables most of the tests and fixes up some things so that the tests pass.
>
> So I think the approach here when adding versions is to change the current latest (1.57) to the simpler form that keeps tests disabled, add any additional necessary steps, and have the test-reenabling code again in the latest version.

That is my understanding too.

Toggle quote (7 lines)
> 2 patches included:
>
> * First is a pure refactor to decouple "rust-1.57" from "rust" to help avoid confusion in the future.
> * Second adds 1.58, 1.59, and 1.60, and makes rust-1.60 the new rust.
>
> In the latter patch I also tried building each version with a Rust 2 versions back instead of just 1 version back, to see if any can be left out. Unfortunately they couldn't. I'm including some of the errors in the comments for reference.

LGTM, I've pushed both patches to the 'staging' branch since Rust was
already patched there and it has not started evaluating yet.

Note: I also added a copyright line for you, hope that was okay.

Closing the issue, but feel free to continue the discussion.
-----BEGIN PGP SIGNATURE-----

iIUEARYKAC0WIQRNTknu3zbaMQ2ddzTocYulkRQQdwUCYuunnQ8cbWFyaXVzQGdu
dS5vcmcACgkQ6HGLpZEUEHdyxAEA2qeNz4D8O/38ro1BbaMZ7v2VSx0Ldbc071Tg
frdEbAEA/RvEoGHBqKVOPLJD0K/0v/UcX6A7RkAy9EjqTKplAm4F
=hZQj
-----END PGP SIGNATURE-----

Closed
J
J
Jim Newsome wrote on 4 Aug 2022 17:08
9ed092b0-a772-491f-8ec2-ff8b95db52e2@jimnewsome.net
On 8/4/22 06:03, Marius Bakke wrote:
Toggle quote (5 lines)
> LGTM, I've pushed both patches to the 'staging' branch since Rust was
> already patched there and it has not started evaluating yet.
>
> Note: I also added a copyright line for you, hope that was okay.

Great! Thanks, and let me know if any additional follow-up is needed!
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 54439@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 54439
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch