Subject: Cross-compiled powerpc64-linux bootstrap-tarballs not reproducible

From: Chris Marusich <[email-masked]>
Date: Tue, 02 Jun 2020 11:59:03 -0700

Hi,

As demonstrated in the following email thread, the powerpc64-linux
bootstrap-tarballs are not reproducible when cross-compiled from an
x86_64-linux system:

https://lists.gnu.org/archive/html/guix-devel/2020-06/msg00003.html

Four people attempted to invoke the following command using Guix commit
8159ce1970d91567468cf1bacac313099a009d2a:

  guix build --no-substitutes --target=powerpc64-linux-gnu bootstrap-tarballs

All of the bootstrap tarballs except for gcc-stripped were reproducible.
However, these attempts produced four different versions of
gcc-stripped-5.5.0-powerpc64-linux-gnu.tar.xz.  At least two of the
attempts were performed on two different x86_64-linux systems.

The derivation that produced the differing output was:

/gnu/store/pygln3lr6qbxcps3kmn3w4bc0d0nlpd3-gcc-stripped-tarball-5.5.0.drv

You can build this derivation in a variety of ways, for example:

  guix build --target=powerpc64-linux-gnu -e '(@ (gnu packages make-bootstrap) %gcc-bootstrap-tarball)'

or just

  guix build /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.
Out of paranoia, I tried deleting its output with "guix gc --delete",
and then building it again.  The new output was, indeed, identical to
the old output.  This makes me think that the non-reproducibility is
coming from something outside the immediate build logic of the
gcc-stripped-tarball-5.5.0.drv derivation itself.

I will next try to rebuild everything from scratch again.  I will also
try to get copies of the differing outputs from the people involved in
that email thread, in order to run diffoscope on them.

-- 
Chris