From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yKeILxzVuWB2SAEAgWs5BA (envelope-from ) for ; Fri, 04 Jun 2021 09:24:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mL7iKhzVuWA0LwAAB5/wlQ (envelope-from ) for ; Fri, 04 Jun 2021 07:24:12 +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 F12FC8BF9 for ; Fri, 4 Jun 2021 09:24:11 +0200 (CEST) Received: from localhost ([::1]:43092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lp4Be-0006oe-LR for larch@yhetil.org; Fri, 04 Jun 2021 03:24:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp4BW-0006o1-O4 for guix-patches@gnu.org; Fri, 04 Jun 2021 03:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lp4BW-00025R-GV for guix-patches@gnu.org; Fri, 04 Jun 2021 03:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lp4BW-0006B3-Bi for guix-patches@gnu.org; Fri, 04 Jun 2021 03:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48721] [PATCH v2] gnu: gcc-8: Make static libs reproducible Resent-From: Chris Marusich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Jun 2021 07:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48721 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Carl Dong Cc: ludo@gnu.org, 48721@debbugs.gnu.org Received: via spool by 48721-submit@debbugs.gnu.org id=B48721.162279141323702 (code B ref 48721); Fri, 04 Jun 2021 07:24:02 +0000 Received: (at 48721) by debbugs.gnu.org; 4 Jun 2021 07:23:33 +0000 Received: from localhost ([127.0.0.1]:45222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lp4B3-0006AE-2x for submit@debbugs.gnu.org; Fri, 04 Jun 2021 03:23:33 -0400 Received: from mail-pj1-f42.google.com ([209.85.216.42]:46694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lp4Ax-00069v-CA for 48721@debbugs.gnu.org; Fri, 04 Jun 2021 03:23:32 -0400 Received: by mail-pj1-f42.google.com with SMTP id pi6-20020a17090b1e46b029015cec51d7cdso5333616pjb.5 for <48721@debbugs.gnu.org>; Fri, 04 Jun 2021 00:23:27 -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=7SzmIpJB1OU/FpRK16woHdbon+nzoHytjoORC6Q2Klw=; b=uBS6s+e0pRgdmTaUChSaUxD2mOwRkCvEbO8BGJOfaUgZWHNH9j4rGd6eWWz7vhgXx3 F97PabTXRQ/2HCSSTjAB0GOzd7u0PoCfPw6YPxwqXEiSXnUHTmlQV4ERTH2+LQlBgC8u K9/+1nbv0jKUyH9XwKpLlR4r/pda5cvw0joS2SkgNpCh8cNNaXzYjd4qwqYTe/CxvAPE RTHZECpA6nDZ0lyA1aGPq20Fz3CRuISwvJaus7EObP1TtCwwq9tfjV6AkdZMffhMjUjw tJirpFra3zmeM7DFrVnhWeYf/d9OJBQHKDOPLkJiwiy1VluxI0ESRoL5XcbO7qW0hYtP /bMw== 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=7SzmIpJB1OU/FpRK16woHdbon+nzoHytjoORC6Q2Klw=; b=S+71ao8ww+rXCPjh19UjQ46UaD/A0uivcWpE2bp5aNkDzo7It4V9ZI6YVkRvyYM9AM WPSyFKcnTY1sV4bRyU3zCnNBnFeBU0aOAc+Y4Q/HXk2sqgbRPEFjAzwCniSaRGUpYm1b ohqRyDAvhTN8sT51j5qS5EN7CgMpMAyo/FKuKn1Jgs36ewpNWCx8YT1bC4F43tg0zFoz VB2fWGcAU50NK6Yzso7dEshLmEr0V2wbEB3Ff3dTe6qinomRy1cZgHUwsN7RuaMrlcZI sudFRZnsXm5giUdiqJmcCju7G96VnWHevuYwHYw7ReZW27ZNGLpmBJp20aKon1avoX53 zvLQ== X-Gm-Message-State: AOAM533g0xE/VFYX8mJek6oXaXUAxbzYhYTXMmcrR+MDaonkXNmzwykI 4IqPJrDL43oM4EL1kzjVjGOOW7tjc3o= X-Google-Smtp-Source: ABdhPJzdgGCImKmLWCwSF68U+z+FaT/l4wkTAvtvWktTBPQSxDiwvzByfPXMRCPvcFjPWysCcfnjvw== X-Received: by 2002:a17:90a:a395:: with SMTP id x21mr3455283pjp.63.1622791401098; Fri, 04 Jun 2021 00:23:21 -0700 (PDT) Received: from garuda-lan ([2601:601:9d01:3f90::b043]) by smtp.gmail.com with ESMTPSA id gk21sm2295638pjb.22.2021.06.04.00.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 00:23:20 -0700 (PDT) From: Chris Marusich References: <87lf7x79hp.fsf@gnu.org> <20210603200518.1125690-1-contact@carldong.me> Date: Fri, 04 Jun 2021 00:23:16 -0700 In-Reply-To: <20210603200518.1125690-1-contact@carldong.me> (Carl Dong's message of "Thu, 3 Jun 2021 16:05:19 -0400") Message-ID: <878s3qt7ob.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622791452; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=7SzmIpJB1OU/FpRK16woHdbon+nzoHytjoORC6Q2Klw=; b=fZyUj9KolsW0vfy64gA+n1+Uw/2zx2eX2fwFfsHoqgrnYWyasWixBx2cHACfoCHdLVxPO1 Z3HDe+0RISeFs05mTyCmPxl84ltxpNUrGS8+sDB9pFm/MlMgqLkfKE4WOBCGkzchmYtwz9 ZWNnEjcHZTibYrZxNt/HrCPp+1HPtmtSWGXDuFiTPfUCWhr447n0GiW71stPuA3qc1QGk0 PFWqEOX+CjZS1xYsqLx++P3ObMY2cLICQ+qrBVyh7zVPDoVxGKNcCl3ZfRx9gB4Z/E4qKc E/6S6QGpwJDDcu3/+UxGIbvFaY2AP2MNq2dCQbXQvqXV2Prfi6EdlZdHM1QILg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622791452; a=rsa-sha256; cv=none; b=pEOZsUJWmjP4l4PZlstSdhYHXCFuFfyAFtOQIdBvCafbhfeFQokrmMf+w7Y4GBP33aJe4z 9Nqf80OlBD8ks8PazYC6K2AtrZzmLiCInluf69l1EjkW3JO1bIVEvIWwE2NvA6IJOyoptQ vPZZOC8i9E5T5O+VIUK5nLvGW1nXBwGpH/6Y9YutQbxJrViuPbmxsnxvb13UDNvQIeiQur 4Rg1yRGw1tSLIBiICJSHTABNsGJMvO8Gfh4LUbjxleXOKTGqwlKTQVKUA3gqPaUH6110jl +2mlm27nu3izb0uS3krp+ikwMultK3u5JV0HwoZOHWSuXT7RE8DiLFlSWdTT8Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=uBS6s+e0; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.43 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=uBS6s+e0; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: F12FC8BF9 X-Spam-Score: -3.43 X-Migadu-Scanner: scn1.migadu.com X-TUID: o34hTdz19EGj --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Carl, Thank you so much for looking into this! The patch looks reasonable to me. I am definitely curious to try a fixed version of GCC (8 or otherwise) to see if it helps to solve 41669! Carl Dong writes: > Here's a v2 of the patch, let me know if this suffices! > >> Well done. Did you observe it in practice? (On =E2=80=98core-updates= =E2=80=99 maybe?) > > Thanks! Yes, we observed it when switching back from gcc-9 to gcc-8 for > compiling Bitcoin Core. We use -static-libstdc++, which means that any > non-reproducibility in libstdc++.a propagates into our produced binaries = as > well. > > To be clear, I was only able to identify the problem and fix thanks to yo= ur > patch here: > https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/patches/dico= -libtool-deterministic.patch?h=3Db6094b1f0a6760b9f5296364cf5edb8a2e64953c > > >> I=E2=80=99m surprised that this is still an issue since this was fixed in >> Libtool proper long ago, probably before GCC 8 was released. > > Right, unfortunately GCC maintains their own version of libtool, which ha= sn't > been synced with upstream for a while. I documented the details here: > https://reproducible-builds.org/docs/archives/#gnu-libtool > >> The patch is big, but it looks like using =E2=80=98substitute*=E2=80=99 = wouldn=E2=80=99t be an >> easy task, so maybe it=E2=80=99s better this way. WDYT? > > Right, I think it'd be hard to construct a robust substitute* for this th= at > doesn't have false negatives/positives. I agree; a patch seems best. > --- > > This fixes the nonreproducibility in gcc documented here: > https://reproducible-builds.org/docs/archives/#gnu-libtool > > * gnu/packages/patches/gcc-8-sort-libtool-find-output.patch: New patch. > * gnu/local.mk (dist_patch_DATA): Register it. > * gnu/packages/gcc.scm (gcc-8)[source]: Apply it. Can this patch also be applied to earlier versions of GCC, such as gcc-7, which is currently the default GCC used for basically everything on Guix's master branch? Or is it too different? =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAmC51OQVHGNtbWFydXNp Y2hAZ21haWwuY29tAAoJEN1AmhXYIkadHVAP/0+bf97wQSS8N3449cawLHJzv1Uw 2gDP71J9UPDdxaXfTIavYsmqzwrPhTt2lIN7LBZ9t2Gs2/eN5o52Krru+sHEb/GF nWYt2ENxBYzladyfA+8PgCwEfeDnV3K7s7pK7YMDv0AhlnmsVMFkzO7F6yiAN4Wt t3gUyZaoDg3hcWzlkVBPofKNp9bj8+wM4ph48PkWlPr23Ynez+qnJgr3+99AAAse HQZhvkpPzi5ORLoStXlIUFQFeoORCtgw6WImr+2QvP9dNDZn7t2Foy/sEDuz8UF5 wnzcE/s9zghEMpdtwplxbEsHbamP2NJt0j4y9ztPcU+VG6y2NoqK9aRo9XBiwe3O 2v3NGQx7CEEkd5wUjG7To3J8hlFMJK6pc9Te5NaN0lRtbqgAhfgGakFx2nIpti7I LeWF5bzq+kAcKJ5j1z9W7EqMtkJOPkOncDA2nbSwvwkvucSEef8ogzX/cvegquxW tNO7O2EY6wgbMd0JTYy0GxnXHtJVML0QEtCFJbSgEa3y/VLUfY9W0EG+coazT4MZ vVUOW8oUEmKZtQnXVOeZccJ/MYYK+SNgbhUzDxeO7/5GY5pU5qzd4wwuC9deA8Ho 3XK6WtrjJkmM34VUNFzL0teynGYLP/9f2gtK00BxZASWYT95lTj0EZYp86H9pkqR M9JZJxHzbVJS6WFg =RffV -----END PGP SIGNATURE----- --=-=-=--