unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Joe Hillenbrand <joehillen@gmail.com>
To: nikolai.merinov@member.fsf.org
Cc: guix-devel@gnu.org
Subject: Re: Reproducible rust builds
Date: Mon, 15 Oct 2018 13:21:22 -0700	[thread overview]
Message-ID: <CANJQ5C7cASLm0SkXkpJrfwOYjyzh4wUFYutQ+xSYQTLwmmXWCA@mail.gmail.com> (raw)
In-Reply-To: <87h8hqvpan.fsf@member.fsf.org>

[-- Attachment #1: Type: text/plain, Size: 1267 bytes --]

Hi Nikolai,

I've been trying to make rust reproducible as well.

I starting with version 1.19, but I think you're right to just skip
anything older than 1.25 as it looks like a bunch of reproducibility fixes were
added to cargo and rust around 1.22.

What kind of differences are you getting from between the builds?
For me, it has been liblibc. I've attached the output of the following command:

$ diffoscope --exclude-directory-metadata
/gnu/store/hv2wb30jgzhhgfvlhrfpk3qcwr38igg4-rust-1.22.1
/gnu/store/hv2wb30jgzhhgfvlhrfpk3qcwr38igg4-rust-1.22.1-check --html
diffoscope-rust.html

On Fri, Oct 12, 2018 at 3:44 PM Nikolai Merinov
<nikolai.merinov@member.fsf.org> wrote:
> 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.

How sure are you that 1.26.2 is reproducible? I noticed that sometimes it will
work after 2 rounds and sometimes it won't.

I've pulled your repo and started a build with 4 rounds just to check.
It will probably take a couple of days.

You might also try adding the attached patch I grabbed from Debian.
I haven't gotten it to work yet, but maybe it will help you.

Thanks,
-Joe

[-- Attachment #2: diffoscope-rust.html --]
[-- Type: text/html, Size: 163851 bytes --]

[-- Attachment #3: rust-no-split-dwarf.patch --]
[-- Type: text/x-patch, Size: 652 bytes --]

Description: Don't split dwarf debug for a fully-reproducible build
Author: Ximin Luo <infinity0@debian.org>
Bug: https://github.com/rust-lang/rust/issues/34902

--- a/src/librustc_llvm/build.rs
+++ b/src/librustc_llvm/build.rs
@@ -140,6 +140,11 @@
     let mut cfg = cc::Build::new();
     cfg.warnings(false);
     for flag in cxxflags.split_whitespace() {
+        // Split-dwarf gives unreproducible DW_AT_GNU_dwo_id so don't do it
+        if flag == "-gsplit-dwarf" {
+            continue;
+        }
+
         // Ignore flags like `-m64` when we're doing a cross build
         if is_crossed && flag.starts_with("-m") {
             continue;

  reply	other threads:[~2018-10-15 20:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-12 21:16 Reproducible rust builds Nikolai Merinov
2018-10-15 20:21 ` Joe Hillenbrand [this message]
2018-10-15 21:05   ` Nikolai Merinov
2018-10-16 13:22     ` Danny Milosavljevic
2018-10-17 19:21   ` Joe Hillenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANJQ5C7cASLm0SkXkpJrfwOYjyzh4wUFYutQ+xSYQTLwmmXWCA@mail.gmail.com \
    --to=joehillen@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=nikolai.merinov@member.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).