unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: 41669@debbugs.gnu.org
Cc: "Vincent Legoll" <vincent.legoll@gmail.com>,
	"Léo Le Bouter" <lle-bout@zaclys.net>,
	"Maxim Cournoyer" <maxim.cournoyer@gmail.com>
Subject: bug#41669: Cross-compiled powerpc64-linux bootstrap-tarballs not reproducible
Date: Wed, 03 Jun 2020 02:48:21 -0700	[thread overview]
Message-ID: <87y2p4mqe2.fsf@gmail.com> (raw)
In-Reply-To: <874krtnvk8.fsf@gmail.com> (Chris Marusich's message of "Tue, 02 Jun 2020 11:59:03 -0700")

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

Hi all,

Chris Marusich <cmmarusich@gmail.com> writes:

> The derivation that produced the differing output was:
>
> /gnu/store/pygln3lr6qbxcps3kmn3w4bc0d0nlpd3-gcc-stripped-tarball-5.5.0.drv
>
> On my x86_64-linux system, twice I tried running "guix build --check" on
> this derivation, but each time it surprisingly reported no difference.

This derivation corresponds to %gcc-bootstrap-tarball from (gnu packages
make-bootstrap), which just creates a tarball of the output of
%gcc-stripped.  Therefore, it's not too surprising that it's
reproducible.  Similarly, %gcc-stripped just strips some store
references from the output of %gcc-static.  The %gcc-static package is
more interesting: it's where we actually build the statically linked
bootstrap GCC (which is then stripped and packed into a tarball as
mentioned above), so I thought that it might be where the
non-determinism is coming from.  However, I haven't yet pinpointed the
problem.

If you examine the derivations and their inputs, you'll find that they
depend upon each other in the following order:

guix build --target=powerpc64-linux-gnu -d -e '(@ (gnu packages make-bootstrap) %gcc-bootstrap-tarball)'
/gnu/store/pygln3lr6qbxcps3kmn3w4bc0d0nlpd3-gcc-stripped-tarball-5.5.0.drv

guix build --target=powerpc64-linux-gnu -d -e '(@@ (gnu packages make-bootstrap) %gcc-stripped)'
/gnu/store/kcv3ja1rfr93hw6ly51878zjhdwpgv7z-gcc-stripped-5.5.0.drv

guix build --target=powerpc64-linux-gnu -d -e '(@@ (gnu packages make-bootstrap) %gcc-static)'
/gnu/store/m9hfwppla8lph0vxa15lfkp81s2bbjjs-gcc-static-5.5.0.drv

In other words, gcc-static-5.5.0.drv is an input of
gcc-stripped-5.5.0.drv, which is an input of
gcc-stripped-tarball-5.5.0.drv.  Above, I've included example guix
commands you can use to obtain each derivation.  Using "guix build
--check", I confirmed that all three of these derivations build
reproducibly on my machine.

I hoped to find more information by invoking "guix build --check" on
every input of gcc-static-5.5.0.drv.  When I tried that, what I found
was that all of its inputs build reproducibly except the following two:

/gnu/store/x32cnfkd50fnxs10xp1jdn24h7ai2gxr-guile-3.0.2.drv
/gnu/store/g9fpkg2qa27mka1znqsvx8vxqyabsj2y-gcc-7.5.0.drv

I haven't investigated guile-3.0.2.drv.  However, gcc-7.5.0.drv felt
more suspicious to me, and it is actually the derivation that builds
gcc-final from (gnu packages commencement), which you can see via:

guix build -d -e '(@@ (gnu packages commencement) gcc-final)'

Using "guix gc", I deleted the outputs of
gcc-stripped-tarball-5.5.0.drv, gcc-stripped-5.5.0.drv,
gcc-static-5.5.0.drv, and gcc-7.5.0.drv.  I then tried building these
four derivations again (without substitutes, the same as before).
Before doing this, I stored the SHA-512 hashes of their output files,
and after the build succeeded, I compared the hashes of the new files
with the previous values.  I found that these derivations' newly rebuilt
outputs were identical to their original values, except for
gcc-7.5.0.drv, which produced some different files.  Most significantly,
this means that gcc-stripped-tarball-5.5.0.drv produced the exact same
tarball for me as it did the first time I built it, even though some of
its inputs are not themselves reproducible.

At present, it seems possible that within the context of a single
machine, gcc-stripped-tarball-5.5.0.drv builds reproducibly, but on a
different machine, it may (reproducibly) build a different output.  I'm
a bit paranoid about making mistakes, so I'll perform another full GC
and then try yet again to build gcc-stripped-tarball-5.5.0.drv in order
to verify whether it truly produces the same output when all (or nearly
all) of its inputs are rebuilt from scratch.

Some people have also shared their differing copies of the binaries on
the email list.  It could be productive to compare the contents with
diffoscope, although I suspect the diff might be too large to be useful.

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2020-06-03  9:49 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02 18:59 bug#41669: Cross-compiled powerpc64-linux bootstrap-tarballs not reproducible Chris Marusich
2020-06-03  9:48 ` Chris Marusich [this message]
2020-06-03 20:50   ` Vincent Legoll
2020-06-10  6:15   ` Chris Marusich
2020-06-10 22:20     ` Bengt Richter
2020-06-11 21:09     ` Jack Hill
2020-09-13  2:53   ` Chris Marusich
2020-09-13  6:28     ` Efraim Flashner
2020-09-26  6:52       ` Chris Marusich
2020-10-05 12:33         ` Ludovic Courtès
2020-12-13 23:36           ` Chris Marusich
2020-12-14  8:17             ` Efraim Flashner
2020-12-14  8:36             ` Ludovic Courtès
2020-12-14  9:22               ` Leo Le Bouter via Bug reports for GNU Guix
2020-12-14 10:27                 ` Efraim Flashner
2020-12-14 10:34                   ` Leo Le Bouter via Bug reports for GNU Guix
2020-12-14 10:38                     ` Efraim Flashner
2020-12-14 10:44                       ` Leo Le Bouter via Bug reports for GNU Guix
2020-12-14 22:24                         ` Ludovic Courtès
2020-12-15  7:34                           ` Leo Le Bouter via Bug reports for GNU Guix
2020-12-15  9:35                             ` Leo Le Bouter via Bug reports for GNU Guix
2020-12-15  7:46                           ` Leo Le Bouter via Bug reports for GNU Guix
2020-12-20  7:28                     ` Chris Marusich
2020-12-28  2:25                       ` Leo Le Bouter via Bug reports for GNU Guix
2020-12-28  4:23                         ` Chris Marusich
2020-12-28  8:07                           ` Efraim Flashner
2020-12-28 12:39                           ` Leo Le Bouter via Bug reports for GNU Guix
2020-12-28 12:55                           ` Leo Le Bouter via Bug reports for GNU Guix
2020-12-28 15:31                             ` Leo Le Bouter via Bug reports for GNU Guix
2020-12-28 17:40                               ` Leo Le Bouter via Bug reports for GNU Guix
2020-12-28 19:01                                 ` Leo Le Bouter via Bug reports for GNU Guix
2020-12-28 20:59                                   ` Leo Le Bouter via Bug reports for GNU Guix
2020-12-29  7:08                                     ` Efraim Flashner
2021-01-05  3:54                           ` Chris Marusich
2020-12-28  8:07                         ` Efraim Flashner
2020-12-30  1:28                       ` Leo Le Bouter via Bug reports for GNU Guix
2021-01-04  9:37                         ` Ludovic Courtès
2021-01-04 11:16                           ` Efraim Flashner
2021-01-05  3:15                           ` Chris Marusich
2021-01-06  8:59                             ` Ludovic Courtès
2021-01-11 10:31                               ` Chris Marusich
2021-01-21  6:26                                 ` Chris Marusich
2021-01-31 21:35                                 ` Ludovic Courtès
2020-10-05 12:47         ` Efraim Flashner
2021-02-27  2:39         ` Chris Marusich

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=87y2p4mqe2.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=41669@debbugs.gnu.org \
    --cc=lle-bout@zaclys.net \
    --cc=maxim.cournoyer@gmail.com \
    --cc=vincent.legoll@gmail.com \
    /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).