unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#54439] Rust: Add Rust 1.59, set default to 1.59.
@ 2022-03-18  0:21 Paul Alesius
  2022-03-18  8:23 ` Maxime Devos
                   ` (9 more replies)
  0 siblings, 10 replies; 22+ messages in thread
From: Paul Alesius @ 2022-03-18  0:21 UTC (permalink / raw)
  To: 54439

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

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




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [bug#54439] Rust: Add Rust 1.59, set default to 1.59.
  2022-03-18  0:21 [bug#54439] Rust: Add Rust 1.59, set default to 1.59 Paul Alesius
@ 2022-03-18  8:23 ` Maxime Devos
  2022-03-18  8:55   ` Paul Alesius
  2022-03-18  8:25 ` Maxime Devos
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Maxime Devos @ 2022-03-18  8:23 UTC (permalink / raw)
  To: Paul Alesius, 54439

[-- Attachment #1: Type: text/plain, Size: 566 bytes --]

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


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] Rust: Add Rust 1.59, set default to 1.59.
  2022-03-18  0:21 [bug#54439] Rust: Add Rust 1.59, set default to 1.59 Paul Alesius
  2022-03-18  8:23 ` Maxime Devos
@ 2022-03-18  8:25 ` Maxime Devos
  2022-03-18  8:25 ` Maxime Devos
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 22+ messages in thread
From: Maxime Devos @ 2022-03-18  8:25 UTC (permalink / raw)
  To: Paul Alesius, 54439

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
> +(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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] Rust: Add Rust 1.59, set default to 1.59.
  2022-03-18  0:21 [bug#54439] Rust: Add Rust 1.59, set default to 1.59 Paul Alesius
  2022-03-18  8:23 ` Maxime Devos
  2022-03-18  8:25 ` Maxime Devos
@ 2022-03-18  8:25 ` Maxime Devos
  2022-03-18  8:26 ` Maxime Devos
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 22+ messages in thread
From: Maxime Devos @ 2022-03-18  8:25 UTC (permalink / raw)
  To: Paul Alesius, 54439

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

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))))))))

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] Rust: Add Rust 1.59, set default to 1.59.
  2022-03-18  0:21 [bug#54439] Rust: Add Rust 1.59, set default to 1.59 Paul Alesius
                   ` (2 preceding siblings ...)
  2022-03-18  8:25 ` Maxime Devos
@ 2022-03-18  8:26 ` Maxime Devos
  2022-03-20 13:58 ` Maxime Devos
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 22+ messages in thread
From: Maxime Devos @ 2022-03-18  8:26 UTC (permalink / raw)
  To: Paul Alesius, 54439

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

Paul Alesius schreef op vr 18-03-2022 om 01:21 [+0100]:
> -(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)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] Rust: Add Rust 1.59, set default to 1.59.
  2022-03-18  8:23 ` Maxime Devos
@ 2022-03-18  8:55   ` Paul Alesius
  0 siblings, 0 replies; 22+ messages in thread
From: Paul Alesius @ 2022-03-18  8:55 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 54439

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:
>
> 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
>




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] Rust: Add Rust 1.59, set default to 1.59.
  2022-03-18  0:21 [bug#54439] Rust: Add Rust 1.59, set default to 1.59 Paul Alesius
                   ` (3 preceding siblings ...)
  2022-03-18  8:26 ` Maxime Devos
@ 2022-03-20 13:58 ` Maxime Devos
  2022-03-20 15:36   ` Paul Alesius
  2022-03-21  3:31 ` [bug#54439] kiasoc5--- via Guix-patches via
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: Maxime Devos @ 2022-03-20 13:58 UTC (permalink / raw)
  To: Paul Alesius, 54439

[-- Attachment #1: Type: text/plain, Size: 309 bytes --]

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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] Rust: Add Rust 1.59, set default to 1.59.
  2022-03-20 13:58 ` Maxime Devos
@ 2022-03-20 15:36   ` Paul Alesius
  0 siblings, 0 replies; 22+ messages in thread
From: Paul Alesius @ 2022-03-20 15:36 UTC (permalink / raw)
  To: Maxime Devos, 54439

[-- Attachment #1: Type: text/plain, Size: 638 bytes --]

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:
>
> 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 #2: Type: text/html, Size: 974 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439]
  2022-03-18  0:21 [bug#54439] Rust: Add Rust 1.59, set default to 1.59 Paul Alesius
                   ` (4 preceding siblings ...)
  2022-03-20 13:58 ` Maxime Devos
@ 2022-03-21  3:31 ` kiasoc5--- via Guix-patches via
  2022-03-26 13:36   ` [bug#54439] Pierre Langlois
  2022-04-11 20:04 ` [bug#54439] kiasoc5--- via Guix-patches via
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: kiasoc5--- via Guix-patches via @ 2022-03-21  3:31 UTC (permalink / raw)
  To: 54439

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.




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439]
  2022-03-21  3:31 ` [bug#54439] kiasoc5--- via Guix-patches via
@ 2022-03-26 13:36   ` Pierre Langlois
  0 siblings, 0 replies; 22+ messages in thread
From: Pierre Langlois @ 2022-03-26 13:36 UTC (permalink / raw)
  To: kiasoc5; +Cc: 54439


[-- Attachment #1.1: Type: text/plain, Size: 2075 bytes --]

Hi there,

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

> 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.

[0]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54580

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 :-).

--8<---------------cut here---------------start------------->8---
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).
--8<---------------cut here---------------end--------------->8---

