GNU bug report logs - #32227
[PATCH] gnu: rust: make rust 1.25.0 build reproducible

Previous Next

Package: guix-patches;

Reported by: Nikolai Merinov <nikolai.merinov <at> member.fsf.org>

Date: Fri, 20 Jul 2018 20:10:01 UTC

Severity: normal

Tags: patch, wontfix

Done: Jakub Kądziołka <kuba <at> kadziolka.net>

Bug is archived. No further changes may be made.

Full log


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

From: Nikolai Merinov <nikolai.merinov <at> member.fsf.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: rust: make rust 1.25.0 build reproducible
Date: Sat, 14 Jul 2018 01:15:11 +0500
* gnu/packages/rust.scm (rust-1.25): switch back to llvm <at> 3.9 still builds with
llvm <at> 6.0 is not reproducible. Remove all llvm <at> 6.0 related twicks.
(rust-1.26): switch to llvm <at> 6.0 still rust-1.26 can build reproducible
binaries with new llvm release. Enable llvm <at> 5.0 related twicks.
---
 gnu/packages/rust.scm | 39 ++++++++++++++++++---------------------
 1 file changed, 18 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 28bffb44b..1095070eb 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -545,10 +545,6 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                                     "0baxjr99311lvwdq0s38bipbnj72pn6fgbk6lcq7j555xq53mxpf")))
     (package
       (inherit base-rust)
-      (inputs
-       ;; Use LLVM 6.0
-       (alist-replace "llvm" (list llvm)
-                      (package-inputs base-rust)))
       (arguments
        (substitute-keyword-arguments (package-arguments base-rust)
          ((#:phases phases)
@@ -559,23 +555,6 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                    ;; This test wants to update the crate index.
                    (("fn no_index_update") "#[ignore]\nfn no_index_update"))
                  #t))
-             (add-after 'configure 'enable-codegen-tests
-               (lambda _
-                 (substitute* "config.toml"
-                   (("codegen-tests = false") ""))
-                 #t))
-             (replace 'patch-aarch64-test
-               (lambda _
-                 (substitute* "src/librustc_metadata/dynamic_lib.rs"
-                   ;; This test is known to fail on aarch64 and powerpc64le:
-                   ;; https://github.com/rust-lang/rust/issues/45410
-                   (("fn test_loading_cosine") "#[ignore]\nfn test_loading_cosine"))
-                 ;; This test fails on aarch64 with llvm <at> 6.0:
-                 ;; https://github.com/rust-lang/rust/issues/49807
-                 ;; other possible solution:
-                 ;; https://github.com/rust-lang/rust/pull/47688
-                 (delete-file "src/test/debuginfo/by-value-self-argument-in-trait-impl.rs")
-                 #t))
              (delete 'ignore-glibc-2.27-incompatible-test))))))))
 
 (define-public rust-1.26
@@ -585,6 +564,10 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                                     #:patches '("rust-coresimd-doctest.patch"))))
     (package
       (inherit base-rust)
+      (inputs
+       ;; Use LLVM 6.0
+       (alist-replace "llvm" (list llvm)
+                      (package-inputs base-rust)))
       (arguments
        (substitute-keyword-arguments (package-arguments base-rust)
          ((#:phases phases)
@@ -624,6 +607,20 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                  (substitute* "src/tools/cargo/tests/testsuite/generate_lockfile.rs"
                    ;; This test wants to update the crate index.
                    (("fn no_index_update") "#[ignore]\nfn no_index_update"))
+                 #t))
+             (add-after 'patch-aarch64-test 'patch-aarch64-llvm6-test
+               (lambda _
+                 ;; This test fails on aarch64 with llvm <at> 6.0:
+                 ;; https://github.com/rust-lang/rust/issues/49807
+                 ;; other possible solution:
+                 ;; https://github.com/rust-lang/rust/pull/47688
+                 (delete-file "src/test/debuginfo/by-value-self-argument-in-trait-impl.rs")
+                 #t))
+             (add-after 'configure 'enable-codegen-tests
+               (lambda* _
+                 (substitute* "config.toml"
+                   ;; codegen test should pass with LLVM 6
+                   (("codegen-tests = false") ""))
                  #t)))))))))
 
 (define-public rust
-- 
2.17.1





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

Previous Next


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