From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EltlCxMWe18+KAAA0tVLHw (envelope-from ) for ; Mon, 05 Oct 2020 12:48:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uK27BhMWe1+nXAAAbx9fmQ (envelope-from ) for ; Mon, 05 Oct 2020 12:48:19 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2305E9401BD for ; Mon, 5 Oct 2020 12:48:18 +0000 (UTC) Received: from localhost ([::1]:59096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPPuZ-0005gj-Hb for larch@yhetil.org; Mon, 05 Oct 2020 08:48:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPPuM-0005eC-GG for bug-guix@gnu.org; Mon, 05 Oct 2020 08:48:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPPuM-0008Nb-7K for bug-guix@gnu.org; Mon, 05 Oct 2020 08:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kPPuM-0002zQ-3R for bug-guix@gnu.org; Mon, 05 Oct 2020 08:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41669: Cross-compiled powerpc64-linux bootstrap-tarballs not reproducible Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 05 Oct 2020 12:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41669 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Chris Marusich Received: via spool by 41669-submit@debbugs.gnu.org id=B41669.160190207711482 (code B ref 41669); Mon, 05 Oct 2020 12:48:02 +0000 Received: (at 41669) by debbugs.gnu.org; 5 Oct 2020 12:47:57 +0000 Received: from localhost ([127.0.0.1]:48289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPPuH-0002z7-4H for submit@debbugs.gnu.org; Mon, 05 Oct 2020 08:47:57 -0400 Received: from flashner.co.il ([178.62.234.194]:58896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPPuE-0002yt-Gh for 41669@debbugs.gnu.org; Mon, 05 Oct 2020 08:47:55 -0400 Received: from localhost (unknown [31.210.181.177]) by flashner.co.il (Postfix) with ESMTPSA id 55EB640216; Mon, 5 Oct 2020 12:47:45 +0000 (UTC) Date: Mon, 5 Oct 2020 15:47:10 +0300 From: Efraim Flashner Message-ID: <20201005124710.GA21174@E5400> References: <874krtnvk8.fsf@gmail.com> <87y2p4mqe2.fsf@gmail.com> <87a6xu2xrj.fsf@gmail.com> <20200913062858.GC1100@E5400> <87wo0hqbb3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline In-Reply-To: <87wo0hqbb3.fsf@gmail.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 41669@debbugs.gnu.org, =?UTF-8?Q?L=C3=A9o?= Le Bouter , Maxim Cournoyer , Vincent Legoll Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 2.19 X-TUID: ZTsZjcOSjdYl --KsGdsel6WgEHnImy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 25, 2020 at 11:52:48PM -0700, Chris Marusich wrote: > Hi everyone, >=20 > Efraim Flashner writes: >=20 > > Is this a file we actually need during the bootstrap process? Can we > > "work around it" by just deleting it? >=20 > That's a good idea. I tried building %gcc-static with the > --disable-libstdcxx configure flag (see attached patch), and that caused > the build of %gcc-static itself to become reproducible on Debian and > Fedora when using exactly the same inputs. To clarify, I have recently > run the following experiments: >=20 > +------+-------------+---------------------+--------------+--------------= --+---------------+ > | Case | Build | libstdcxx | substitutes? | Inputs = | Result | > +------+-------------+---------------------+--------------+--------------= --+---------------+ > | | | | | Built fresh o= n | Output | > | 1 | %gcc-static | enabled | yes | Debian, copie= d | differs: | > | | | | | to Fedora = | libstdc++.a | > +------+-------------+---------------------+--------------+--------------= --+---------------+ > | | | | | Re-used input= s | Toy binary | > | 2 | toy program | n/a | yes | from above = | does not | > | | | | | = | differ | > +------+-------------+---------------------+--------------+--------------= --+---------------+ > | | | | | Built fresh o= n | Output does | > | 3 | %gcc-static | disabled | yes | Debian, copie= d | not differ | > | | | | | to Fedora = | | > +------+-------------+---------------------+--------------+--------------= --+---------------+ > | | | | | Built fresh o= n | Output | > | 4 | %gcc-static | disabled | yes | Debian, fresh= | differs: | > | | | | | on Fedora = | various files | > +------+-------------+---------------------+--------------+--------------= --+---------------+ > | | | | | Inputs failed= | Build failed | > | 5 | %gcc-static | disabled | no | to build on = | on both | > | | | | | both systems= | systems | > +------+-------------+---------------------+--------------+--------------= --+---------------+ >=20 > The "toy program" in case 2 was just this: >=20 > #include > int main() { > printf("Hello"); > return 0; > } >=20 > When I say I "copied" the inputs from Debian to Fedora, I mean just > that. I copied stuff like /gnu and /var/guix from Debian to Fedora > (while guix-daemon was stopped, of course), GC'd just %gcc-static on > Fedora, and then rebuilt %gcc-static on Fedora so it would use exactly > the same inputs as were used on Debian. >=20 > The most notable new findings are cases 3 and 4. Case 5 made me pretty > sad because I spent almost an entire weekend trying to build Guix from > source using various binary Guix releases, and in none of the attempts > was I successful in running "guix pull" or even just "guix environment > --pure guix" without substitutes, which really surprised me. >=20 > Case 3 confirms Efraim's suggestion: we can fix the libstdc++.a > reproducibility problem by simply not building libstdc++.a in the first > place. It also confirms that, when built with --disable-libstdcxx, > %gcc-static can be built reproducibly on different systems as long as > exactly the same inputs are used. Whether or not %gcc-static can be > used to successfully bootstrap packages on powerpc64-linux when built in > this way remains to be seen. >=20 > Case 4, unfortunately, demonstrates that there are still other > reproducibility issues that we have not yet resolved. Since the only > difference between cases 3 and 4 is how the inputs were realized, the > differing %gcc-static output must be caused by the inputs somehow. >=20 > In case 4, the %gcc-static output differed in the following files (the > hashes on the left are MD5 hashes): >=20 > --8<---------------cut here---------------start------------->8--- > --- /dev/fd/63 2020-09-25 20:35:33.386554595 -0700 > +++ /dev/fd/62 2020-09-25 20:35:33.387554604 -0700 > @@ -1,28 +1,28 @@ > -c9b0dfcbad566c0b8b88df94bb993312 ./bin/c++ > -092823145dc96b9eb81111362f7b4ced ./bin/cpp > -c9b0dfcbad566c0b8b88df94bb993312 ./bin/g++ > -e4cc43b7790dcd25f31419bad606b36e ./bin/gcc > +8f02302b55643f1c711e472a42fea8bd ./bin/c++ > +9f1fd993e4f2b796fcc56f0b2f8a47d2 ./bin/cpp > +8f02302b55643f1c711e472a42fea8bd ./bin/g++ > +583d1b011a7ba009d7385117dd7a33c8 ./bin/gcc > f9d94f4bb61f70d14ea4b2ce73c9be9d ./bin/gcc-ar > 01fc2184f99c558771aa8f2fe30b373d ./bin/gcc-nm > da5356ee09ccda4ca06758d056370f7e ./bin/gcc-ranlib > -98645f7b00ba185e713915099853fd37 ./bin/gcov > -37dd62589454703ae7f2eaac1668b66e ./bin/gcov-dump > -f3dbc7e0c84a40194af3aa2429444e87 ./bin/gcov-tool > -c9b0dfcbad566c0b8b88df94bb993312 ./bin/powerpc64-linux-gnu-c++ > -c9b0dfcbad566c0b8b88df94bb993312 ./bin/powerpc64-linux-gnu-g++ > -e4cc43b7790dcd25f31419bad606b36e ./bin/powerpc64-linux-gnu-gcc > -e4cc43b7790dcd25f31419bad606b36e ./bin/powerpc64-linux-gnu-gcc-5.5.0 > +a208bedbfca9c7bd6c27d0d42f7096fe ./bin/gcov > +43330e8ae00976b4b3427d2f83b0725e ./bin/gcov-dump > +9f37da5e96f147d733eb7195350ae5d2 ./bin/gcov-tool > +8f02302b55643f1c711e472a42fea8bd ./bin/powerpc64-linux-gnu-c++ > +8f02302b55643f1c711e472a42fea8bd ./bin/powerpc64-linux-gnu-g++ > +583d1b011a7ba009d7385117dd7a33c8 ./bin/powerpc64-linux-gnu-gcc > +583d1b011a7ba009d7385117dd7a33c8 ./bin/powerpc64-linux-gnu-gcc-5.5.0 > f9d94f4bb61f70d14ea4b2ce73c9be9d ./bin/powerpc64-linux-gnu-gcc-ar > 01fc2184f99c558771aa8f2fe30b373d ./bin/powerpc64-linux-gnu-gcc-nm > da5356ee09ccda4ca06758d056370f7e ./bin/powerpc64-linux-gnu-gcc-ranlib > -6ed530d13e65c3500b7e7b7cc863afdc ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/cc1 > -24a83af179ca8849da8c64aa854ec8ed ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/cc1plus > -0c05b45bb926a06c2b09acdb1db9aad0 ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/collect2 > +22b72247a5706f090505341263ca1fc2 ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/cc1 > +3be618d184038dd30011d6aa8198c0be ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/cc1plus > +2f31e84c01cc087318d0c7f15b6e3f47 ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/collect2 > 417a5b42a26275b2c912db16b9abf73a ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/install-tools/fixincl > fd6f80ec9089ddf51f9cac26299e45af ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/install-tools/fixinc.sh > a585abbd6a9cdc474564b54fc72e4efa ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/install-tools/mkheaders > 5071acceb24c0c0e8a423286205ed54c ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/install-tools/mkinstalldirs > -4e77b773ac45ce8f82a4d21a34063920 ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/lto-wrapper > +5267311e0ed8bb5358e5556dfa205ca6 ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/lto-wrapper > a90ab86f837913280f72beb5310714bc ./lib/gcc/powerpc64-linux-gnu/5.5.0/cr= tbegin.o > 0b38aa831c40b6bc4fb22248746d60d8 ./lib/gcc/powerpc64-linux-gnu/5.5.0/cr= tbeginS.o > 8f62d8795bebd8e87caa3640522ff93b ./lib/gcc/powerpc64-linux-gnu/5.5.0/cr= tbeginT.o > --8<---------------cut here---------------end--------------->8--- >=20 > These appear to be the same diffs that I reported before - with the > notable exception that libstdc++.a now is missing from the list of > differing files (hooray!). >=20 > Going forward, I'm not sure how best to investigate the inputs to find > out what's causing the differences. I just know I really, really, > really don't want to rebuild everything multiple times, since it takes > hours/days. If you have any creative ideas for how to speed up the > investigation, I'm all ears. >=20 Does diffoscope provide any useful clues as to what's going on? I don't remember if gcc-5.5.0 was reproducible when I created the aarch64 bootstrap binaries. > --=20 > Chris > From e3d1778a86dfd171d59d91eb01417faaf63dfa17 Mon Sep 17 00:00:00 2001 > From: Chris Marusich > Date: Sat, 19 Sep 2020 14:25:43 -0700 > Subject: [PATCH] gnu: Disable libstdc++ in bootstrap GCC. >=20 > Fixes part of: . >=20 > * gnu/packages/make-bootstrap.scm (%gcc-static) [#:configure-flags]: Add > --disable-libstdcxx to disable building the libstdc++-v3 directory. > --- > gnu/packages/make-bootstrap.scm | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstra= p.scm > index b2d3e2a326..8632d63c21 100644 > --- a/gnu/packages/make-bootstrap.scm > +++ b/gnu/packages/make-bootstrap.scm > @@ -487,6 +487,10 @@ for `sh' in $PATH, and without nscd, and with static= NSS modules." > ;; Make sure gcc-nm doesn't require liblto_plugin.so. > "--disable-lto" > =20 > + ;; In this GCC version, libstdc++.a is not reproducib= le: > + ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41= 669 > + "--disable-libstdcxx" > + > "--disable-shared" > "--disable-plugin" > "--disable-libmudflap" > --=20 > 2.26.2 >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --KsGdsel6WgEHnImy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl97Fc4ACgkQQarn3Mo9 g1HKChAAnk7rWppLToPQdIgAyKKvKdoVN9iJBetlXuNqumDKsZJOv5ge2vNxCdz5 Yn3IiCB6VpwL/u2gjpimgwAdjI4LwO/pB2i86S8DVdQ+M+IgQ6mIEpuO6GCVy0K0 QB+GAzvU/0otmV/XMOB9yosLvPkdA1394pEzkLfuPjCzepe0NxznP8nIAoipeYK0 q0iDT2DWWrZX8jdV8JZEwVHKF1k5KjgNQNyuc3ubyK8CTIqxWJu+wLqZjgBxiF0z dPBDH5eJmgkyqhkiQotlWN/5cqeNuS64gybf7j15NAK+v8yDfYtDZObyIKUCI75o cSiiOIv/lIHo9Mk893aZ6OL6oCrC5u4loqbyjiiYJdT5n8QPSX5gkaq+os13XqW0 Dw4IHm7e4SrnakqTuHjaFu9IAyj/h5PJZMC5r7EvpD7Qqk/XeSFATskJDyto7EYI H16iHM+YgUycFc9aWnzeWGPYvNJLYhEH3qqGUiOOXZXyv0e2XwdiVpWpJ9RZO8r9 wUd+OS5hPFmmtcPvaJuFSNBhTtts3RWcSKVf5VdBM/+cfHIQMe6RWlNsl94BQxX+ cjW25lz8e6j5dwH4fv1mz7x38jzZaTkUsMglMtSf7dZBhyFMSBplAhFlv+zXElpv lr0dO2AiD4tddZSsemCemSaP3ZltzyNiGxOGVJI2YPEPLbEscu0= =zIrx -----END PGP SIGNATURE----- --KsGdsel6WgEHnImy--