From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 23 17:38:38 2018 Received: (at 32227) by debbugs.gnu.org; 23 Sep 2018 21:38:38 +0000 Received: from localhost ([127.0.0.1]:51174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4C5J-0000UT-Rz for submit@debbugs.gnu.org; Sun, 23 Sep 2018 17:38:38 -0400 Received: from mail-lj1-f175.google.com ([209.85.208.175]:40783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4C5H-0000UF-Nw for 32227@debbugs.gnu.org; Sun, 23 Sep 2018 17:38:32 -0400 Received: by mail-lj1-f175.google.com with SMTP id j19-v6so16489955ljc.7 for <32227@debbugs.gnu.org>; Sun, 23 Sep 2018 14:38:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=BvAKIN4+yQn1eBgt8i5ypNDzoRV1KQ/kvHyp+hWQtm8=; b=pf83Ix37LH6gOVfwJ+jl6d7V5bGZbPDXz092WfxnRQVjMnWWEFxArXLvTlpl15r8NS SMjwHyB6sOZKCXB5zUmUZB25ckA50mCVPATBs3tW3AirkdE3aIbvWi9wSLWCXFv+UStM eZYhxGNGzRLanZJ2/z+kskFvykQfrbV0vDkgS2aMdIujlcOvomRi29mV35qnw79nKzfl IbFKBtTKx9j1UvViiTUo48+KAzRuALO49inkqccpm4Jikjtpr2pJVMhegeFJWZcBvr1X QhGpMjw7LYa/+Fpqa6TLQ22crhfAoFJo+lmtyijBQMo6Kl5GVTE4DaBfHlN9HwhSzk1q 5cQw== X-Gm-Message-State: ABuFfogLhoBdUXwCZxaCIVxI4x62nK8QeyWjnIHP9IRegXQ5k+nX2Ida wGYIGurRnu2md8Xa0+W3Bg09CJyD X-Google-Smtp-Source: ANB0VdYCxOeX7oD+/OFk99BEB9H099hRpcRdoKbVDPIqlHGyPCFtoIEzHZOM+xfpmijTiElqcgbOnA== X-Received: by 2002:a2e:7809:: with SMTP id t9-v6mr5100559ljc.120.1537738705734; Sun, 23 Sep 2018 14:38:25 -0700 (PDT) Received: from libremnd ([2a02:2698:1822:a603:d01:a986:c036:3700]) by smtp.gmail.com with ESMTPSA id 33-v6sm256721lfu.64.2018.09.23.14.38.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Sep 2018 14:38:24 -0700 (PDT) From: Nikolai Merinov To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [bug#32227] [PATCH] gnu: rust: make rust 1.25.0 build reproducible References: <87a7qlk6tx.fsf@member.fsf.org> <876019k698.fsf_-_@member.fsf.org> <877eln61cv.fsf@member.fsf.org> <87efermn81.fsf@gnu.org> Date: Mon, 24 Sep 2018 02:38:22 +0500 In-Reply-To: <87efermn81.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 21 Aug 2018 23:19:42 +0200") Message-ID: <8736tzlws1.fsf@member.fsf.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 32227 Cc: 32227@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --=-=-= Content-Type: text/plain Hello Ludo, Sorry for long answer. I have no chance to continue ivestigation last month, but I'll want to provide my old finding: 1. Rust 1.25 build cargo binary (but not rustc itself) in non-reproducible manner when compiled with llvm-6.0 and llvm-6.1. In both cases we got non-reproducible code for next functions: "::log", "git2::panic::check", "curl::easy::handler::ssl_ctx_cb". 2. Rust 1.26 with llvm-6.0 build is reproducible regardless of which rustc 1.25 (with llvm-6.0 or llvm-3.9) was used to bootstrap it. 3. Rust 1.27.0 and Rust 1.27.2 again build rustc itself in reproducible manner, while "cargo" binary differ build to build. I observed non-reproducible code in "git2::panic::check" function and in ".gcc_except_table" section of resulting binary. In attachements you can find patch to move rust-1.25 to llvm-3.9, and patch to update Rust 1.27 to 1.27.2. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-rust-make-rust-1.25.0-build-reproducible.patch Content-Description: enable llvm-6.0 in rust 1.26 instead of 1.25 From: Nikolai Merinov To: guix-patches@gnu.org Subject: [PATCH] gnu: rust: make rust 1.25.0 build reproducible * gnu/packages/rust.scm (rust-1.25): switch back to llvm@3.9 still builds with llvm@6.0 is not reproducible. Remove all llvm@6.0 related twicks. (rust-1.26): switch to llvm@6.0 still rust-1.26 can build reproducible binaries with new llvm release. Enable llvm@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@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@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 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-Update-rust-1.27-to-1.27.2.patch Content-Description: Update rust 1.27 to 1.27.2 diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 0695f8c7d..4bc8d1d88 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -631,8 +631,8 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" (define-public rust (let ((base-rust - (rust-bootstrapped-package rust-1.26 "1.27.0" - "089d7rhw55zpvnw71dj8vil6qrylvl4xjr4m8bywjj83d4zq1f9c" + (rust-bootstrapped-package rust-1.26 "1.27.2" + "0pg1s37bhx9zqbynxyydq5j6q7kij9vxkcv8maz0m25prm88r0cs" #:patches '("rust-coresimd-doctest.patch" "rust-bootstrap-stage0-test.patch")))) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Regards, Nikolai ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hello Nikolai, > > Nikolai Merinov skribis: > >> Please, do not merge. Change rejected. With this change 1.27.0 build >> still not reproducible. I should try to figure out which llvm >> compilation options make builds non-reproducible. > > Does the problem still apply to 1.27.0 as currently available in master? > > Thanks, > Ludo=E2=80=99. --=-=-=--