Thanks,
Pierre



[-- 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: 3771 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 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(-)

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-wip-bootstrap-from-1.54.patch --]
[-- Type: text/x-patch, Size: 17373 bytes --]

From b300f3686f490f5dd9aac205387d7af6886b2208 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Mon, 14 Mar 2022 01:18:16 +0000
Subject: [PATCH 2/2] wip bootstrap from 1.54.

---
 gnu/packages/patches/rustc-1.54.0-src.patch | 117 +++++++++++++
 gnu/packages/rust.scm                       | 181 ++++----------------
 2 files changed, 150 insertions(+), 148 deletions(-)
 create mode 100644 gnu/packages/patches/rustc-1.54.0-src.patch

diff --git a/gnu/packages/patches/rustc-1.54.0-src.patch b/gnu/packages/patches/rustc-1.54.0-src.patch
new file mode 100644
index 0000000000..d075dce39b
--- /dev/null
+++ b/gnu/packages/patches/rustc-1.54.0-src.patch
@@ -0,0 +1,117 @@
+# mrustc is much better at enum packing, so causes almost all of these to be smaller by one pointer
+--- compiler/rustc_ast/src/ast.rs
++++ compiler/rustc_ast/src/ast.rs
+@@ -1075,7 +1075,7 @@ pub struct Expr {
+ }
+
+ // `Expr` is used a lot. Make sure it doesn't unintentionally get bigger.
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(Expr, 104);
+
+ impl Expr {
+@@ -2779,7 +2779,7 @@ pub enum AssocItemKind {
+     MacCall(MacCall),
+ }
+
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(AssocItemKind, 72);
+
+ impl AssocItemKind {
+@@ -2831,7 +2831,7 @@ pub enum ForeignItemKind {
+     MacCall(MacCall),
+ }
+
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler="mrustc"),target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(ForeignItemKind, 72);
+
+ impl From<ForeignItemKind> for ItemKind {
+--- compiler/rustc_hir/src/hir.rs
++++ compiler/rustc_hir/src/hir.rs
+@@ -3050,3 +3050,3 @@
+ // Some nodes are used a lot. Make sure they don't unintentionally get bigger.
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler="mrustc"),target_arch = "x86_64", target_pointer_width = "64"))]
+ mod size_asserts {
+--- compiler/rustc_middle/src/mir/interpret/error.rs
++++ compiler/rustc_middle/src/mir/interpret/error.rs
+@@ -452,2 +452,2 @@
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler="mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ static_assert_size!(InterpError<'_>, 64);
+--- compiler/rustc_middle/src/mir/mod.rs
++++ compiler/rustc_middle/src/mir/mod.rs
+@@ -2203,2 +2203,2 @@
+-#[cfg(target_arch = "x86_64")]
++#[cfg(all(not(rust_compiler="mrustc"), target_arch = "x86_64"))]
+ static_assert_size!(AggregateKind<'_>, 48);
+--- compiler/rustc_middle/src/thir.rs
++++ compiler/rustc_middle/src/thir.rs
+@@ -147,2 +147,2 @@
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler="mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(Expr<'_>, 144);
+--- compiler/rustc_mir/src/interpret/place.rs
++++ compiler/rustc_mir/src/interpret/place.rs
+@@ -91,2 +91,2 @@
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(Place, 64);
+@@ -100,2 +100,2 @@
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(PlaceTy<'_>, 80);
+--- compiler/rustc_mir/src/interpret/operand.rs
++++ compiler/rustc_mir/src/interpret/operand.rs
+@@ -35,2 +35,2 @@
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(Immediate, 56);
+@@ -90,2 +90,2 @@
+-#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
++#[cfg(all(not(rust_compiler = "mrustc"), target_arch = "x86_64", target_pointer_width = "64"))]
+ rustc_data_structures::static_assert_size!(ImmTy<'_>, 72);
+
+#
+# Disable crc32fast's use of stdarch
+#
+--- vendor/crc32fast/src/specialized/mod.rs
++++ vendor/crc32fast/src/specialized/mod.rs
+@@ -1,5 +1,6 @@
+ cfg_if! {
+     if #[cfg(all(
++        not(rust_compiler = "mrustc"),
+         crc32fast_stdarchx86,
+         any(target_arch = "x86", target_arch = "x86_64")
+     ))] {
+
+#
+# Disable std_detect's detection logic (use the same logic as miri)
+#
+--- library/stdarch/crates/std_detect/src/detect/mod.rs
++++ library/stdarch/crates/std_detect/src/detect/mod.rs
+@@ -88,2 +88,2 @@
+ cfg_if! {
+-    if #[cfg(miri)] {
++    if #[cfg(any(miri, rust_compiler = "mrustc"))] {
+
+# PPV-Lite also needs to know that we're pretending to be miri
+--- vendor/ppv-lite86/src/lib.rs
++++ vendor/ppv-lite86/src/lib.rs
+@@ -12,9 +12,9 @@
+-#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri)))]
++#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri), not(rust_compiler = "mrustc")))]
+ pub mod x86_64;
+-#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri)))]
++#[cfg(all(feature = "simd", target_arch = "x86_64", not(miri), not(rust_compiler = "mrustc")))]
+ use self::x86_64 as arch;
+
+-#[cfg(any(miri, not(all(feature = "simd", any(target_arch = "x86_64")))))]
++#[cfg(any(miri, rust_compiler = "mrustc", not(all(feature = "simd", any(target_arch = "x86_64")))))]
+ pub mod generic;
+-#[cfg(any(miri, not(all(feature = "simd", any(target_arch = "x86_64")))))]
++#[cfg(any(miri, rust_compiler = "mrustc", not(all(feature = "simd", any(target_arch = "x86_64")))))]
+ use self::generic as arch;
+
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 67dc5cdaf3..38ead406d0 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -48,6 +48,8 @@ (define-module (gnu packages rust)
   #:use-module (gnu packages python)
   #:use-module (gnu packages ssh)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
+  #:use-module (gnu packages web)
   #:use-module (gnu packages)
   #:use-module (guix build-system cargo)
   #:use-module (guix build-system copy)
@@ -140,21 +142,27 @@ (define %mrustc-source

 ;;; Rust 1.39 is special in that it is built with mrustc, which shortens the
 ;;; bootstrap path.
-(define rust-1.39
+(define rust-1.54
   (package
     (name "rust")
-    (version "1.39.0")
+    (version "1.54.0")
     (source
      (origin
        (method url-fetch)
        (uri (rust-uri version))
-       (sha256 (base32 "0mwkc1bnil2cfyf6nglpvbn2y0zfbv44zfhsd5qg4c9rm6vgd8dl"))
+       (sha256 (base32 "0xk9dhfff16caambmwij67zgshd8v9djw6ha0fnnanlv7rii31dc"))
        (modules '((guix build utils)))
-       (snippet '(for-each delete-file-recursively
-                           '("src/llvm-emscripten"
-                             "src/llvm-project"
-                             "vendor/jemalloc-sys/jemalloc")))
-       (patches (search-patches "rustc-1.39.0-src.patch"))
+       (snippet '(begin
+                   (delete-file-recursively "src/llvm-project")
+                   (delete-file-recursively "vendor/libnghttp2-sys/nghttp2")
+                   (delete-file "vendor/libnghttp2-sys/build.rs")
+                   (with-output-to-file "vendor/libnghttp2-sys/build.rs"
+                     (lambda _
+                       (format #t "fn main() {~@
+                               println!(\"cargo:rustc-link-lib=nghttp2\");~@
+                               }~%")))
+                   #t))
+       (patches (search-patches "rustc-1.54.0-src.patch"))
        (patch-flags '("-p0"))))         ;default is -p1
     (outputs '("out" "cargo"))
     (properties '((timeout . 72000)           ;20 hours
@@ -163,8 +171,10 @@ (define rust-1.39
     (inputs
      `(("libcurl" ,curl)
        ("libssh2" ,libssh2)
-       ("llvm" ,llvm-9)
+       ("llvm" ,llvm-12)
        ("openssl" ,openssl)
+       ("nghttp2" ,nghttp2 "lib")
+       ("libgit2" ,libgit2)
        ("zlib" ,zlib)))
     (native-inputs
      `(("bison" ,bison)
@@ -252,6 +262,11 @@ (define rust-1.39
                  (substitute* "run_rustc/rustc_proxy.sh"
                    (("#!/bin/sh")
                     (string-append "#!" (which "sh"))))))))
+         (add-after 'unpack 'set-linker-locale-to-utf8
+           (lambda _
+             (substitute* (find-files "." "^linker.rs$")
+               (("linker.env\\(\"LC_ALL\", \"C\"\\);")
+                "linker.env(\"LC_ALL\", \"en_US.UTF-8\");"))))
          (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums
            (lambda* _
              (substitute* "Cargo.lock"
@@ -331,21 +346,17 @@ (define rust-1.39
     ;; Dual licensed.
     (license (list license:asl2.0 license:expat))))

-(define rust-1.40
+(define rust-1.55
   (package
     (name "rust")
-    (version "1.40.0")
+    (version "1.55.0")
     (source
      (origin
        (method url-fetch)
        (uri (rust-uri version))
-       (sha256 (base32 "1ba9llwhqm49w7sz3z0gqscj039m53ky9wxzhaj11z6yg1ah15yx"))
+       (sha256 (base32 "07l28f7grdmi65naq71pbmvdd61hwcpi40ry7kp7dy7m233rldxj"))
        (modules '((guix build utils)))
-       ;; llvm-emscripten is no longer bundled, as that codegen backend got
-       ;; removed.
-       (snippet '(for-each delete-file-recursively
-                           '("src/llvm-project"
-                             "vendor/jemalloc-sys/jemalloc")))))
+       (snippet '(delete-file-recursively "src/llvm-project"))))
     (outputs '("out" "cargo"))
     (properties '((timeout . 72000)           ;20 hours
                   (max-silent-time . 18000))) ;5 hours (for armel)
@@ -361,8 +372,7 @@ (define rust-1.40
     ;; putting the codegen backend in a separate library, which makes this
     ;; workaround only necessary for this release.
     (arguments
-     `(#:validate-runpath? #f
-       ;; Only the final Rust is tested, not the intermediate bootstrap ones,
+     `(;; Only the final Rust is tested, not the intermediate bootstrap ones,
        ;; for performance and simplicity.
        #:tests? #f
        #:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
@@ -380,11 +390,6 @@ (define rust-1.40
              (setenv "CC" (search-input-file inputs "/bin/gcc"))
              ;; The Guix LLVM package installs only shared libraries.
              (setenv "LLVM_LINK_SHARED" "1")))
-         (add-after 'unpack 'add-cc-shim-to-path
-           (lambda _
-             (mkdir-p "/tmp/bin")
-             (symlink (which "gcc") "/tmp/bin/cc")
-             (setenv "PATH" (string-append "/tmp/bin:" (getenv "PATH")))))
          (add-after 'unpack 'neuter-tidy
            ;; We often need to patch tests with various Guix-specific paths.
            ;; This often increases the line length and makes tidy, rustc's
@@ -449,7 +454,7 @@ (define rust-1.40
                                        (number->string (parallel-job-count))
                                        "1"))))
                (invoke "./x.py" job-spec "build" "--stage=1"
-                       "src/libstd"
+                       "library/std"
                        "src/tools/cargo"))))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
@@ -490,12 +495,12 @@ (define rust-1.40
      `(("cmake" ,cmake-minimal)
        ("pkg-config" ,pkg-config)       ; For "cargo"
        ("python" ,python-wrapper)
-       ("rustc-bootstrap" ,rust-1.39)
-       ("cargo-bootstrap" ,rust-1.39 "cargo")
+       ("rustc-bootstrap" ,rust-1.54)
+       ("cargo-bootstrap" ,rust-1.54 "cargo")
        ("which" ,which)))
     (inputs
      `(("jemalloc" ,jemalloc)
-       ("llvm" ,llvm-9)
+       ("llvm" ,llvm-12)
        ("openssl" ,openssl)
        ("libssh2" ,libssh2)             ; For "cargo"
        ("libcurl" ,curl)))              ; For "cargo"
@@ -519,126 +524,6 @@ (define rust-1.40
     ;; Dual licensed.
     (license (list license:asl2.0 license:expat))))

-(define rust-1.41
-  (let ((base-rust (rust-bootstrapped-package
-                    rust-1.40 "1.41.1"
-                    "0ws5x0fxv57fyllsa6025h3q6j9v3m8nb3syl4x0hgkddq0kvj9q")))
-    (package
-      (inherit base-rust)
-      (arguments
-       (substitute-keyword-arguments (package-arguments base-rust)
-         ((#:validate-runpath? _ #t)
-          #t)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (delete 'add-cc-shim-to-path)
-             (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums
-               (lambda* _
-                 (substitute* "Cargo.lock"
-                   (("(checksum = )\".*\"" all name)
-                    (string-append name "\"" ,%cargo-reference-hash "\"")))
-                 (generate-all-checksums "vendor"))))))))))
-
-(define rust-1.42
-  (rust-bootstrapped-package
-   rust-1.41 "1.42.0" "0x9lxs82may6c0iln0b908cxyn1cv7h03n5cmbx3j1bas4qzks6j"))
-
-(define rust-1.43
-  (rust-bootstrapped-package
-   rust-1.42 "1.43.0" "18akhk0wz1my6y9vhardriy2ysc482z0fnjdcgs9gy59kmnarxkm"))
-
-;; This version requires llvm <= 11.
-(define rust-1.44
-  (rust-bootstrapped-package
-   rust-1.43 "1.44.1"
-   "0ww4z2v3gxgn3zddqzwqya1gln04p91ykbrflnpdbmcd575n8bky"))
-
-(define rust-1.45
-  (let ((base-rust (rust-bootstrapped-package
-                    rust-1.44 "1.45.2"
-                    "0273a1g3f59plyi1n0azf21qjzwml1yqdnj5z472crz37qggr8xp")))
-    (package
-      (inherit base-rust)
-      (arguments
-       (substitute-keyword-arguments (package-arguments base-rust)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (add-after 'unpack 'set-linker-locale-to-utf8
-               (lambda _
-                 (substitute* (find-files "." "^linker.rs$")
-                   (("linker.env\\(\"LC_ALL\", \"C\"\\);")
-                    "linker.env(\"LC_ALL\", \"en_US.UTF-8\");")))))))))))
-
-(define rust-1.46
-  (rust-bootstrapped-package
-   rust-1.45 "1.46.0" "0a17jby2pd050s24cy4dfc0gzvgcl585v3vvyfilniyvjrqknsid"))
-
-(define rust-1.47
-  (let ((base-rust (rust-bootstrapped-package
-                    rust-1.46 "1.47.0"
-                    "07fqd2vp7cf1ka3hr207dnnz93ymxml4935vp74g4is79h3dz19i")))
-    (package/inherit base-rust
-      (arguments
-       (substitute-keyword-arguments (package-arguments base-rust)
-         ((#:phases phases)
-          `(modify-phases ,phases
-             (replace 'build
-               ;; The standard library source location moved in this release.
-               (lambda* (#:key parallel-build? #:allow-other-keys)
-                 (let ((job-spec (string-append
-                                  "-j" (if parallel-build?
-                                           (number->string (parallel-job-count))
-                                           "1"))))
-                   (invoke "./x.py" job-spec "build" "--stage=1"
-                           "library/std"
-                           "src/tools/cargo")))))))))))
-
-(define rust-1.48
-  (rust-bootstrapped-package
-   rust-1.47 "1.48.0" "0fz4gbb5hp5qalrl9lcl8yw4kk7ai7wx511jb28nypbxninkwxhf"))
-
-(define rust-1.49
-  (rust-bootstrapped-package
-   rust-1.48 "1.49.0" "0yf7kll517398dgqsr7m3gldzj0iwsp3ggzxrayckpqzvylfy2mm"))
-
-(define rust-1.50
-  (rust-bootstrapped-package
-   rust-1.49 "1.50.0" "0pjs7j62maiyvkmhp9zrxl528g2n0fphp4rq6ap7aqdv0a6qz5wm"))
-
-(define rust-1.51
-  (rust-bootstrapped-package
-   rust-1.50 "1.51.0" "0ixqkqglv3isxbvl4ldr4byrkx692wghsz3fasy1pn5kr2prnsvs"))
-
-;;; The LLVM requiriment has been bumped to version 10 in Rust 1.52.  Use the
-;;; latest available.
-(define rust-1.52
-  (let ((base-rust (rust-bootstrapped-package
-                    rust-1.51 "1.52.1"
-                    "165zs3xzp9dravybwslqs1qhn35agp6wacmzpymqg3qfdni26vrs")))
-    (package
-      (inherit base-rust)
-      (inputs (alist-replace "llvm" (list llvm-12)
-                             (package-inputs base-rust))))))
-
-(define rust-1.53
-  (rust-bootstrapped-package
-   rust-1.52 "1.53.0" "1f95p259dfp5ca118bg107rj3rqwlswy65dxn3hg8sqgl4wwmxsw"))
-
-(define rust-1.54
-  (let ((base-rust
-         (rust-bootstrapped-package
-          rust-1.53
-          "1.54.0" "0xk9dhfff16caambmwij67zgshd8v9djw6ha0fnnanlv7rii31dc")))
-    (package/inherit base-rust
-      (source
-       (origin
-         (inherit (package-source base-rust))
-         (snippet '(delete-file-recursively "src/llvm-project")))))))
-
-(define rust-1.55
-  (rust-bootstrapped-package
-   rust-1.54 "1.55.0" "07l28f7grdmi65naq71pbmvdd61hwcpi40ry7kp7dy7m233rldxj"))
-
 (define rust-1.56
   (rust-bootstrapped-package
    rust-1.55 "1.56.1" "04cmqx7nn63hzz7z27b2b0dj2qx18rck9ifvip43s6dampx8v2f3"))
--
2.34.0


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [bug#54439]
  2022-03-18  0:21 [bug#54439] Rust: Add Rust 1.59, set default to 1.59 Paul Alesius
                   ` (5 preceding siblings ...)
  2022-03-21  3:31 ` [bug#54439] kiasoc5--- via Guix-patches via
@ 2022-04-11 20:04 ` kiasoc5--- via Guix-patches via
  2022-05-20  2:39 ` [bug#54439] Rust 1.61.0 kiasoc5--- via Guix-patches via
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 22+ messages in thread
From: kiasoc5--- via Guix-patches via @ 2022-04-11 20:04 UTC (permalink / raw)
  To: 54439

Reminder that Rust 1.60 was released recently.




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] Rust 1.61.0
  2022-03-18  0:21 [bug#54439] Rust: Add Rust 1.59, set default to 1.59 Paul Alesius
                   ` (6 preceding siblings ...)
  2022-04-11 20:04 ` [bug#54439] kiasoc5--- via Guix-patches via
@ 2022-05-20  2:39 ` kiasoc5--- via Guix-patches via
  2022-06-30 18:57   ` kiasoc5 via Guix-patches via
  2022-08-04  1:47 ` [bug#54439] [PATCH core-updates] gnu: rust: Use rust-1.60.0 Jim Newsome
  2022-08-04  1:47 ` [bug#54439] [PATCH core-updates 1/2] gnu: rust: decouple rust-1.57 and "rust" Jim Newsome
  9 siblings, 1 reply; 22+ messages in thread
From: kiasoc5--- via Guix-patches via @ 2022-05-20  2:39 UTC (permalink / raw)
  To: 54439

Rust 1.61.0 is out




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] Rust 1.61.0
  2022-05-20  2:39 ` [bug#54439] Rust 1.61.0 kiasoc5--- via Guix-patches via
@ 2022-06-30 18:57   ` kiasoc5 via Guix-patches via
  2022-06-30 20:17     ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 1 reply; 22+ messages in thread
From: kiasoc5 via Guix-patches via @ 2022-06-30 18:57 UTC (permalink / raw)
  To: 54439

Rust 1.62.0 released today




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] Rust 1.61.0
  2022-06-30 18:57   ` kiasoc5 via Guix-patches via
@ 2022-06-30 20:17     ` Tobias Geerinckx-Rice via Guix-patches via
  2022-07-01  1:11       ` kiasoc5 via Guix-patches via
  0 siblings, 1 reply; 22+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2022-06-30 20:17 UTC (permalink / raw)
  To: kiasoc5, 54439

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.




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] Rust 1.61.0
  2022-06-30 20:17     ` Tobias Geerinckx-Rice via Guix-patches via
@ 2022-07-01  1:11       ` kiasoc5 via Guix-patches via
  2022-07-01  9:39         ` ( via Guix-patches via
  0 siblings, 1 reply; 22+ messages in thread
From: kiasoc5 via Guix-patches via @ 2022-07-01  1:11 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 54439

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:

> 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.




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] Rust 1.61.0
  2022-07-01  1:11       ` kiasoc5 via Guix-patches via
@ 2022-07-01  9:39         ` ( via Guix-patches via
  2022-07-03  4:25           ` kiasoc5 via Guix-patches via
  0 siblings, 1 reply; 22+ messages in thread
From: ( via Guix-patches via @ 2022-07-01  9:39 UTC (permalink / raw)
  To: kiasoc5, Tobias Geerinckx-Rice; +Cc: 54439

On Fri Jul 1, 2022 at 2:11 AM BST, kiasoc5 via Guix-patches via wrote:
> 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.

    -- (




^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] Rust 1.61.0
  2022-07-01  9:39         ` ( via Guix-patches via
@ 2022-07-03  4:25           ` kiasoc5 via Guix-patches via
  0 siblings, 0 replies; 22+ messages in thread
From: kiasoc5 via Guix-patches via @ 2022-07-03  4:25 UTC (permalink / raw)
  To: 54439; +Cc: (, Tobias Geerinckx-Rice

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(+)

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





^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [bug#54439] [PATCH core-updates] gnu: rust: Use rust-1.60.0
  2022-03-18  0:21 [bug#54439] Rust: Add Rust 1.59, set default to 1.59 Paul Alesius
                   ` (7 preceding siblings ...)
  2022-05-20  2:39 ` [bug#54439] Rust 1.61.0 kiasoc5--- via Guix-patches via
@ 2022-08-04  1:47 ` Jim Newsome
  2022-08-04 11:03   ` bug#54439: " Marius Bakke
  2022-08-04  1:47 ` [bug#54439] [PATCH core-updates 1/2] gnu: rust: decouple rust-1.57 and "rust" Jim Newsome
  9 siblings, 1 reply; 22+ messages in thread
From: Jim Newsome @ 2022-08-04  1:47 UTC (permalink / raw)
  To: 54439, Maxime Devos; +Cc: Paul Alesius, Felipe Balbi, kiasoc5, Pierre Langlois

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].

[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

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






^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] [PATCH core-updates 1/2] gnu: rust: decouple rust-1.57 and "rust"
  2022-03-18  0:21 [bug#54439] Rust: Add Rust 1.59, set default to 1.59 Paul Alesius
                   ` (8 preceding siblings ...)
  2022-08-04  1:47 ` [bug#54439] [PATCH core-updates] gnu: rust: Use rust-1.60.0 Jim Newsome
@ 2022-08-04  1:47 ` Jim Newsome
  2022-08-04  1:47   ` [bug#54439] [PATCH core-updates 2/2] gnu: rust: Use rust-1.60.0 Jim Newsome
  9 siblings, 1 reply; 22+ messages in thread
From: Jim Newsome @ 2022-08-04  1:47 UTC (permalink / raw)
  To: 54439, Maxime Devos
  Cc: Jim Newsome, Paul Alesius, Felipe Balbi, kiasoc5, Pierre Langlois

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(-)

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





^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [bug#54439] [PATCH core-updates 2/2] gnu: rust: Use rust-1.60.0
  2022-08-04  1:47 ` [bug#54439] [PATCH core-updates 1/2] gnu: rust: decouple rust-1.57 and "rust" Jim Newsome
@ 2022-08-04  1:47   ` Jim Newsome
  0 siblings, 0 replies; 22+ messages in thread
From: Jim Newsome @ 2022-08-04  1:47 UTC (permalink / raw)
  To: 54439, Maxime Devos
  Cc: Jim Newsome, Paul Alesius, Felipe Balbi, kiasoc5, Pierre Langlois

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(-)

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





^ permalink raw reply related	[flat|nested] 22+ messages in thread

* bug#54439: [PATCH core-updates] gnu: rust: Use rust-1.60.0
  2022-08-04  1:47 ` [bug#54439] [PATCH core-updates] gnu: rust: Use rust-1.60.0 Jim Newsome
@ 2022-08-04 11:03   ` Marius Bakke
  2022-08-04 15:08     ` [bug#54439] " Jim Newsome
  0 siblings, 1 reply; 22+ messages in thread
From: Marius Bakke @ 2022-08-04 11:03 UTC (permalink / raw)
  To: Jim Newsome, 54439-done, Maxime Devos
  Cc: paul, kiasoc5, Efraim Flashner, Felipe Balbi, Pierre Langlois,
	56684-done

[-- Attachment #1: Type: text/plain, Size: 2484 bytes --]

Jim Newsome <jim@jimnewsome.net> skriver:

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

Welcome!  You are doing great.  :-)

> 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.  :-/

> 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.

> 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.

> 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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [bug#54439] [PATCH core-updates] gnu: rust: Use rust-1.60.0
  2022-08-04 11:03   ` bug#54439: " Marius Bakke
@ 2022-08-04 15:08     ` Jim Newsome
  0 siblings, 0 replies; 22+ messages in thread
From: Jim Newsome @ 2022-08-04 15:08 UTC (permalink / raw)
  To: Marius Bakke, 54439-done, Maxime Devos
  Cc: 56684-done@debbugs.gnu.org Paul Alesius, Felipe Balbi, kiasoc5,
	Pierre Langlois, Efraim Flashner

On 8/4/22 06:03, Marius Bakke wrote:
> 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!




^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-08-04 15:09 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18  0:21 [bug#54439] Rust: Add Rust 1.59, set default to 1.59 Paul Alesius
2022-03-18  8:23 ` Maxime Devos
2022-03-18  8:55   ` Paul Alesius
2022-03-18  8:25 ` Maxime Devos
2022-03-18  8:25 ` Maxime Devos
2022-03-18  8:26 ` Maxime Devos
2022-03-20 13:58 ` Maxime Devos
2022-03-20 15:36   ` Paul Alesius
2022-03-21  3:31 ` [bug#54439] kiasoc5--- via Guix-patches via
2022-03-26 13:36   ` [bug#54439] Pierre Langlois
2022-04-11 20:04 ` [bug#54439] kiasoc5--- via Guix-patches via
2022-05-20  2:39 ` [bug#54439] Rust 1.61.0 kiasoc5--- via Guix-patches via
2022-06-30 18:57   ` kiasoc5 via Guix-patches via
2022-06-30 20:17     ` Tobias Geerinckx-Rice via Guix-patches via
2022-07-01  1:11       ` kiasoc5 via Guix-patches via
2022-07-01  9:39         ` ( via Guix-patches via
2022-07-03  4:25           ` kiasoc5 via Guix-patches via
2022-08-04  1:47 ` [bug#54439] [PATCH core-updates] gnu: rust: Use rust-1.60.0 Jim Newsome
2022-08-04 11:03   ` bug#54439: " Marius Bakke
2022-08-04 15:08     ` [bug#54439] " Jim Newsome
2022-08-04  1:47 ` [bug#54439] [PATCH core-updates 1/2] gnu: rust: decouple rust-1.57 and "rust" Jim Newsome
2022-08-04  1:47   ` [bug#54439] [PATCH core-updates 2/2] gnu: rust: Use rust-1.60.0 Jim Newsome

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).