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 WFQQG5rlbl/gfwAA0tVLHw (envelope-from ) for ; Sat, 26 Sep 2020 06:54:18 +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 kCgSF5rlbl+WOAAAbx9fmQ (envelope-from ) for ; Sat, 26 Sep 2020 06:54:18 +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 E66E39417A5 for ; Sat, 26 Sep 2020 06:54:12 +0000 (UTC) Received: from localhost ([::1]:47306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kM45y-0005iH-9b for larch@yhetil.org; Sat, 26 Sep 2020 02:54:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50662) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kM45q-0005gh-L5 for bug-guix@gnu.org; Sat, 26 Sep 2020 02:54:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kM45q-0001Q7-BQ for bug-guix@gnu.org; Sat, 26 Sep 2020 02:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kM45q-0006fE-A7 for bug-guix@gnu.org; Sat, 26 Sep 2020 02:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41669: Cross-compiled powerpc64-linux bootstrap-tarballs not reproducible Resent-From: Chris Marusich Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 26 Sep 2020 06:54: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: Efraim Flashner Received: via spool by 41669-submit@debbugs.gnu.org id=B41669.160110318325550 (code B ref 41669); Sat, 26 Sep 2020 06:54:02 +0000 Received: (at 41669) by debbugs.gnu.org; 26 Sep 2020 06:53:03 +0000 Received: from localhost ([127.0.0.1]:45685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kM44s-0006e2-JN for submit@debbugs.gnu.org; Sat, 26 Sep 2020 02:53:03 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:39061) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kM44n-0006dU-Ib for 41669@debbugs.gnu.org; Sat, 26 Sep 2020 02:53:01 -0400 Received: by mail-pf1-f195.google.com with SMTP id n14so5183893pff.6 for <41669@debbugs.gnu.org>; Fri, 25 Sep 2020 23:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Czce+yfdkb7csCeUcygn9K//y8sGJkrMZg6xIKRRfkY=; b=n3KkbdSKRbZU5IRY0DRkyMxcDj2DCce4z3blb+XMhi/EXm7NsbyaW0BAc3gxOzy4WO Ar36ilpIhO/LbmthegcBMXljxCnV+v4d7roZUjezgqJjsUrCo18GOzGQUYkBZLhH1skK UAfXusXvPgV4skBzQK+lsn8w5Zqs02phaVa8RT3YzNq97Ako65BWg+Soza7p9zdZWBYW ijNGRqhBBCjY7vCGiB9fSPH91o/lw8mN2o1CcX3tEDllo9cqytNCEsphcuv+Z8fEKOg9 FujnU0V4UceWrmA+U2TZtZ9JF4N9cd2Gs6bPPx6l18jHlwBesDGyl8GCwThkaj/kU26C pYaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Czce+yfdkb7csCeUcygn9K//y8sGJkrMZg6xIKRRfkY=; b=PAgWZ1OJM+BSC5ClKjn5141M5Mq4WmCebrPfg9Kq5kjGs9mN2R3rT/yhL5E2qJ+Yg8 poW2odrD+K4TS7NaG2OX070FOE7SshUwxr2GM67g6OABNA1z0VBXjB2Kex48lYT3Cpjf dwj9nOj43xdSzn7gJvZF0u3OZxegV4m7ujgxzgoAnKrqWDCDkcbFZHIlFBiWtZRM2hnl MOKJqU3yndBqQQX30BCtw7lCPpSj1nuLi7pt2wJMG/Ew8qsoDr63XOm/m32pkM+3AeCA jk4JE8Qd+M8z3u3GiWJqOLs5WBjwcYBf2aPaqUz9uCDNyokFh3mbqk+BG/RSLohp9UyU YX/A== X-Gm-Message-State: AOAM530Oe6WCcwgGaVkY0c/GEkmVzyLfUWtMG3p4dSNfxCpK0H5Kel7f fyeJqK55YZVEUHVfDn+3vCc= X-Google-Smtp-Source: ABdhPJyouk2r8EWzkSe8S0eYiDAL3IbGo6d1UFSHyoC4xO6bQI/3tj4cDiFv5CsHpVLg4zkKJSPd4g== X-Received: by 2002:aa7:8a54:0:b029:142:2501:34f6 with SMTP id n20-20020aa78a540000b0290142250134f6mr2558574pfa.79.1601103171458; Fri, 25 Sep 2020 23:52:51 -0700 (PDT) Received: from garuda-lan ([2601:601:9d00:688::e6b]) by smtp.gmail.com with ESMTPSA id u138sm4508538pfc.218.2020.09.25.23.52.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 23:52:50 -0700 (PDT) From: Chris Marusich References: <874krtnvk8.fsf@gmail.com> <87y2p4mqe2.fsf@gmail.com> <87a6xu2xrj.fsf@gmail.com> <20200913062858.GC1100@E5400> Date: Fri, 25 Sep 2020 23:52:48 -0700 In-Reply-To: <20200913062858.GC1100@E5400> (Efraim Flashner's message of "Sun, 13 Sep 2020 09:28:58 +0300") Message-ID: <87wo0hqbb3.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=n3KkbdSK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 1.99 X-TUID: xNwe/tOH3oL4 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi everyone, Efraim Flashner writes: > Is this a file we actually need during the bootstrap process? Can we > "work around it" by just deleting it? That's a good idea. I tried building %gcc-static with the =2D-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: +------+-------------+---------------------+--------------+----------------= +---------------+ | Case | Build | libstdcxx | substitutes? | Inputs = | Result | +------+-------------+---------------------+--------------+----------------= +---------------+ | | | | | Built fresh on = | Output | | 1 | %gcc-static | enabled | yes | Debian, copied = | differs: | | | | | | to Fedora = | libstdc++.a | +------+-------------+---------------------+--------------+----------------= +---------------+ | | | | | Re-used inputs = | Toy binary | | 2 | toy program | n/a | yes | from above = | does not | | | | | | = | differ | +------+-------------+---------------------+--------------+----------------= +---------------+ | | | | | Built fresh on = | Output does | | 3 | %gcc-static | disabled | yes | Debian, copied = | not differ | | | | | | to Fedora = | | +------+-------------+---------------------+--------------+----------------= +---------------+ | | | | | Built fresh on = | 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 | +------+-------------+---------------------+--------------+----------------= +---------------+ The "toy program" in case 2 was just this: #include int main() { printf("Hello"); return 0; } 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. 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 =2D-pure guix" without substitutes, which really surprised me. 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. 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. In case 4, the %gcc-static output differed in the following files (the hashes on the left are MD5 hashes): =2D-8<---------------cut here---------------start------------->8--- =2D-- /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 @@ =2Dc9b0dfcbad566c0b8b88df94bb993312 ./bin/c++ =2D092823145dc96b9eb81111362f7b4ced ./bin/cpp =2Dc9b0dfcbad566c0b8b88df94bb993312 ./bin/g++ =2De4cc43b7790dcd25f31419bad606b36e ./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 =2D98645f7b00ba185e713915099853fd37 ./bin/gcov =2D37dd62589454703ae7f2eaac1668b66e ./bin/gcov-dump =2Df3dbc7e0c84a40194af3aa2429444e87 ./bin/gcov-tool =2Dc9b0dfcbad566c0b8b88df94bb993312 ./bin/powerpc64-linux-gnu-c++ =2Dc9b0dfcbad566c0b8b88df94bb993312 ./bin/powerpc64-linux-gnu-g++ =2De4cc43b7790dcd25f31419bad606b36e ./bin/powerpc64-linux-gnu-gcc =2De4cc43b7790dcd25f31419bad606b36e ./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 =2D6ed530d13e65c3500b7e7b7cc863afdc ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/cc1 =2D24a83af179ca8849da8c64aa854ec8ed ./libexec/gcc/powerpc64-linux-gnu/5.5.= 0/cc1plus =2D0c05b45bb926a06c2b09acdb1db9aad0 ./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 =2D4e77b773ac45ce8f82a4d21a34063920 ./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/crtb= egin.o 0b38aa831c40b6bc4fb22248746d60d8 ./lib/gcc/powerpc64-linux-gnu/5.5.0/crtb= eginS.o 8f62d8795bebd8e87caa3640522ff93b ./lib/gcc/powerpc64-linux-gnu/5.5.0/crtb= eginT.o =2D-8<---------------cut here---------------end--------------->8--- 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!). 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. =2D-=20 Chris --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-Disable-libstdc-in-bootstrap-GCC.patch Content-Transfer-Encoding: quoted-printable From=20e3d1778a86dfd171d59d91eb01417faaf63dfa17 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. Fixes part of: . * gnu/packages/make-bootstrap.scm (%gcc-static) [#:configure-flags]: Add =2D-disable-libstdcxx to disable building the libstdc++-v3 directory. =2D-- gnu/packages/make-bootstrap.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.= scm index b2d3e2a326..8632d63c21 100644 =2D-- 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 N= SS modules." ;; Make sure gcc-nm doesn't require liblto_plugin.so. "--disable-lto" =20 + ;; In this GCC version, libstdc++.a is not reproducible: + ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41669 + "--disable-libstdcxx" + "--disable-shared" "--disable-plugin" "--disable-libmudflap" =2D-=20 2.26.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAl9u5UAACgkQ3UCaFdgi Rp2DMQ/9GkMFoMU1/yUgSUlHgkGyFqK+SNKuURi3+f+90P2suKbfQ8qYJeTIM8KD gDg4mmDztWvORu5otyIq8yrpSKlTTH3OgSyuxLf+EZOd9/rmA5vO9mEjAI6sQzvQ mJXCk3Z6GVAnEiCqO7FKDapBRQVd9MIn8ObjXQbJrqGqeJg5CHxsMCVCtQz99m95 L56G2B0Ph3KbDfDqhb6AhYTyLhZ3oy+mrTzwc7aE9Ott6rWA9TJ7xH0sul6RL6gA hwYJT6yIsvNuT+en94TYKtaPpMkEVJklNOUp34ERaggpU4eGBwszti351QjLCect sz9O2DqU2cUlG2zCGS9x4cwmjNDFDoWvKg+VDtqmKO5C+1344qVgubcvHYjMruYf Goaige9PmvGs9htG4cPVeKoR80Hy8l5cNyjteIGqQm9lavVP+WUYiL9TTC+jQEo4 jzkhlWxvfGLdnIT4SZbkOike/bQN4ckzwdg1d1MfLDmhOlFfnCM1rZ3qFdCwQBzn szIqVWdaO+BUMoYin1OVhaUnTpSKSB3pDbsY6SwY8aHqcH7Kw6XRCeYHnHaP1MQn hGowVLo0R58Fo5zghHlulqC/t/PmB4SJ3G/ZjbxTRexHNqvhq2MwQoGFH0gNP6Un mW97TFHwvkejUCKMkytJNB+i26td9gXhU+zmbvy7JYOjTa9mlg4= =5H4x -----END PGP SIGNATURE----- --==-=-=--