ludo@gnu.org (Ludovic Courtès) skribis: > ludo@gnu.org (Ludovic Courtès) skribis: > >> Jan Nieuwenhuizen skribis: >> >>> I have been building quite some versions of Guile the past week. There >>> re a couple of .go files that keep giving me problems wrt >>> nondeterminism: >>> >>> web/server/http.go >>> >>> (define *timer* (gettimeofday)) seemed suspect, but seems harmless. >>> >>> rnrs/arithmetic/fixnums.go >>> >>> make-implementation-restriction-violation seemed suspect, but commenting >>> it out does not seem to help. >>> >>> After commenting out all of http.scm and fixnums.scm, yesterday I had 3 >>> Guix builds on two machines (GuixSD and one Ubuntu+Guix) that were >>> bit-identical, but one build showed differences in >>> >>> system/repl/commands.go >>> >>> Apparently most of the time this file builds deterministicly, but some >>> times it does not!? Ideas? >> >> Did you look at these differences with diffoscope? That would be >> useful. > > I built it with ‘guix build --rounds=2 -K’ and got 17 differing .go > files. I looked at srfi/srfi-9/gnu.go with ediff + hexl-mode in Emacs > and found a dozen of “t-XYZ” and “tmp-XYZ” identifiers with a different > value for XYZ (an integer). To demonstrate non-reproducibility (with the attached patch, which is a rebased version of Mark’s), just build the same module twice: once with its dependency evaluated, and then with its dependency compiled. The results differ: --8<---------------cut here---------------start------------->8--- ludo@pluto ~/src/guile$ rm -f module/srfi/srfi-9/gnu.go module/srfi/srfi-9.go ludo@pluto ~/src/guile$ make -C module srfi/srfi-9/gnu.go make: Entering directory '/home/ludo/src/guile/module' GUILEC srfi/srfi-9/gnu.go wrote `srfi/srfi-9/gnu.go' make: Leaving directory '/home/ludo/src/guile/module' ludo@pluto ~/src/guile$ mv module/srfi/srfi-9/gnu.go{,.v1} ludo@pluto ~/src/guile$ make -C module srfi/srfi-9.go make: Entering directory '/home/ludo/src/guile/module' GUILEC srfi/srfi-9.go wrote `srfi/srfi-9.go' make: Leaving directory '/home/ludo/src/guile/module' ludo@pluto ~/src/guile$ make -C module srfi/srfi-9/gnu.go make: Entering directory '/home/ludo/src/guile/module' GUILEC srfi/srfi-9/gnu.go wrote `srfi/srfi-9/gnu.go' make: Leaving directory '/home/ludo/src/guile/module' ludo@pluto ~/src/guile$ mv module/srfi/srfi-9/gnu.go{,.v2} ludo@pluto ~/src/guile$ diff -u module/srfi/srfi-9/gnu.go.{v1,v2} Ciferecaj dosieroj module/srfi/srfi-9/gnu.go.v1 kaj module/srfi/srfi-9/gnu.go.v2 estas malsamaj --8<---------------cut here---------------end--------------->8--- In gnu.go.v2 the integers appended to generated symbols are lower because fewer symbols had to be generated. Ludo’.