Subject: [bug#54439] Rust 1.61.0

From: kiasoc5 <[email-masked]>
Date: Sun, 3 Jul 2022 04:25:39 +0000

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 <[email-masked]>
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(+)

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