From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikolai Merinov Subject: Reproducible rust builds Date: Sat, 13 Oct 2018 02:16:32 +0500 Message-ID: <87h8hqvpan.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gB4na-0008N5-0H for guix-devel@gnu.org; Fri, 12 Oct 2018 17:16:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gB4nV-0001Ya-4G for guix-devel@gnu.org; Fri, 12 Oct 2018 17:16:42 -0400 Received: from mail-lj1-f171.google.com ([209.85.208.171]:33405) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gB4nU-0001Xb-Qz for guix-devel@gnu.org; Fri, 12 Oct 2018 17:16:37 -0400 Received: by mail-lj1-f171.google.com with SMTP id z21-v6so12532329ljz.0 for ; Fri, 12 Oct 2018 14:16:36 -0700 (PDT) Received: from libremnd ([2a02:2698:1825:4d78:802c:2b3b:b7d4:22c5]) by smtp.gmail.com with ESMTPSA id y3-v6sm465938ljy.95.2018.10.12.14.16.33 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Oct 2018 14:16:34 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Hi, I made some investigations about reproducible builds of rust packages (at least of my laptop with x86_64 arch) and I got next results: 1. I failed to make rust 1.25.0 reproducible with LLVM 6.0.1, but this release reproducible if we build it with LLVM 3.9.1. I also tried to build rust 1.25.0 with internal LLVM and got same reproducibility issue. 2. Rust 1.26.2 reproducible with LLVM 6.0.1 regardless of which LLVM used for rust 1.25.0. I failed to find any specific changes that allow this version to be built in reproducible manner with LLVM 6.0.1. 3. There is a same situation with 1.27.2 as with rust 1.25.0: Reproducible with LLVM 3.9.1, not reproducible with LLVM 6.0.1. Build with LLVM 3.9.1 step on reproducibility issue in rustdoc, but there is patch for this issue. 4. Rust 1.28.0 and 1.29.1 releases builds well with LLVM 6.0.1 5. From very first release we missed cargo dependency on libssh2 and libgit2 and this dependencies was build internally by rust. Code of reproducible packages for 1.25.0, 1.27.2, 1.28.0, and 1.29.1 rust releases you can find in https://github.com/mnd/guix-mnd-pkgs/blob/master/mnd/packages/rust.scm Can you recommend preferable changes for rust packages in GuixSD? I suggest to make next changes: 1. Switch back to llvm 3.9.1 in rust 1.25.0, 1.26.2, 1.27.2 rust packages. NOTE: External LLVM 6.0 in rust 1.26.0 and newer allow to use #[cfg(target-feature)] to check processor features. Prior to 1.26.0 release this feature was supported only with bundled llvm. 2. Use llvm 6.0.1 for rust 1.28.0 and newer. 3. Add external libssh2 and libgit2 dependencies to rust packages. Open question: To which release should I add dependency on libgit2 and libssh2? It can be added to rust-1.19 still it was missed from very beginning or to rust-1.25, because we should change rust-1.25 package in any case. Regards, Nikolai