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 8DdQMlTg+V7QUwAA0tVLHw (envelope-from ) for ; Mon, 29 Jun 2020 12:36:36 +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 GBP3LVTg+V61QQAAbx9fmQ (envelope-from ) for ; Mon, 29 Jun 2020 12:36:36 +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 499A49409E8 for ; Mon, 29 Jun 2020 12:36:36 +0000 (UTC) Received: from localhost ([::1]:54952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpt1W-000162-Ok for larch@yhetil.org; Mon, 29 Jun 2020 08:36:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpt10-0000mr-5S for bug-guix@gnu.org; Mon, 29 Jun 2020 08:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jpt0z-0006qB-Rf for bug-guix@gnu.org; Mon, 29 Jun 2020 08:36:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jpt0z-0001zy-P5 for bug-guix@gnu.org; Mon, 29 Jun 2020 08:36:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42009: package.cache not deterministic Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 29 Jun 2020 12:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42009 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: zimoun Received: via spool by 42009-submit@debbugs.gnu.org id=B42009.15934341027560 (code B ref 42009); Mon, 29 Jun 2020 12:36:01 +0000 Received: (at 42009) by debbugs.gnu.org; 29 Jun 2020 12:35:02 +0000 Received: from localhost ([127.0.0.1]:48222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpt02-0001xf-0W for submit@debbugs.gnu.org; Mon, 29 Jun 2020 08:35:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jpszx-0001x7-Ng for 42009@debbugs.gnu.org; Mon, 29 Jun 2020 08:35:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58816) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpszr-0006Kk-8C; Mon, 29 Jun 2020 08:34:51 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=37738 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jpszq-0006YK-86; Mon, 29 Jun 2020 08:34:51 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <1593096834.1154.5@disroot.org> <87h7uysrmr.fsf@nckx> <86366ibuor.fsf@gmail.com> <874kqvgchu.fsf@gnu.org> <86o8p2b34l.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 12 Messidor an 228 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 29 Jun 2020 14:34:40 +0200 In-Reply-To: <86o8p2b34l.fsf@gmail.com> (zimoun's message of "Mon, 29 Jun 2020 12:03:22 +0200") Message-ID: <875zbacaov.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 42009@debbugs.gnu.org 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: -1.01 X-TUID: QTdRNEDqwBIF --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Simon, zimoun skribis: > On Sun, 28 Jun 2020 at 22:29, Ludovic Court=C3=A8s wrote: > >> Most likely the problem with non-reproducible .go files is that the fix >> for was incomplete. In particular, I think >> that gensyms are not reproducible when building things in parallel, >> because the gensym depends on what=E2=80=99s loaded vs. interpreted. > > Thank you for the pointer. > > How can I test the "hypothesis" of "building things in parallel"? > > guix describe -f channels > /tmp/chan.scm > guix pull -C /tmp/chan.scm --cores=3D1 -p /tmp/repull1 > > guix build --check --no-grafts --cores=3D1 \ > $(guix gc --derivers \ > $(readlink -f /tmp/repull1/lib/guix/package.cache)) > The following profile hook will be built: > /gnu/store/qbrgxbnx0hi13xm36a6a0zijzc1rcz22-guix-package-cache.drv I realize I was a bit off-topic: I was commenting on the more general issue of .go non-reproducibility. The problem with the package cache seems to be different. Sorry for the confusion! After --check, we can compare both caches like this: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (define a (load-compiled "/gnu/store/0yd3kaar87zyxhbrj= qjypp5rar3zj4gb-guix-package-cache/lib/guix/package.cache")) scheme@(guile-user)> (define b (load-compiled "/gnu/store/0yd3kaar87zyxhbrj= qjypp5rar3zj4gb-guix-package-cache-check/lib/guix/package.cache")) scheme@(guile-user)> (length a) $2 =3D 13949 scheme@(guile-user)> (length b) $3 =3D 13949 scheme@(guile-user)> ,use(srfi srfi-1) scheme@(guile-user)> (lset=3D equal? a b) $4 =3D #f scheme@(guile-user)> (car (lset-difference equal? a b)) $5 =3D #("python2" "2.7.17" (gnu packages python) python-2 ("out" "tk") #t = #f "gnu/packages/python.scm" 107 2) --8<---------------cut here---------------end--------------->8--- So, surprisingly, it=E2=80=99s not just an ordering issue: the caches do co= ntain different pieces of information. This patch solves the ordering issue: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages.scm b/gnu/packages.scm index d22c992bb1..5154d73deb 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -407,13 +407,25 @@ reducing the memory footprint." (_ result+seen))) + (define entry-key + (match-lambda + (#(name version module symbol outputs supported? deprecated? + file line column) + (string-append name version (or file "") + (if line (number->string line) ""))))) + + (define (entry