GNU bug report logs - #32822
[PATCH 0/4] Finish rust bootstrapping.

Previous Next

Package: guix-patches;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Mon, 24 Sep 2018 14:52:01 UTC

Severity: normal

Tags: patch

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32822 in the body.
You can then email your comments to 32822 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#32822; Package guix-patches. (Mon, 24 Sep 2018 14:52:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Danny Milosavljevic <dannym <at> scratchpost.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 24 Sep 2018 14:52:02 GMT) Full text and rfc822 format available.

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

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: guix-patches <at> gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH 0/4] Finish rust bootstrapping.
Date: Mon, 24 Sep 2018 16:47:47 +0200
Danny Milosavljevic (4):
  gnu: rust: Hide "ar" entry from rust <at> 1.21.0.
  gnu: rust <at> 1.23.0: Bootstrap by rust <at> 1.22.0.
  gnu: rust <at> 1.23.0: Use rust-bootstrapped-package.
  gnu: rust: Remove binary bootstrapper.

 gnu/packages/rust.scm | 142 +++++++++---------------------------------
 1 file changed, 30 insertions(+), 112 deletions(-)





Information forwarded to guix-patches <at> gnu.org:
bug#32822; Package guix-patches. (Mon, 24 Sep 2018 15:02:02 GMT) Full text and rfc822 format available.

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

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: 32822 <at> debbugs.gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH 2/4] gnu: rust <at> 1.23.0: Bootstrap by rust <at> 1.22.0.
Date: Mon, 24 Sep 2018 17:01:32 +0200
* gnu/packages/rust.scm (rust-1.23)[inherit]: Inherit from rust-1.22.
[native-inputs]: Replace rust-bootstrap by rust-1.22.
[arguments]: Inherit from rust-1.22.  Delete "remove-ar" phase.
---
 gnu/packages/rust.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index a1ad6534e..2e51c4a5b 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -657,7 +657,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
 
 (define-public rust-1.23
   (package
-    (inherit rust-1.20)
+    (inherit rust-1.22)
     (name "rust")
     (version "1.23.0")
     (source (rust-source version "14fb8vhjzsxlbi6yrn1r6fl5dlbdd1m92dn5zj5gmzfwf4w9ar3l"))
@@ -669,15 +669,16 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
        ("git" ,git)
        ("procps" ,procps) ; For the tests
        ("python-2" ,python-2)
-       ("rustc-bootstrap" ,rust-bootstrap)
-       ("cargo-bootstrap" ,rust-bootstrap "cargo")
+       ("rustc-bootstrap" ,rust-1.22)
+       ("cargo-bootstrap" ,rust-1.22 "cargo")
        ("pkg-config" ,pkg-config) ; For "cargo"
        ("which" ,which)))
     (arguments
-     (substitute-keyword-arguments (package-arguments rust-1.20)
+     (substitute-keyword-arguments (package-arguments rust-1.22)
        ((#:phases phases)
         `(modify-phases ,phases
            (delete 'configure-archiver)
+           (delete 'remove-ar)
            (add-after 'unpack 'dont-build-native
              (lambda _
                ;; XXX: Revisit this when we use gcc 6.




Information forwarded to guix-patches <at> gnu.org:
bug#32822; Package guix-patches. (Mon, 24 Sep 2018 15:02:02 GMT) Full text and rfc822 format available.

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

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: 32822 <at> debbugs.gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH 1/4] gnu: rust: Hide "ar" entry from rust <at> 1.21.0.
Date: Mon, 24 Sep 2018 17:01:31 +0200
* gnu/packages/rust.scm (rust-1.21)[arguments]<#:phases>[remove-ar]: New
phase.
---
 gnu/packages/rust.scm | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 40633854a..a1ad6534e 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -636,8 +636,20 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                    #t))))))))))
 
 (define-public rust-1.21
-  (rust-bootstrapped-package rust-1.20 "1.21.0"
-                             "1yj8lnxybjrybp00fqhxw8fpr641dh8wcn9mk44xjnsb4i1c21qp"))
+  (let ((base-rust (rust-bootstrapped-package rust-1.20 "1.21.0"
+                    "1yj8lnxybjrybp00fqhxw8fpr641dh8wcn9mk44xjnsb4i1c21qp")))
+    (package
+      (inherit base-rust)
+      (arguments
+       (substitute-keyword-arguments (package-arguments base-rust)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (add-after 'configure 'remove-ar
+               (lambda* (#:key inputs #:allow-other-keys)
+                 ;; Remove because toml complains about "unknown field".
+                 (substitute* "config.toml"
+                  (("^ar =.*") "\n"))
+                 #t)))))))))
 
 (define-public rust-1.22
   (rust-bootstrapped-package rust-1.21 "1.22.1"




Information forwarded to guix-patches <at> gnu.org:
bug#32822; Package guix-patches. (Mon, 24 Sep 2018 15:02:03 GMT) Full text and rfc822 format available.

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

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: 32822 <at> debbugs.gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH 3/4] gnu: rust <at> 1.23.0: Use rust-bootstrapped-package.
Date: Mon, 24 Sep 2018 17:01:33 +0200
* gnu/packages/rust.scm (rust-1.23): Use rust-bootstrapped-package.
---
 gnu/packages/rust.scm | 45 +++++++++++++++----------------------------
 1 file changed, 16 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 2e51c4a5b..37c30c14e 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -656,35 +656,22 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                              "1lrzzp0nh7s61wgfs2h6ilaqi6iq89f1pd1yaf65l87bssyl4ylb"))
 
 (define-public rust-1.23
-  (package
-    (inherit rust-1.22)
-    (name "rust")
-    (version "1.23.0")
-    (source (rust-source version "14fb8vhjzsxlbi6yrn1r6fl5dlbdd1m92dn5zj5gmzfwf4w9ar3l"))
-    (native-inputs
-     `(("bison" ,bison) ; For the tests
-       ("cmake" ,cmake)
-       ("flex" ,flex) ; For the tests
-       ("gdb" ,gdb)   ; For the tests
-       ("git" ,git)
-       ("procps" ,procps) ; For the tests
-       ("python-2" ,python-2)
-       ("rustc-bootstrap" ,rust-1.22)
-       ("cargo-bootstrap" ,rust-1.22 "cargo")
-       ("pkg-config" ,pkg-config) ; For "cargo"
-       ("which" ,which)))
-    (arguments
-     (substitute-keyword-arguments (package-arguments rust-1.22)
-       ((#:phases phases)
-        `(modify-phases ,phases
-           (delete 'configure-archiver)
-           (delete 'remove-ar)
-           (add-after 'unpack 'dont-build-native
-             (lambda _
-               ;; XXX: Revisit this when we use gcc 6.
-               (substitute* "src/binaryen/CMakeLists.txt"
-                 (("ADD_COMPILE_FLAG\\(\\\"-march=native\\\"\\)") ""))
-               #t))))))))
+  (let ((base-rust (rust-bootstrapped-package rust-1.22 "1.23.0"
+                    "14fb8vhjzsxlbi6yrn1r6fl5dlbdd1m92dn5zj5gmzfwf4w9ar3l")))
+    (package
+      (inherit base-rust)
+      (arguments
+       (substitute-keyword-arguments (package-arguments base-rust)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (delete 'configure-archiver)
+             (delete 'remove-ar)
+             (add-after 'unpack 'dont-build-native
+               (lambda _
+                 ;; XXX: Revisit this when we use gcc 6.
+                 (substitute* "src/binaryen/CMakeLists.txt"
+                   (("ADD_COMPILE_FLAG\\(\\\"-march=native\\\"\\)") ""))
+                 #t)))))))))
 
 (define-public rust-1.24
   (let ((base-rust




Information forwarded to guix-patches <at> gnu.org:
bug#32822; Package guix-patches. (Mon, 24 Sep 2018 15:02:03 GMT) Full text and rfc822 format available.

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

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: 32822 <at> debbugs.gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH 4/4] gnu: rust: Remove binary bootstrapper.
Date: Mon, 24 Sep 2018 17:01:34 +0200
* gnu/packages/rust.scm (rust-bootstrap): Delete variable.
---
 gnu/packages/rust.scm | 82 -------------------------------------------
 1 file changed, 82 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 37c30c14e..e30e8a61a 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -69,88 +69,6 @@
     ("mips64el-linux" "mips64el-unknown-linux-gnuabi64")
     (_                (nix-system->gnu-triplet system))))
 
-(define rust-bootstrap
-  (package
-    (name "rust-bootstrap")
-    (version "1.22.1")
-    (source #f)
-    (build-system gnu-build-system)
-    (native-inputs
-     `(("patchelf" ,patchelf)))
-    (inputs
-     `(("gcc" ,(canonical-package gcc))
-       ("gcc:lib" ,(canonical-package gcc) "lib")
-       ("zlib" ,zlib)
-       ("source"
-        ,(origin
-           (method url-fetch)
-           (uri (string-append
-                 "https://static.rust-lang.org/dist/"
-                 "rust-" version "-" (nix-system->gnu-triplet-for-rust)
-                 ".tar.gz"))
-           (sha256
-            (base32
-             (match (nix-system->gnu-triplet-for-rust)
-               ("i686-unknown-linux-gnu"
-                "15zqbx86nm13d5vq2gm69b7av4vg479f74b5by64hs3bcwwm08pr")
-               ("x86_64-unknown-linux-gnu"
-                "1yll78x6b3abnvgjf2b66gvp6mmcb9y9jdiqcwhmgc0z0i0fix4c")
-               ("armv7-unknown-linux-gnueabihf"
-                "138a8l528kzp5wyk1mgjaxs304ac5ms8vlpq0ggjaznm6bn2j7a5")
-               ("aarch64-unknown-linux-gnu"
-                "0z6m9m1rx4d96nvybbfmpscq4dv616m615ijy16d5wh2vx0p4na8")
-               ("mips64el-unknown-linux-gnuabi64"
-                "07k4pcv7jvfa48cscdj8752lby7m7xdl88v3a6na1vs675lhgja2")
-               (_ ""))))))))
-    (outputs '("out" "cargo"))
-    (arguments
-     `(#:tests? #f
-       #:strip-binaries? #f
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (delete 'build)
-         (replace 'install
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (cargo-out (assoc-ref outputs "cargo"))
-                    (gcc:lib (assoc-ref inputs "gcc:lib"))
-                    (libc (assoc-ref inputs "libc"))
-                    (zlib (assoc-ref inputs "zlib"))
-                    (ld-so (string-append libc ,(glibc-dynamic-linker)))
-                    (rpath (string-append out "/lib:" zlib "/lib:"
-                                          libc "/lib:" gcc:lib "/lib"))
-                    (cargo-rpath (string-append cargo-out "/lib:" libc "/lib:"
-                                                gcc:lib "/lib"))
-                    (rustc (string-append out "/bin/rustc"))
-                    (rustdoc (string-append out "/bin/rustdoc"))
-                    (cargo (string-append cargo-out "/bin/cargo"))
-                    (gcc (assoc-ref inputs "gcc")))
-               ;; Install rustc/rustdoc.
-               (invoke "bash" "install.sh"
-                        (string-append "--prefix=" out)
-                        (string-append "--components=rustc,"
-                                       "rust-std-"
-                                       ,(nix-system->gnu-triplet-for-rust)))
-               ;; Install cargo.
-               (invoke "bash" "install.sh"
-                        (string-append "--prefix=" cargo-out)
-                        (string-append "--components=cargo"))
-               (for-each (lambda (file)
-                           (invoke "patchelf" "--set-rpath" rpath file))
-                         (cons* rustc rustdoc (find-files out "\\.so$")))
-               (invoke "patchelf" "--set-rpath" cargo-rpath cargo)
-               (for-each (lambda (file)
-                           (invoke "patchelf" "--set-interpreter" ld-so file))
-                         (list rustc rustdoc cargo))
-               #t))))))
-    (home-page "https://www.rust-lang.org")
-    (synopsis "Prebuilt rust compiler and cargo package manager")
-    (description "This package provides a pre-built @command{rustc} compiler
-and a pre-built @command{cargo} package manager, which can
-in turn be used to build the final Rust.")
-    (license license:asl2.0)))
-
 
 (define* (rust-source version hash #:key (patches '()))
   (origin




Information forwarded to guix-patches <at> gnu.org:
bug#32822; Package guix-patches. (Mon, 24 Sep 2018 19:39:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 32822 <at> debbugs.gnu.org
Subject: Re: [bug#32822] [PATCH 0/4] Finish rust bootstrapping.
Date: Mon, 24 Sep 2018 21:38:21 +0200
Hi Danny,

Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> Danny Milosavljevic (4):
>   gnu: rust: Hide "ar" entry from rust <at> 1.21.0.
>   gnu: rust <at> 1.23.0: Bootstrap by rust <at> 1.22.0.
>   gnu: rust <at> 1.23.0: Use rust-bootstrapped-package.
>   gnu: rust: Remove binary bootstrapper.

Do I get it right that mrustc is capable enough to build Rust 1.19, and
from there on we have the full chain?

That sounds really exciting!  And worth a blog post :-), if only to
share with those who care about building from source: #bootstrappable,
Debian, and other reproducible build people.

FWIW the patches LGTM.  I suppose you could push them to wip-rust, then
we let hydra and berlin build it, and once it’s built (could be 36h
later?) we merge into master.

WDYT?

Thank you!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#32822; Package guix-patches. (Tue, 25 Sep 2018 08:02:01 GMT) Full text and rfc822 format available.

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

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 32822 <at> debbugs.gnu.org
Subject: Re: [bug#32822] [PATCH 0/4] Finish rust bootstrapping.
Date: Tue, 25 Sep 2018 10:01:49 +0200
[Message part 1 (text/plain, inline)]
Hi Ludo,

On Mon, 24 Sep 2018 21:38:21 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:

> Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
> 
> > Danny Milosavljevic (4):
> >   gnu: rust: Hide "ar" entry from rust <at> 1.21.0.
> >   gnu: rust <at> 1.23.0: Bootstrap by rust <at> 1.22.0.
> >   gnu: rust <at> 1.23.0: Use rust-bootstrapped-package.
> >   gnu: rust: Remove binary bootstrapper.  
> 
> Do I get it right that mrustc is capable enough to build Rust 1.19, and
> from there on we have the full chain?

Yes (except for MIPS, where mrustc doesn't have the target settings in
upstreeam - but I do, but untested).

> That sounds really exciting!  And worth a blog post :-), if only to
> share with those who care about building from source: #bootstrappable,
> Debian, and other reproducible build people.

Sure.  Should I just E-Mail the text or how do I get it into the blog?

> FWIW the patches LGTM.  I suppose you could push them to wip-rust, then
> we let hydra and berlin build it, and once it’s built (could be 36h
> later?) we merge into master.

Okay.  I've pushed them to wip-rust.  How do we make hydra and berlin build it?
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#32822; Package guix-patches. (Tue, 25 Sep 2018 15:32:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 32822 <at> debbugs.gnu.org
Subject: Re: [bug#32822] [PATCH 0/4] Finish rust bootstrapping.
Date: Tue, 25 Sep 2018 17:31:11 +0200
Hello,

Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> On Mon, 24 Sep 2018 21:38:21 +0200
> ludo <at> gnu.org (Ludovic Courtès) wrote:
>
>> Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
>> 
>> > Danny Milosavljevic (4):
>> >   gnu: rust: Hide "ar" entry from rust <at> 1.21.0.
>> >   gnu: rust <at> 1.23.0: Bootstrap by rust <at> 1.22.0.
>> >   gnu: rust <at> 1.23.0: Use rust-bootstrapped-package.
>> >   gnu: rust: Remove binary bootstrapper.  
>> 
>> Do I get it right that mrustc is capable enough to build Rust 1.19, and
>> from there on we have the full chain?
>
> Yes (except for MIPS, where mrustc doesn't have the target settings in
> upstreeam - but I do, but untested).

Woohoo!  Impressive.

>> That sounds really exciting!  And worth a blog post :-), if only to
>> share with those who care about building from source: #bootstrappable,
>> Debian, and other reproducible build people.
>
> Sure.  Should I just E-Mail the text or how do I get it into the blog?

You can send a .md file or a patch against guix-artwork.git (under
website/posts) to guix-blog <at> gnu.org for feedback (though currently it’s
just Jelle, Ricardo, and myself IIRC.)  And then you can push to
guix-artwork.git and I can do the CVS dance to put it on-line.

>> FWIW the patches LGTM.  I suppose you could push them to wip-rust, then
>> we let hydra and berlin build it, and once it’s built (could be 36h
>> later?) we merge into master.
>
> Okay.  I've pushed them to wip-rust.  How do we make hydra and berlin build it?

If I didn’t make any mistake it should show up at:

  https://hydra.gnu.org/jobset/gnu/wip-rust
  https://berlin.guixsd.org/jobset/wip-rust

Thanks for all the work!

Ludo’.




bug closed, send any further explanations to 32822 <at> debbugs.gnu.org and Danny Milosavljevic <dannym <at> scratchpost.org> Request was from Danny Milosavljevic <dannym <at> scratchpost.org> to control <at> debbugs.gnu.org. (Sun, 10 Feb 2019 21:17:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 11 Mar 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 47 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.