[PATCH] gnu: rust: Update rust from 1.22.1 release to 1.24.1

  • Done
  • quality assurance status badge
Details
6 participants
  • Danny Milosavljevic
  • Efraim Flashner
  • Ludovic Courtès
  • Marius Bakke
  • Nikolai Merinov
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Nikolai Merinov
Severity
normal
N
N
Nikolai Merinov wrote on 13 Mar 2018 20:06
(address . guix-patches@gnu.org)
874llhdocu.fsf@member.fsf.org
* gnu/packages/rust.scm (%rust-bootstrap-binaries-version): Update version.
(%rust-bootstrap-binaries): Update hashsums.
(cargo-bootstrap): Update minor version.
(rust): Rename "rustc" to "rust". Update sha256 for tarball. Add cargo related
dependencies. Install "cargo" as separate "rust" output. Remove substitutes
for bugs that was fixed in "rustc" source code. Install documentation to
separate "doc" output. Update configuration according to changes in "rustc"
source code.
* guix/build-system/cargo.scm (default-rust): Replace "default-cargo" and
"default-rustc" functions with "default-rust" function.
(cargo-build-system): Take only one package as "rust" source. Use "rustc" from
default output of "rust" package, use "cargo" as "cargo" output of "rust"
package.

Cargo was moved from separate package to "rust" output because starting from
0.25.0 release cargo have no "Cargo.lock" anymore. According to
commit message "cargo" used as "rust" dependency and stable version for
"cargo" provided through "Cargo.lock" file from "rust-lang/rust"
repository. As result only way to get stable version of "cargo" is build it from
"rust" sources.
---
gnu/packages/rust.scm | 1146 ++-----------------------------------------
guix/build-system/cargo.scm | 21 +-
2 files changed, 37 insertions(+), 1130 deletions(-)

