From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#20272: Support reproducible builds Date: Wed, 03 Feb 2016 21:41:33 -0500 Message-ID: <87d1sdqjs2.fsf@netris.org> References: <87twws88hr.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1454553740 13096 80.91.229.3 (4 Feb 2016 02:42:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Feb 2016 02:42:20 +0000 (UTC) Cc: 20272@debbugs.gnu.org To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Feb 04 03:42:11 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aR9s2-0001G3-E8 for guile-bugs@m.gmane.org; Thu, 04 Feb 2016 03:42:10 +0100 Original-Received: from localhost ([::1]:39100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR9s1-0000vk-4R for guile-bugs@m.gmane.org; Wed, 03 Feb 2016 21:42:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR9rx-0000vf-Jm for bug-guile@gnu.org; Wed, 03 Feb 2016 21:42:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aR9ru-000252-EC for bug-guile@gnu.org; Wed, 03 Feb 2016 21:42:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR9ru-00024y-Af for bug-guile@gnu.org; Wed, 03 Feb 2016 21:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aR9ru-0007sR-3i for bug-guile@gnu.org; Wed, 03 Feb 2016 21:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 04 Feb 2016 02:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20272 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 20272-submit@debbugs.gnu.org id=B20272.145455370930261 (code B ref 20272); Thu, 04 Feb 2016 02:42:02 +0000 Original-Received: (at 20272) by debbugs.gnu.org; 4 Feb 2016 02:41:49 +0000 Original-Received: from localhost ([127.0.0.1]:58569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aR9rh-0007s0-FV for submit@debbugs.gnu.org; Wed, 03 Feb 2016 21:41:49 -0500 Original-Received: from world.peace.net ([50.252.239.5]:57447 ident=hope0) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aR9rg-0007rt-7d for 20272@debbugs.gnu.org; Wed, 03 Feb 2016 21:41:48 -0500 Original-Received: from [10.1.10.78] (helo=jojen) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aR9rY-0004v0-WF; Wed, 03 Feb 2016 21:41:41 -0500 In-Reply-To: <87twws88hr.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 07 Apr 2015 13:48:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7949 Archived-At: ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Currently .go files embed randomly-generated symbols stemming from > =E2=80=98syntax-session-id=E2=80=99, which prevents reproducible builds (= see > .) > > One way to fix it would be to allow users to specify a random seed used > when generating session ids, and to make that available as a > command-line option to =E2=80=98guild compile=E2=80=99. (GCC does someth= ing similar > with its =E2=80=98-frandom-seed=E2=80=99 option.) We could add this, but it is not analogous to the -frandom-seed option where it is okay to give it the same value everywhere. Users would need to ensure that distinct session-ids are used for every invocation of Guile. More precisely, users of this feature would need to observe the following restriction, or else unspecified behavior may result: If A.go is generated by a Guile session with session-id A, and B.go is generated by a Guile session with session-id B, and they are both loaded into a Guile session with session-id C, then A, B, and C must all be distinct session-ids. One more thing: even with a deterministic session-id, the multi-threaded compiling of *.go files recently added to Guix will lead to non-deterministic outputs. I'm not sure how to make this work deterministically with concurrency. Even if we switched to a fixed number of concurrent processes with one thread each, when process A attempts to load a .go file that is produced by process B, it is not deterministic whether it will be there. If it is there, the macros in that .go file will contain B's session-id, and if not, they will contain A's session-id. > Probably, =E2=80=98syntax-session-id=E2=80=99 would have to be a SRFI-39 = parameter This might adversely affect the efficiency of our macro expander on platforms with slow thread local variables, and I'm not sure what it would buy us. If the idea is that it would allow us to build things in multiple threads, I think that won't work anyway, for the reasons given above. I'm not entirely sure I've not made a mistake in my thinking, however. Regards, Mark