Toggle diff (450 lines)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 1ba857d36..3fa889582 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -53,7 +53,7 @@
#:use-module (srfi srfi-26))
;; Should be one less than the current released version.
-(define %rust-bootstrap-binaries-version "1.21.0")
+(define %rust-bootstrap-binaries-version "1.23.0")
(define %rust-bootstrap-binaries
(origin
@@ -66,15 +66,15 @@
(base32
(match %host-type
("i686-unknown-linux-gnu"
- "1vnvqwz30hvyjcfr1f602lg43v2vlqjr3yhb5vr8xnrcc07yvjmp")
+ "0gs283lw6larhjlr02zm9g78djq2f6bdhxj6ls66q0z18zpx0nyw")
("x86_64-unknown-linux-gnu"
- "1s0866qcy0645bqhsbs3pvk2hi52ps8jzs7x096w0as033h707ml")
+ "0znw3xxh837i5wlwsbbw6bxdqfa58bxyw3716wbckwyph8xb4d4s")
("armv7-unknown-linux-gnueabihf"
- "1ml8fjq2b6j2vn1j314w93pf4wjl97n1mbz609h3i7md0zqscvs1")
+ "13mh4qx996rb6c3xygflc10j5zkmcxzjr32340ardwb7ja4jfw2q")
("aarch64-unknown-linux-gnu"
- "1hv4m2m7xjcph39r6baryfg23hjcr4sbsrfnd1lh0wn67k2fc7j9")
+ "1irbj73ifdm7xvshma7qp61sadm683dnc57jfg5qc8kdjyyrydrq")
("mips64el-unknown-linux-gnuabi64"
- "0p7fzkfcqg5yvj86v434z351dp7s7pgns8nzxj0fz3hmbfbvlvn9")
+ "1wksf07ba9idrj1z6x0hdfjsmhpzzi5idawnkfbhy6cj1g9ihnzv")
(_ "")))))) ; Catch-all for other systems.
(define %cargo-reference-project-file "/dev/null")
@@ -148,7 +148,7 @@ which can in turn be used to build the final Rust compiler.")
(define cargo-bootstrap
(package
(name "cargo-bootstrap")
- (version (cargo-version %rust-bootstrap-binaries-version 1))
+ (version (cargo-version %rust-bootstrap-binaries-version 0))
(source %rust-bootstrap-binaries)
(build-system gnu-build-system)
(native-inputs
@@ -213,9 +213,9 @@ manager, which is required to build itself.")
rustc-bootstrap and cargo-bootstrap packages.")
(license license:asl2.0)))
-(define-public rustc
+(define-public rust
(package
- (name "rustc")
+ (name "rust")
(version (rustc-version %rust-bootstrap-binaries-version 1))
(source (origin
(method url-fetch)
@@ -224,7 +224,7 @@ rustc-bootstrap and cargo-bootstrap packages.")
"rustc-" version "-src.tar.gz"))
(sha256
(base32
- "1lrzzp0nh7s61wgfs2h6ilaqi6iq89f1pd1yaf65l87bssyl4ylb"))
+ "1vv10x2h9kq7fxh2v01damdq8pvlp5acyh1kzcda9sfjx12kv99y"))
(modules '((guix build utils)))
(snippet
`(begin
@@ -240,10 +240,14 @@ rustc-bootstrap and cargo-bootstrap packages.")
("procps" ,procps) ; For the tests
("python-2" ,python-2)
("rust-bootstrap" ,rust-bootstrap)
+ ("pkg-config" ,pkg-config) ; For "cargo"
("which" ,which)))
(inputs
`(("jemalloc" ,jemalloc-4.5.0)
- ("llvm" ,llvm-3.9.1)))
+ ("llvm" ,llvm-3.9.1)
+ ("openssl" ,openssl)
+ ("libcurl" ,curl))) ; For "cargo"
+ (outputs '("out" "doc" "cargo"))
(arguments
`(#:imported-modules ,%cargo-build-system-modules ;for `generate-checksums'
#:phases
@@ -258,9 +262,6 @@ rustc-bootstrap and cargo-bootstrap packages.")
(add-after 'unpack 'patch-tests
(lambda* (#:key inputs #:allow-other-keys)
(let ((bash (assoc-ref inputs "bash")))
- (substitute* "src/build_helper/lib.rs"
- ;; In same folder as gcc there is only "gcc-ar" utility
- (("file\\.push_str\\(\"ar\"\\);") "file.push_str(\"gcc-ar\");"))
(substitute* "src/libstd/process.rs"
;; The newline is intentional.
;; There's a line length "tidy" check in Rust which would
@@ -276,12 +277,6 @@ rustc-bootstrap and cargo-bootstrap packages.")
;; Our ld-wrapper cannot process non-UTF8 bytes in LIBRARY_PATH.
;; <https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00193.html>
(delete-file-recursively "src/test/run-make/linker-output-non-utf8")
- (substitute* "src/build_helper/lib.rs"
- ;; Bug in Rust code.
- ;; Current implementation assume that if dst not exist then it's mtime
- ;; is 0, but in same time "src" have 0 mtime in guix build!
- (("let threshold = mtime\\(dst\\);")
- "if !dst.exists() {\nreturn false\n}\n let threshold = mtime(dst);"))
#t)))
(add-after 'patch-source-shebangs 'patch-cargo-checksums
(lambda* (#:key inputs #:allow-other-keys)
@@ -302,6 +297,7 @@ rustc-bootstrap and cargo-bootstrap packages.")
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc"))
(gcc (assoc-ref inputs "gcc"))
(gdb (assoc-ref inputs "gdb"))
(binutils (assoc-ref inputs "binutils"))
@@ -317,15 +313,18 @@ rustc-bootstrap and cargo-bootstrap packages.")
[build]
cargo = \"" cargo "/bin/cargo" "\"
rustc = \"" rustc "/bin/rustc" "\"
+docs = true
python = \"" python "/bin/python2" "\"
gdb = \"" gdb "/bin/gdb" "\"
vendor = true
submodules = false
[install]
prefix = \"" out "\"
+docdir = \"" doc "/share/doc/rust" "\"
+sysconfdir = \"etc\"
+localstatedir = \"var/lib\"
[rust]
default-linker = \"" gcc "/bin/gcc" "\"
-default-ar = \"" binutils "/bin/ar" "\"
channel = \"stable\"
rpath = true
# There is 2 failed codegen tests:
@@ -336,6 +335,7 @@ codegen-tests = false
llvm-config = \"" llvm "/bin/llvm-config" "\"
cc = \"" gcc "/bin/gcc" "\"
cxx = \"" gcc "/bin/g++" "\"
+ar = \"" binutils "/bin/ar" "\"
jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
[dist]
") port)))
@@ -350,13 +350,20 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
#t))
(replace 'build
(lambda* (#:key inputs outputs #:allow-other-keys)
- (zero? (system* "./x.py" "build"))))
+ (and (zero? (system* "./x.py" "build"))
+ (zero? (system* "./x.py" "build" "src/tools/cargo")))))
(replace 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
(zero? (system* "./x.py" "test"))))
(replace 'install
(lambda* (#:key inputs outputs #:allow-other-keys)
- (zero? (system* "./x.py" "install"))))
+ (and (zero? (system* "./x.py" "install"))
+ (begin
+ (substitute* "config.toml"
+ ;; replace prefix to specific output
+ (("prefix = \"[^\"]*\"")
+ (string-append "prefix = \"" (assoc-ref outputs "cargo") "\"")))
+ (zero? (system* "./x.py" "install" "cargo"))))))
(add-after 'install 'wrap-rustc
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
@@ -375,1096 +382,3 @@ safety and thread safety guarantees.")
(home-page "https://www.rust-lang.org")
;; Dual licensed.
(license (list license:asl2.0 license:expat))))
-
-;; This tries very hard not to get into a cyclic dependency like this:
-;; cargo <- cargo-build-system <- cargo.
-(define-public cargo
- (package
- (name "cargo")
- (version (cargo-version (rustc-version %rust-bootstrap-binaries-version) 0))
- (source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/rust-lang/cargo/archive/"
- version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "0kr7rml7v2bm7zl8jcb3056h63zpyy9m08s212i8vfwxf6lf5fzl"))))
- (build-system cargo-build-system)
- (propagated-inputs
- `(("cmake" ,cmake)
- ("pkg-config" ,pkg-config)))
- (inputs
- `(("curl" ,curl)
- ("libgit2" ,libgit2)
- ("libssh2" ,libssh2)
- ("openssl" ,openssl)
- ("python-2" ,python-2)
- ("zlib" ,zlib)))
- (native-inputs
- `(("git" ,git) ; required for tests
- ;; Next dependencies generated with next command:
- ;; cat Cargo.lock | awk '
- ;; /^"checksum/
- ;; { oname=name=$2; vers=$3; hash=$6;
- ;; if (ns[name] != 1) { ns[name]=1; } else { name = name "-" vers; }
- ;; print " (\"rust-" name "\"";
- ;; print " ,(origin";
- ;; print " (method url-fetch)";
- ;; print " (uri (crate-uri \"" oname "\" \"" vers "\"))";
- ;; print " (file-name \"rust-" oname "\-\" vers "\")
- ;; print " (sha256";
- ;; print " (base16-string->bytevector";
- ;; print " " hash "))))"
- ;; }'
- ("rust-advapi32-sys"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "advapi32-sys" "0.2.0"))
- (file-name "rust-advapi32-sys-0.2.0")
- (sha256
- (base16-string->bytevector
- "e06588080cb19d0acb6739808aafa5f26bfb2ca015b2b6370028b44cf7cb8a9a"))))
- ("rust-aho-corasick"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "aho-corasick" "0.5.3"))
- (file-name "rust-aho-corasick-0.5.3")
- (sha256
- (base16-string->bytevector
- "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66"))))
- ("rust-aho-corasick-0.6.3"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "aho-corasick" "0.6.3"))
- (file-name "rust-aho-corasick-0.6.3")
- (sha256
- (base16-string->bytevector
- "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"))))
- ("rust-atty"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "atty" "0.2.3"))
- (file-name "rust-atty-0.2.3")
- (sha256
- (base16-string->bytevector
- "21e50800ec991574876040fff8ee46b136a53e985286fbe6a3bdfe6421b78860"))))
- ("rust-backtrace"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "backtrace" "0.3.3"))
- (file-name "rust-backtrace-0.3.3")
- (sha256
- (base16-string->bytevector
- "99f2ce94e22b8e664d95c57fff45b98a966c2252b60691d0b7aeeccd88d70983"))))
- ("rust-backtrace-sys"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "backtrace-sys" "0.1.14"))
- (file-name "rust-backtrace-sys-0.1.14")
- (sha256
- (base16-string->bytevector
- "c63ea141ef8fdb10409d0f5daf30ac51f84ef43bff66f16627773d2a292cd189"))))
- ("rust-bitflags"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "bitflags" "0.7.0"))
- (file-name "rust-bitflags-0.7.0")
- (sha256
- (base16-string->bytevector
- "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"))))
- ("rust-bitflags-0.9.1"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "bitflags" "0.9.1"))
- (file-name "rust-bitflags-0.9.1")
- (sha256
- (base16-string->bytevector
- "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"))))
- ("rust-bufstream"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "bufstream" "0.1.3"))
- (file-name "rust-bufstream-0.1.3")
- (sha256
- (base16-string->bytevector
- "f2f382711e76b9de6c744cc00d0497baba02fb00a787f088c879f01d09468e32"))))
- ("rust-cc"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "cc" "1.0.0"))
- (file-name "rust-cc-1.0.0")
- (sha256
- (base16-string->bytevector
- "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1"))))
- ("rust-cfg-if"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "cfg-if" "0.1.2"))
- (file-name "rust-cfg-if-0.1.2")
- (sha256
- (base16-string->bytevector
- "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"))))
- ("rust-cmake"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "cmake" "0.1.26"))
- (file-name "rust-cmake-0.1.26")
- (sha256
- (base16-string->bytevector
- "357c07e7a1fc95732793c1edb5901e1a1f305cfcf63a90eb12dbd22bdb6b789d"))))
- ("rust-commoncrypto"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "commoncrypto" "0.2.0"))
- (file-name "rust-commoncrypto-0.2.0")
- (sha256
- (base16-string->bytevector
- "d056a8586ba25a1e4d61cb090900e495952c7886786fc55f909ab2f819b69007"))))
- ("rust-commoncrypto-sys"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "commoncrypto-sys" "0.2.0"))
- (file-name "rust-commoncrypto-sys-0.2.0")
- (sha256
- (base16-string->bytevector
- "1fed34f46747aa73dfaa578069fd8279d2818ade2b55f38f22a9401c7f4083e2"))))
- ("rust-conv"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "conv" "0.3.3"))
- (file-name "rust-conv-0.3.3")
- (sha256
- (base16-string->bytevector
- "78ff10625fd0ac447827aa30ea8b861fead473bb60aeb73af6c1c58caf0d1299"))))
- ("rust-core-foundation"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "core-foundation" "0.4.4"))
- (file-name "rust-core-foundation-0.4.4")
- (sha256
- (base16-string->bytevector
- "5909502e547762013619f4c4e01cc7393c20fe2d52d7fa471c1210adb2320dc7"))))
- ("rust-core-foundation-sys"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "core-foundation-sys" "0.4.4"))
- (file-name "rust-core-foundation-sys-0.4.4")
- (sha256
- (base16-string->bytevector
- "bc9fb3d6cb663e6fd7cf1c63f9b144ee2b1e4a78595a0451dd34bff85b9a3387"))))
- ("rust-crossbeam"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "crossbeam" "0.2.10"))
- (file-name "rust-crossbeam-0.2.10")
- (sha256
- (base16-string->bytevector
- "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"))))
- ("rust-crossbeam-0.3.0"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "crossbeam" "0.3.0"))
- (file-name "rust-crossbeam-0.3.0")
- (sha256
- (base16-string->bytevector
- "8837ab96533202c5b610ed44bc7f4183e7957c1c8f56e8cc78bb098593c8ba0a"))))
- ("rust-crypto-hash"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "crypto-hash" "0.3.0"))
- (file-name "rust-crypto-hash-0.3.0")
- (sha256
- (base16-string->bytevector
- "34903878eec1694faf53cae8473a088df333181de421d4d3d48061d6559fe602"))))
- ("rust-curl"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "curl" "0.4.8"))
- (file-name "rust-curl-0.4.8")
- (sha256
- (base16-string->bytevector
- "7034c534a1d7d22f7971d6088aa9d281d219ef724026c3428092500f41ae9c2c"))))
- ("rust-curl-sys"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "curl-sys" "0.3.15"))
- (file-name "rust-curl-sys-0.3.15")
- (sha256
- (base16-string->bytevector
- "4bee31aa3a079d5f3ff9579ea4dcfb1b1a17a40886f5f467436d383e78134b55"))))
- ("rust-custom_derive"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "custom_derive" "0.1.7"))
- (file-name "rust-custom_derive-0.1.7")
- (sha256
- (base16-string->bytevector
- "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9"))))
- ("rust-dbghelp-sys"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "dbghelp-sys" "0.2.0"))
- (file-name "rust-dbghelp-sys-0.2.0")
- (sha256
- (base16-string->bytevector
- "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"))))
- ("rust-docopt"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "docopt" "0.8.1"))
- (file-name "rust-docopt-0.8.1")
- (sha256
- (base16-string->bytevector
- "3b5b93718f8b3e5544fcc914c43de828ca6c6ace23e0332c6080a2977b49787a"))))
- ("rust-dtoa"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "dtoa" "0.4.2"))
- (file-name "rust-dtoa-0.4.2")
- (sha256
- (base16-string->bytevector
- "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab"))))
- ("rust-env_logger"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "env_logger" "0.4.3"))
- (file-name "rust-env_logger-0.4.3")
- (sha256
- (base16-string->bytevector
- "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b"))))
- ("rust-error-chain"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "error-chain" "0.11.0"))
- (file-name "rust-error-chain-0.11.0")
- (sha256
- (base16-string->bytevector
- "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"))))
- ("rust-filetime"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "filetime" "0.1.12"))
- (file-name "rust-filetime-0.1.12")
- (sha256
- (base16-string->bytevector
- "6ab199bf38537c6f38792669e081e0bb278b9b7405bba2642e4e5d15bf732c0e"))))
- ("rust-flate2"
- ,(origin
- (method url-fetch)
- (uri (crate-uri "flate2" "0.2.20"))
- (file-name "rust-flate2-0.2.20")
- (sha256
- (base16-string->bytevector
- "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423"))))
- ("rust-fnv"
-
This message was truncated. Download the full message here.
L
L
Ludovic Courtès wrote on 17 Mar 2018 22:22
(name . Nikolai Merinov)(address . nikolai.merinov@member.fsf.org)(address . 30831@debbugs.gnu.org)
87bmfmmm78.fsf@gnu.org
Hi Nikolai,

Great piece of work!

Nikolai Merinov <nikolai.merinov@member.fsf.org> skribis:

Toggle quote (22 lines)
> * gnu/packages/rust.scm (%rust-bootstrap-binaries-version): Update version.
> (%rust-bootstrap-binaries): Update hashsums.
> (cargo-bootstrap): Update minor version.
> (rust): Rename "rustc" to "rust". Update sha256 for tarball. Add cargo related
> dependencies. Install "cargo" as separate "rust" output. Remove substitutes
> for bugs that was fixed in "rustc" source code. Install documentation to
> separate "doc" output. Update configuration according to changes in "rustc"
> source code.
> * guix/build-system/cargo.scm (default-rust): Replace "default-cargo" and
> "default-rustc" functions with "default-rust" function.
> (cargo-build-system): Take only one package as "rust" source. Use "rustc" from
> default output of "rust" package, use "cargo" as "cargo" output of "rust"
> package.
>
> Cargo was moved from separate package to "rust" output because starting from
> 0.25.0 release cargo have no "Cargo.lock" anymore. According to
> https://github.com/rust-lang/cargo/commit/5c9665f41c6b4d3b99d3b9f8b48a286f5f154692
> commit message "cargo" used as "rust" dependency and stable version for
> "cargo" provided through "Cargo.lock" file from "rust-lang/rust"
> repository. As result only way to get stable version of "cargo" is build it from
> "rust" sources.

OK.

Toggle quote (26 lines)
> ;; Should be one less than the current released version.
> -(define %rust-bootstrap-binaries-version "1.21.0")
> +(define %rust-bootstrap-binaries-version "1.23.0")
>
> (define %rust-bootstrap-binaries
> (origin
> @@ -66,15 +66,15 @@
> (base32
> (match %host-type
> ("i686-unknown-linux-gnu"
> - "1vnvqwz30hvyjcfr1f602lg43v2vlqjr3yhb5vr8xnrcc07yvjmp")
> + "0gs283lw6larhjlr02zm9g78djq2f6bdhxj6ls66q0z18zpx0nyw")
> ("x86_64-unknown-linux-gnu"
> - "1s0866qcy0645bqhsbs3pvk2hi52ps8jzs7x096w0as033h707ml")
> + "0znw3xxh837i5wlwsbbw6bxdqfa58bxyw3716wbckwyph8xb4d4s")
> ("armv7-unknown-linux-gnueabihf"
> - "1ml8fjq2b6j2vn1j314w93pf4wjl97n1mbz609h3i7md0zqscvs1")
> + "13mh4qx996rb6c3xygflc10j5zkmcxzjr32340ardwb7ja4jfw2q")
> ("aarch64-unknown-linux-gnu"
> - "1hv4m2m7xjcph39r6baryfg23hjcr4sbsrfnd1lh0wn67k2fc7j9")
> + "1irbj73ifdm7xvshma7qp61sadm683dnc57jfg5qc8kdjyyrydrq")
> ("mips64el-unknown-linux-gnuabi64"
> - "0p7fzkfcqg5yvj86v434z351dp7s7pgns8nzxj0fz3hmbfbvlvn9")
> + "1wksf07ba9idrj1z6x0hdfjsmhpzzi5idawnkfbhy6cj1g9ihnzv")
> (_ "")))))) ; Catch-all for other systems.

Instead of incrementing the version number of the bootstrap binaries, do
you think it would be an option to keep 1.22 and build 1.23 from it, or
does that cargo/rust merge prevent it?

That would allow us to build Rust independently from what upstream did,
thereby increasing binary diversity, which I think is a good thing
security-wise.

Thoughts?

Ludo’.
D
D
Danny Milosavljevic wrote on 18 Mar 2018 19:58
(name . Nikolai Merinov)(address . nikolai.merinov@member.fsf.org)(address . 30831@debbugs.gnu.org)
20180318195811.70c2b820@scratchpost.org
Hi,

Rust after this patch is not reproducible.

Binary files /gnu/store/nbyxci7zgv9z5zrkzw9c5wppgv3bk1rd-rust-1.24.1/lib/librustc-7b5ea53516e6ab59.so and /gnu/store/nbyxci7zgv9z5zrkzw9c5wppgv3bk1rd-rust-1.24.1-check/lib/librustc-7b5ea53516e6ab59.so differ
Binary files /gnu/store/nbyxci7zgv9z5zrkzw9c5wppgv3bk1rd-rust-1.24.1/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-7b5ea53516e6ab59.so and /gnu/store/nbyxci7zgv9z5zrkzw9c5wppgv3bk1rd-rust-1.24.1-check/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-7b5ea53516e6ab59.so differ

diffoscope says:

? ? ? - [26] .rustc PROGBITS 0000000000000000 be3030 6e5dd5 00 0 0 16
? ? ? - [27] .symtab SYMTAB 0000000000000000 12c8e08 158340 18 28 54351 8
? ? ? - [28] .strtab STRTAB 0000000000000000 1421148 3b00e3 00 0 0 1
? ? ? - [29] .shstrtab STRTAB 0000000000000000 17d122b 0000fe 00 0 0 1
? ? ? + [26] .rustc PROGBITS 0000000000000000 be3030 6e6b05 00 0 0 16
? ? ? + [27] .symtab SYMTAB 0000000000000000 12c9b38 158340 18 28 54351 8
? ? ? + [28] .strtab STRTAB 0000000000000000 1421e78 3b00e3 00 0 0 1
? ? ? + [29] .shstrtab STRTAB 0000000000000000 17d1f5b 0000fe 00 0 0 1
? ? ? Key to Flags:
[...]
? ? ? - 1603: 0000000000000000 0x6e5dd5 OBJECT GLOBAL DEFAULT 26 rust_metadata_rustc_d87c35d223a98218627136b41e7e5b87
? ? ? + 1603: 0000000000000000 0x6e6b05 OBJECT GLOBAL DEFAULT 26 rust_metadata_rustc_d87c35d223a98218627136b41e7e5b87

And a metadata body part is missing in the second round.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlqutsMACgkQ5xo1VCww
uqXx9gf+Ll5dpapnsol2F1S4EO2JiFDY2JnkEFwz/EFY5mHP19eg9sEqvH93AOl0
KShmEZ7XFKqrfSGbPEhVLGAjryPi3aSrgvXuzhb5KEyLL7eUk6B18z+j6iB1Eytd
VyajLxHKmg32L1++FQCfWQzIVLi83M+GQw8gotA7lzKo5oGftsgUmQjXLVDpS4bw
mJ9OOyxMZtd3H8JV9ECcujdf7NqpHsylp4ubYnrKyS2JtN173fzr+ImcL6V6LwVU
na4gC0bi/Z9L6Y0xH6Te9vW9jZmzo+kZHJqLgJ7pDxzmbUhlYX2I2EErbTxjRVct
pl/EKLPeb+kzBw5pbxexohv1ZpanqA==
=1HXL
-----END PGP SIGNATURE-----


N
N
Nikolai Merinov wrote on 19 Mar 2018 13:26
(address . 30831@debbugs.gnu.org)
87h8pcckv4.fsf@member.fsf.org
Hi Ludovic,

Toggle quote (4 lines)
> Instead of incrementing the version number of the bootstrap binaries, do
> you think it would be an option to keep 1.22 and build 1.23 from it, or
> does that cargo/rust merge prevent it?

In rust 1.22 there already was possibility to build "cargo" from "rust"
repository, so suggested packages structures change can be used either
for old "rust" releases.

By default rust should be built with
rust and cargo. In most of cases this for "1.X.Y" release it want to use
"1.(X-1).0" version of rustc and "0.X.0" version of cargo. As result to
build release version of Rust compiler we should have previous release
of rust compiler.

Actually there is two ways to achieve this:
1. Constantly update bootsrap binaries version.
2. For each new release create new package. As result we'll be able to
use old rust release to build each new rust release. E.g. we can use
1.21.0 bootstrap binaries, then build 1.22.0 rust and use it to build
1.23.0 rust and then use it to build 1.24.1 rust.

Which way is preferable?

Please do not merge my patch until I'll check Danny's report about
reproducability.

Regards,
Nikola
L
L
Ludovic Courtès wrote on 19 Mar 2018 17:23
(name . Nikolai Merinov)(address . nikolai.merinov@member.fsf.org)
87efkgvxt1.fsf@gnu.org
Hello,

Nikolai Merinov <nikolai.merinov@member.fsf.org> skribis:

Toggle quote (9 lines)
> Actually there is two ways to achieve this:
> 1. Constantly update bootsrap binaries version.
> 2. For each new release create new package. As result we'll be able to
> use old rust release to build each new rust release. E.g. we can use
> 1.21.0 bootstrap binaries, then build 1.22.0 rust and use it to build
> 1.23.0 rust and then use it to build 1.24.1 rust.
>
> Which way is preferable?

Like I wrote, I would prefer option #2, so as to increase “binary
diversity” and not rely on builds made by upstream.

This obviously relates to http://bootstrappable.org/. Ricardo, what’s
your take on this?

Toggle quote (3 lines)
> Please do not merge my patch until I'll check Danny's report about
> reproducability.

Sure!

Thanks,
Ludo’.
R
R
Ricardo Wurmus wrote on 20 Mar 2018 11:56
(name . Ludovic Courtès)(address . ludo@gnu.org)
87o9jjc8xg.fsf@elephly.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (19 lines)
> Hello,
>
> Nikolai Merinov <nikolai.merinov@member.fsf.org> skribis:
>
>> Actually there is two ways to achieve this:
>> 1. Constantly update bootsrap binaries version.
>> 2. For each new release create new package. As result we'll be able to
>> use old rust release to build each new rust release. E.g. we can use
>> 1.21.0 bootstrap binaries, then build 1.22.0 rust and use it to build
>> 1.23.0 rust and then use it to build 1.24.1 rust.
>>
>> Which way is preferable?
>
> Like I wrote, I would prefer option #2, so as to increase “binary
> diversity” and not rely on builds made by upstream.
>
> This obviously relates to <http://bootstrappable.org/>. Ricardo, what’s
> your take on this?

I agree. In the long run, however, I’d prefer for Rust to be
bootstrapped through one of the alternative implementations. Then we
don’t need to keep a long chain of older versions.

Currently, however, I don’t see a way around it.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
N
N
Nikolai Merinov wrote on 21 Mar 2018 20:02
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 30831@debbugs.gnu.org)
87a7v12qw9.fsf@member.fsf.org
Hi Danny,

I checked several times with "guix build --no-grafts --rounds=2 rust@1.24.1"
with "guix gc" between tries, but it worked correctly. I tried on x86-64
architecture with my patch over 79f450a120068ac1d2fc4e5b4b33ae938b604f95
guix commit.

Do you know how I can get same result as in your build?

Regards,
Nikolai

Danny Milosavljevic <dannym@scratchpost.org> writes:

Toggle quote (33 lines)
> Hi,
>
> Rust after this patch is not reproducible.
>
> Binary files
> /gnu/store/nbyxci7zgv9z5zrkzw9c5wppgv3bk1rd-rust-1.24.1/lib/librustc-7b5ea53516e6ab59.so
> and
> /gnu/store/nbyxci7zgv9z5zrkzw9c5wppgv3bk1rd-rust-1.24.1-check/lib/librustc-7b5ea53516e6ab59.so
> differ
> Binary files
> /gnu/store/nbyxci7zgv9z5zrkzw9c5wppgv3bk1rd-rust-1.24.1/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-7b5ea53516e6ab59.so
> and
> /gnu/store/nbyxci7zgv9z5zrkzw9c5wppgv3bk1rd-rust-1.24.1-check/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc-7b5ea53516e6ab59.so
> differ
>
> diffoscope says:
>
> ? ? ? - [26] .rustc PROGBITS 0000000000000000 be3030 6e5dd5 00 0 0 16
> ? ? ? - [27] .symtab SYMTAB 0000000000000000 12c8e08 158340 18 28 54351 8
> ? ? ? - [28] .strtab STRTAB 0000000000000000 1421148 3b00e3 00 0 0 1
> ? ? ? - [29] .shstrtab STRTAB 0000000000000000 17d122b 0000fe 00 0 0 1
> ? ? ? + [26] .rustc PROGBITS 0000000000000000 be3030 6e6b05 00 0 0 16
> ? ? ? + [27] .symtab SYMTAB 0000000000000000 12c9b38 158340 18 28 54351 8
> ? ? ? + [28] .strtab STRTAB 0000000000000000 1421e78 3b00e3 00 0 0 1
> ? ? ? + [29] .shstrtab STRTAB 0000000000000000 17d1f5b 0000fe 00 0 0 1
> ? ? ? Key to Flags:
> [...]
> ? ? ? - 1603: 0000000000000000 0x6e5dd5 OBJECT GLOBAL DEFAULT 26
> rust_metadata_rustc_d87c35d223a98218627136b41e7e5b87
> ? ? ? + 1603: 0000000000000000 0x6e6b05 OBJECT GLOBAL DEFAULT 26
> rust_metadata_rustc_d87c35d223a98218627136b41e7e5b87
>
> And a metadata body part is missing in the second round.
E
E
Efraim Flashner wrote on 22 Mar 2018 08:20
building rust on aarch64
(address . 30831@debbugs.gnu.org)
20180322072012.GD20703@macbook41
I tested the patch on my aarch64 box and with the following patch I was
able to start the building process. Currently rust fails its test stage
with the error:

test result: ok. 193 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out

finished in 267.991
Testing libstd stage1 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
Compiling libc v0.2.34
Compiling core v0.0.0 (file:///tmp/guix-build-rust-1.24.1.drv-0/rustc-1.24.1-src/src/libcore)
Compiling std_unicode v0.0.0 (file:///tmp/guix-build-rust-1.24.1.drv-0/rustc-1.24.1-src/src/libstd_unicode)
Compiling rand v0.3.19
Compiling std v0.0.0 (file:///tmp/guix-build-rust-1.24.1.drv-0/rustc-1.24.1-src/src/libstd)
Compiling alloc v0.0.0 (file:///tmp/guix-build-rust-1.24.1.drv-0/rustc-1.24.1-src/src/liballoc)
error: unused attribute
--> src/libstd/sys/unix/process/process_common.rs:449:5
|
449 | #[ignore]
| ^^^^^^^^^
|
note: lint level defined here
--> src/libstd/lib.rs:232:9
|
232 | #![deny(warnings)]
| ^^^^^^^^
= note: #[deny(unused_attributes)] implied by #[deny(warnings)]

error: aborting due to previous error

error: Could not compile `std`.
warning: build failed, waiting for other jobs to finish...
error: build failed


command did not execute successfully: "/gnu/store/3vvhw5xpbcym5l3xk2pszzzyx4m7k8l6-cargo-bootstrap-0.24.0/bin/cargo" "test" "--target" "aarch64-unknown-linux-gnu" "-j" "6" "--release" "--frozen" "--features" "panic-unwind jemalloc backtrace" "--manifest-p
ath" "/tmp/guix-build-rust-1.24.1.drv-0/rustc-1.24.1-src/src/libstd/Cargo.toml" "-p" "std:0.0.0" "-p" "libc:0.0.0" "-p" "alloc_system:0.0.0" "-p" "panic_abort:0.0.0" "-p" "compiler_builtins:0.0.0" "-p" "alloc:0.0.0" "-p" "std_unicode:0.0.0" "-p" "unwind:0
.0.0" "-p" "core:0.0.0" "--"
expected success, got: exit code: 101


failed to run: /tmp/guix-build-rust-1.24.1.drv-0/rustc-1.24.1-src/build/bootstrap/debug/bootstrap test
Build completed unsuccessfully in 1:53:33
phase `check' failed after 6813.3 seconds


This is ultimately no different from master, where rust currently fails
somewhere during the test stage.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
From d3f6c14535163be65aedfc761b747c4386387537 Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Thu, 22 Mar 2018 09:14:53 +0200
Subject: [PATCH] don't build native on arm*

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

Toggle diff (18 lines)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index ae81ff8e0..5c5a61594 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -259,6 +259,11 @@ rustc-bootstrap and cargo-bootstrap packages.")
;; guix llvm-3.9.1 package installs only shared libraries
(setenv "LLVM_LINK_SHARED" "1")
#t))
+ (add-after 'unpack 'dont-build-native
+ (lambda _
+ (substitute* "src/binaryen/CMakeLists.txt"
+ (("ADD_COMPILE_FLAG\\(\\\"-march=native\\\"\\)") ""))
+ #t))
(add-after 'unpack 'patch-tests
(lambda* (#:key inputs #:allow-other-keys)
(let ((bash (assoc-ref inputs "bash")))
--
2.16.2
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlqzWScACgkQQarn3Mo9
g1ESiQ//fjuOqhdXx9HdL0ArVX8ncOJ8y+7T4Ys9tGGKXg7U1DRUz+BKTyCse/jT
8uKiiACU3TZXroqYhSDSK9ZmOh3xggEURaRJotDrRpv/eeAIMxPP9wau1X5rPZrp
mPCdS6eKiWgabzhYIQS36/Yr8bpK7PIWIojelmT3wlQuT5n69j67bmpTJ+OeUFNl
KK17wulHmCgqLvItG9XsoeBkf+2ApoEqnJM1q/jVaiLMZZ1MkJAcdNT9Qjs5MmnE
Mtf3WAM9l7sNghgdkATsIpcVXzTPrkrzcjAOoSfBWV1px2LHMJ9lfBMldpz2ks6q
ShrPLtESLtBWjjp/FFNZYbCzji/p29myc5l+U5xHEkvxrFQrCiPEsvFjTrXDKp+u
MdJWojjlRTlaApJaxjkATNnqphAXKOCqsSV9hv181sH6b2+RBWG6xjmADDQhnzvG
awejmzkO0Fr7f23ewwOejE4w0bCLa/USyPbVutSniRA8GoRevrbNVF5RgPD92SYh
76+f34y+K4rWIxnOm8tGDWR+28xRgkRteRV1qGoHBYw6pZfbPNo3kn3OaLN5ZY7n
Y6eRXzCq1BQSAqfG2xRp0WLJePltdDPSBVPZdmBGdQqZs9M/01BiL8a5xXBqrUyC
3Js63/JQtgETqZ7sIPiTdEFkm6vddEXKQQKJ/qNU74H0kCPrmUc=
=GVvj
-----END PGP SIGNATURE-----


N
N
Nikolai Merinov wrote on 22 Mar 2018 22:01
Re: [bug#30831] [PATCH] gnu: rust: Update rust from 1.22.1 release to 1.24.1
(name . Ricardo Wurmus)(address . rekado@elephly.net)
87y3ij25bf.fsf@member.fsf.org
Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (27 lines)
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hello,
>>
>> Nikolai Merinov <nikolai.merinov@member.fsf.org> skribis:
>>
>>> Actually there is two ways to achieve this:
>>> 1. Constantly update bootsrap binaries version.
>>> 2. For each new release create new package. As result we'll be able to
>>> use old rust release to build each new rust release. E.g. we can use
>>> 1.21.0 bootstrap binaries, then build 1.22.0 rust and use it to build
>>> 1.23.0 rust and then use it to build 1.24.1 rust.
>>>
>>> Which way is preferable?
>>
>> Like I wrote, I would prefer option #2, so as to increase “binary
>> diversity” and not rely on builds made by upstream.
>>
>> This obviously relates to <http://bootstrappable.org/>. Ricardo, what’s
>> your take on this?
>
> I agree. In the long run, however, I’d prefer for Rust to be
> bootstrapped through one of the alternative implementations. Then we
> don’t need to keep a long chain of older versions.
>
> Currently, however, I don’t see a way around it.

Hi, I prepared proof-of-concept solution with rust-bootstrap frozed on
1.22.1 release. Do you think suggested code with "split all code to
small steps and remove fixed issues in new releases" is correct way to
provide series of releases? Or it will be better to copy builder code to
state it directly that this specific modification is tested on each rust
release?

Regards,
Nikolai
D
D
Danny Milosavljevic wrote on 24 Mar 2018 17:26
(name . Nikolai Merinov)(address . nikolai.merinov@member.fsf.org)(address . 30831@debbugs.gnu.org)
20180324172601.070cb69d@scratchpost.org
Hi Nikolai,

On Thu, 22 Mar 2018 00:02:46 +0500
Nikolai Merinov <nikolai.merinov@member.fsf.org> wrote:

Toggle quote (5 lines)
> I checked several times with "guix build --no-grafts --rounds=2 rust@1.24.1"
> with "guix gc" between tries, but it worked correctly. I tried on x86-64
> architecture with my patch over 79f450a120068ac1d2fc4e5b4b33ae938b604f95
> guix commit.

Weird, works fine for me with 79f450a120068ac1d2fc4e5b4b33ae938b604f95.

But with the current master, 2cac8891510533338f6214fbd5ab9c2f6204e856, it fails
as describes (I tried again, fails).
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlq2fBkACgkQ5xo1VCww
uqVHGAgAl2a+9fhs95eFq0roFTmYj7RUXC9e7wx+azAWBym6XdjwuEmCCtfib2fy
JjgaA+iKRQwy+a05xuyXieDd6Yyf/Tg1JLpB3PiP9eFPJtkw1dikYIb8Ai02mqpR
ci3P3dh3eK43vdMq+Bo/DW7o+BLg/yfLLmGxedyaf0ztVZj5OWTCAuAQ6w1dil1U
CCTeT1JbfdpLIlW77bkwxb1KbA+XwVvoNFcGTgdX2A5TYfWhBR1Bfbj8K/uX33jI
3WLCdxmEuFheOzeg6Wsj+9Uc006vP72tTie9h6LV3IR4QE/FJlHiBaCSLy9CsP2z
3MVpfEC+Tw6wBraZTjkmEbutQCTwcQ==
=RhPG
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 27 Mar 2018 09:41
(name . Nikolai Merinov)(address . nikolai.merinov@member.fsf.org)
87in9iynhq.fsf@gnu.org
Hello Nikolai,

Nikolai Merinov <nikolai.merinov@member.fsf.org> skribis:

Toggle quote (32 lines)
> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>> Hello,
>>>
>>> Nikolai Merinov <nikolai.merinov@member.fsf.org> skribis:
>>>
>>>> Actually there is two ways to achieve this:
>>>> 1. Constantly update bootsrap binaries version.
>>>> 2. For each new release create new package. As result we'll be able to
>>>> use old rust release to build each new rust release. E.g. we can use
>>>> 1.21.0 bootstrap binaries, then build 1.22.0 rust and use it to build
>>>> 1.23.0 rust and then use it to build 1.24.1 rust.
>>>>
>>>> Which way is preferable?
>>>
>>> Like I wrote, I would prefer option #2, so as to increase “binary
>>> diversity” and not rely on builds made by upstream.
>>>
>>> This obviously relates to <http://bootstrappable.org/>. Ricardo, what’s
>>> your take on this?
>>
>> I agree. In the long run, however, I’d prefer for Rust to be
>> bootstrapped through one of the alternative implementations. Then we
>> don’t need to keep a long chain of older versions.
>>
>> Currently, however, I don’t see a way around it.
>
> Hi, I prepared proof-of-concept solution with rust-bootstrap frozed on
> 1.22.1 release.

Would it be an option to stick to 1.21? Or is it already too difficult?
(Apologies if this was already answered previously.) I’m asking because
I wonder how big the temptation will be to upgrade ‘rust-bootstrap’
again next time.

Toggle quote (6 lines)
> Do you think suggested code with "split all code to small steps and
> remove fixed issues in new releases" is correct way to provide series
> of releases? Or it will be better to copy builder code to state it
> directly that this specific modification is tested on each rust
> release?

I’m not sure what you mean.

Danny, you probably have more experience than I do with Rust. :-)
Thoughts?

Thanks,
Ludo’.
N
N
Nikolai Merinov wrote on 27 Mar 2018 14:56
(name . Ludovic Courtès)(address . ludo@gnu.org)
87zi2the25.fsf@member.fsf.org
Hi Ludovic,

In attachement you can find updated patch with rust-bootstrap 1.22.1 and
rust packages of 1.23.0 and 1.24.1 releases. I made small changes like
replacement (zero? (system* ...)) with (invoke ...) and checked
reproducability.

Please find my comments below.

Regards,
Nikolai

ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (42 lines)
> Hello Nikolai,
>
> Nikolai Merinov <nikolai.merinov@member.fsf.org> skribis:
>
>> Ricardo Wurmus <rekado@elephly.net> writes:
>>
>>> Ludovic Courtès <ludo@gnu.org> writes:
>>>
>>>> Hello,
>>>>
>>>> Nikolai Merinov <nikolai.merinov@member.fsf.org> skribis:
>>>>
>>>>> Actually there is two ways to achieve this:
>>>>> 1. Constantly update bootsrap binaries version.
>>>>> 2. For each new release create new package. As result we'll be able to
>>>>> use old rust release to build each new rust release. E.g. we can use
>>>>> 1.21.0 bootstrap binaries, then build 1.22.0 rust and use it to build
>>>>> 1.23.0 rust and then use it to build 1.24.1 rust.
>>>>>
>>>>> Which way is preferable?
>>>>
>>>> Like I wrote, I would prefer option #2, so as to increase “binary
>>>> diversity” and not rely on builds made by upstream.
>>>>
>>>> This obviously relates to <http://bootstrappable.org/>. Ricardo, what’s
>>>> your take on this?
>>>
>>> I agree. In the long run, however, I’d prefer for Rust to be
>>> bootstrapped through one of the alternative implementations. Then we
>>> don’t need to keep a long chain of older versions.
>>>
>>> Currently, however, I don’t see a way around it.
>>
>> Hi, I prepared proof-of-concept solution with rust-bootstrap frozed on
>> 1.22.1 release.
>
> Would it be an option to stick to 1.21? Or is it already too difficult?
> (Apologies if this was already answered previously.) I’m asking because
> I wonder how big the temptation will be to upgrade ‘rust-bootstrap’
> again next time.
>

It should be easy enough to stick with 1.21 bootstrap (still we already
have package for 1.22), but:
1. We still should change code for bootstrap package to match design
where "rustc" and "cargo" installed from one package.
2. Rust 1.23 and 1.24 can use same "config.toml", while rust 1.22 have
different "config.toml". I do not know how to make it to look pretty in
first time. For additional information look below about package code
design.
3. My machine is pretty slow and testing reproducablity for three
versions in a row will take two days :-)


Toggle quote (8 lines)
>> Do you think suggested code with "split all code to small steps and
>> remove fixed issues in new releases" is correct way to provide series
>> of releases? Or it will be better to copy builder code to state it
>> directly that this specific modification is tested on each rust
>> release?
>
> I’m not sure what you mean.

I talking about how to write code for packages. e.g. if we have:

(package
(name "rust")
(version "1.23.0")
...
(arguments
...
#:phases (modify-phases %standard-phases
...
(add-after ... 'disable-test-1)
(add-after ... 'disable-test-2)
(add-after ... 'fix-source-bug-1)
(add-after ... 'fix-source-bug-2)
(add-after ... 'fix-source-bug-3)
(replace 'configure ...)
(replace 'check ...)
...)))

Then how should look package for 1.24 release?

It can be inherited from previous one and replace some of old steps

(let ((base-rust rust-1.23))
(package
(inherit base-rust)
(version "1.24.1")
...
(native-inputs
(alist-replace "cargo-bootstrap" (list base-rust "cargo")
(alist-replace "rustc-bootstrap" (list base-rust)
(package-native-inputs base-rust))))
(arguments (substitute-keyword-arguments (package-arguments base-rust)
((#:phases phases)
`(modify-phases ,phases
(delete 'fix-source-bug-1)
(add-after ... 'disable-test-3)
(replace 'fix-source-bug-2
(lambda* ....))))))))

Or we should copy all steps required for each new release:

(package
(name "rust")
(version "1.24.0")
...
(arguments
...
#:phases (modify-phases %standard-phases
...
(add-after ... 'disable-test-1)
(add-after ... 'disable-test-2)
(add-after ... 'disable-test-3)
(add-after ... 'fix-source-bug-1)
(add-after ... 'fix-source-bug-3)
(replace 'configure ...)
(replace 'check ...)
...)))

Second solution looks too verbose for me, but with first solution on
long chain of versions it will be very hard to manage which changes we
have in newest package.

Toggle quote (6 lines)
>
> Danny, you probably have more experience than I do with Rust. :-)
> Thoughts?
>
> Thanks,
> Ludo’.
N
N
Nikolai Merinov wrote on 27 Mar 2018 15:02
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 30831@debbugs.gnu.org)
87vadhhdrx.fsf@member.fsf.org
Hi Danny,

I checked last version of my patch over
d591989b42088a358f33d6cf68f12efc2ad4403c (master as on March 24) and
looks that build is reproducable. It will be helpful if you'll be able
to check this patch also:

Regards,
Nikolai

Danny Milosavljevic <dannym@scratchpost.org> writes:

Toggle quote (14 lines)
> Hi Nikolai,
>
> On Thu, 22 Mar 2018 00:02:46 +0500
> Nikolai Merinov <nikolai.merinov@member.fsf.org> wrote:
>
>> I checked several times with "guix build --no-grafts --rounds=2 rust@1.24.1"
>> with "guix gc" between tries, but it worked correctly. I tried on x86-64
>> architecture with my patch over 79f450a120068ac1d2fc4e5b4b33ae938b604f95
>> guix commit.
>
> Weird, works fine for me with 79f450a120068ac1d2fc4e5b4b33ae938b604f95.
>
> But with the current master, 2cac8891510533338f6214fbd5ab9c2f6204e856, it fails
> as describes (I tried again, fails).
D
D
Danny Milosavljevic wrote on 27 Mar 2018 15:09
(name . Ludovic Courtès)(address . ludo@gnu.org)
20180327150951.27a56cef@scratchpost.org
Toggle quote (5 lines)
> Would it be an option to stick to 1.21? Or is it already too difficult?
> (Apologies if this was already answered previously.) I’m asking because
> I wonder how big the temptation will be to upgrade ‘rust-bootstrap’
> again next time.

Note: I hope that mrust (A Rust compiler written in C++) is released soon
so we won't have these bootstrap binaries any longer.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlq6Qp8ACgkQ5xo1VCww
uqW+fQf/YIUVpPDckNglp00777L8FaY4UQ/qQAoR6DJUr9SOkLzMl828h2t6JX+M
w9IKf3PbttS8KNjf3QqczTeN0E3a1ldWCBu6ZDhSbZpxlkYlnzfmYqztiUV4rX0X
MFSl/8upmGHdX7lnH06hxUTd+qglZd+MdNCrax8nXnggVru8HuPbaiy85o3LvD3e
sA/KlJTZW8/gGxQkWz5D1odlP+CP5a23JfjRiJQXuvje/zpTJYF+v99w+zfOuTLr
9s/E6IAg1a+/AyVrGycbdFE++gjUc9Zbf4hHrYs5veaNp2t3w60N1De62/Nhv9R9
jS5+bBB+pZF7JlLoL3d2l5aDs5g0cg==
=Tn8B
-----END PGP SIGNATURE-----


D
D
Danny Milosavljevic wrote on 27 Mar 2018 15:19
(name . Nikolai Merinov)(address . nikolai.merinov@member.fsf.org)
20180327151942.1458e82c@scratchpost.org
Hi Nikolai,

I think the incremental (first) version is the best one since you can see
which bugs are worked around by us and which are fixed per release at a glance.

But really it doesn't matter much which.

Toggle quote (4 lines)
> Second solution looks too verbose for me, but with first solution on
> long chain of versions it will be very hard to manage which changes we
> have in newest package.

I hope we won't have a long chain of cumulative Rust versions in Guix. I know
that Rust upstream likes to do this chain of Rust1 -> Rust2 -> Rust3 -> Rust4
but that's not really scalable - especially since even one Rust takes a day
to compile. We should try to get mrust [1] to work and use it to compile just
the newest Rust. If it doesn't work we can still fall back to one of the
other ways later.

(What Mozilla recommends is we compile Rust1, use Rust2 to compile Rust3, use
Rust3 to compile Rust4, likewise for each new release)

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlq6RO4ACgkQ5xo1VCww
uqVCfAf9FqgJxnJQF6QOHw85G7kwDVFXnMhg1CiUgYRe1O5PNcMjCt649kBsuqM0
cV77yVX1TLd2I77PAAxMWpLGtddQQuRZBsmatGitECqExX0kMIdMJWHClGWIhq6P
wIuCZISh/Vm4U+HG3hGvE0/9ovTh5B40cQwG+2pAS4Gpu++PqqA0V+YxwOAcWoJe
O0il4nM/cv8ufipbkp11orWQGHZkkxAIDdgHKo/RR/SIsG5h7DrdM8Fdym5/vocJ
jL5h0/5mpbhXY3Nb7xxJnMoUo6J6h5JzYQeIPE6mkkgNrk3aWwzGMeEj5vczHzqA
vmsAkez/1hY0RTKVESPqJSNVFOmrqw==
=irAV
-----END PGP SIGNATURE-----


M
M
Marius Bakke wrote on 27 Mar 2018 20:08
87h8p1gzni.fsf@fastmail.com
Danny Milosavljevic <dannym@scratchpost.org> writes:

Toggle quote (21 lines)
> Hi Nikolai,
>
> I think the incremental (first) version is the best one since you can see
> which bugs are worked around by us and which are fixed per release at a glance.
>
> But really it doesn't matter much which.
>
>> Second solution looks too verbose for me, but with first solution on
>> long chain of versions it will be very hard to manage which changes we
>> have in newest package.
>
> I hope we won't have a long chain of cumulative Rust versions in Guix. I know
> that Rust upstream likes to do this chain of Rust1 -> Rust2 -> Rust3 -> Rust4
> but that's not really scalable - especially since even one Rust takes a day
> to compile. We should try to get mrust [1] to work and use it to compile just
> the newest Rust. If it doesn't work we can still fall back to one of the
> other ways later.
>
> (What Mozilla recommends is we compile Rust1, use Rust2 to compile Rust3, use
> Rust3 to compile Rust4, likewise for each new release)

I think we should heed upstreams advice in that case. A long bootstrap
chain is really only a problem during 'core-updates', no?

IIUC mrustc only targets x86_64 currently, so I don't expect it to
become viable for Guix in a good while.

Toggle quote (1 lines)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlq6iIEACgkQoqBt8qM6
VPoutggAsBdPlVz5Dhu03PmZapdPp/qjLP7WAn2pf96OgcKJrxCZC+u605mNjM6j
aIO2sp/nY5rtlmcHxCrYuLyDNVdRg4zlrmbOedsnMX+IGLfTSzG5oNhAR9o2xVhc
3HSekMrbrzF0X9LRQelwz/2AnEQuITzn7zb1xqEZLaa/RksyovEBiGvz64yoRn+p
Fwf8maAf5Ukcbo98RcfDhY/6rB3Qbxar2DISSwcTIiEfT9RNlbR6Sq13bi09li3N
SQIB5IWkUI382+Q4SLa2UauvhxOfIMKOSHBcLjg6FMeL8el2+X5vihPwODyf9uEV
2KEGHGFHBsrbTFo2YBF4CtVvr88C5A==
=YLqZ
-----END PGP SIGNATURE-----

R
R
Ricardo Wurmus wrote on 27 Mar 2018 21:56
(name . Marius Bakke)(address . mbakke@fastmail.com)
87k1txfg2r.fsf@elephly.net
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (6 lines)
>> (What Mozilla recommends is we compile Rust1, use Rust2 to compile Rust3, use
>> Rust3 to compile Rust4, likewise for each new release)
>
> I think we should heed upstreams advice in that case. A long bootstrap
> chain is really only a problem during 'core-updates', no?

It’s a problem for people building from source and it makes for a
brittle bootstrap because any of the packages could break. Having a
long bootstrap chain to debug on core-updates is no fun — I’m saying
this as someone who has just fixed problems in the relatively simple
bootstrap chain for Java.

Toggle quote (3 lines)
> IIUC mrustc only targets x86_64 currently, so I don't expect it to
> become viable for Guix in a good while.

This is a problem, but I do hope that eventually we will be able to use
mrust to bypass an ever-growing chain.

--
Ricardo
D
D
Danny Milosavljevic wrote on 30 Mar 2018 15:48
(name . Nikolai Merinov)(address . nikolai.merinov@member.fsf.org)(address . 30831-done@debbugs.gnu.org)
20180330154811.491eea49@scratchpost.org
Hi Nikolai,

On Tue, 27 Mar 2018 18:02:58 +0500
Nikolai Merinov <nikolai.merinov@member.fsf.org> wrote:

Toggle quote (6 lines)
> I checked last version of my patch over
> d591989b42088a358f33d6cf68f12efc2ad4403c (master as on March 24) and
> looks that build is reproducable. It will be helpful if you'll be able
> to check this patch also:
> https://debbugs.gnu.org/cgi/bugreport.cgi?att=1;msg=38;bug=30831;filename=0001-gnu-rust-Update-rust-to-1.24.1-froze-bootstrap-on-1..patch

I did now - it works for me and is reproducible.

I've thus fixed up the commit message a little and pushed this patch to master.

Thanks!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlq+QBsACgkQ5xo1VCww
uqU94Qf+LbsgT3GxOJhVbPuJkeMEQ8TrgSoLA/ID0SIw/0clpAY952oWfH+o1m00
ZXki+FUkOtuA++hHheLJ6z/RMHXCZ/QDT5XLikfPfzenu918U6uCpAHUYx00pYN5
mvRu+wvkC43YAss/d7UlZxKSaCDaqH1oJQjCFkiXvVo0mP3USf/U9PI3smiwStsH
kx9uGDeC3x9rkYEHvtuJCXophiAWcRKXtR9JZPU1qU/cCreIsKz6OnHIqH9D2s9+
qCiOBy52v2hc/5H/f53IB7+BKUuHba3meaEcEkIJywU2m//UH2kE2mTl4GG4VzBh
phmQ4ndKkyQcM1V2EqHD6BW5iwejSA==
=JH+D
-----END PGP SIGNATURE-----


Closed
D
D
Danny Milosavljevic wrote on 31 Mar 2018 01:51
(name . Marius Bakke)(address . mbakke@fastmail.com)
20180331015101.1a5b113b@scratchpost.org
Hi Marius,

On Tue, 27 Mar 2018 20:08:01 +0200
Marius Bakke <mbakke@fastmail.com> wrote:

Toggle quote (3 lines)
> IIUC mrustc only targets x86_64 currently, so I don't expect it to
> become viable for Guix in a good while.

I've checked the source code and it seems there's support for ARM in the works.


I've commented there - let's see.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlq+zWUACgkQ5xo1VCww
uqW3Wgf9EKPYfbyWjH2zwpzJvD5YgiryuiWkXsr9DPvVFyVPNb7cg3gqEVZ+KcVv
n1I/zn3tZYpqnfJpi7L1TA5WOzsu6PQWo4w+LAteYNDCxUlrQeKCs2rtyiXGCy7J
V6bMY5tpjXuhSB9ITQxIbbQWWQ6Pl9pmCj81CyVbffKw3/uVRjxMLPbOPnbezwrM
F7K6z/FCBt7zk/Uf3pis1fzbV17Gdntqk4g6G1qxG9gDmLKMzI4x3VEp2Wwd9/be
W+rud+1SxKZndTlG5yAd9qYInq+gJ394JgHZJMvtVOc+gpiaLbTf1V+PYJrkFSky
KU3qzVlYZ1mQjrUevfs60L27ESW6Vg==
=uWGw
-----END PGP SIGNATURE-----


D
D
Danny Milosavljevic wrote on 10 Feb 2019 22:13
(no subject)
(address . control@debbugs.gnu.org)
20190210221349.526d9aff@scratchpost.org
close 30831
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlxglA0ACgkQ5xo1VCww
uqW5GAgAkwMs2i9y4QegQfbvlTrjwNoHDDWJVrKPiltOc7lnX6UtGyDbzkPDWJ8s
jyMOkL6325+zwnQPncLhzXxnyIc3npYI77x4GNw/f5busogAXkZdlx1ptuPe2EPM
E1/UTQ1nX2qQDlGssMewvv6Dj0JmFZofKV+4XkddZ4fN4ACKA/T0z1FAqqnwIU3n
LdVgsbfUpXa6Uktao9tsBI6XrzGKHOGn2bfi3odtSr7s5ndCkkaaVRRY2xxv4cdE
UxHgvBCPEFK3rEZiKts4o8kOllc2Y4SOMuKbbNB5x9AP9tB/oI47/C7yIHzVQhjm
aZeJhKd5t9IX2IQDa2A8LFOw787OMA==
=yfv8
-----END PGP SIGNATURE-----


?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 30831
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