Bugzilla – Bug 1188621
gcc11/go does not build reproducibly
Last modified: 2021-11-07 14:25:06 UTC
I built gcc11 with nopgo=1 rbk as with previous gcc versions but this time, there are variations left in /usr/lib/go/11/x86_64-suse-linux/crypto/x509.gox @@ -1290,7 +1290,7 @@ 05050 73633a30 78313e20 3c747970 65203133 sc:0x1> <type 13 05060 303e2920 52656164 55696e74 3820286f 0>) ReadUint8 (o 05070 7574203c 6573633a 3078313e 203c7479 ut <esc:0x1> <ty - 05080 70652031 35313e29 203c7479 7065202d pe 151>) <type - + 05080 70652031 35323e29 203c7479 7065202d pe 152>) <type - 05090 31353e0a 2066756e 63202873 203c6573 15>. func (s <es 050a0 633a3078 393e203c 74797065 20313330 c:0x9> <type 130 050b0 3e292052 65616441 534e3142 6f6f6c65 >) ReadASN1Boole /usr/lib64/gcc/x86_64-suse-linux/11/32/libgo.a/runtime.o 05400 6e74696d 652e5f43 5f6c6f6e 67005f43 ntime._C_long._C 05410 5f6c6f6e 67000972 756e7469 6d650972 _long..runtime.r - 05420 756e7469 6d652e5f 435f6c6f 6e670000 untime._C_long.. - 05430 2a097275 6e74696d 65097275 6e74696d *.runtime.runtim - 05440 652e5f63 6f6f6b69 655f696f 5f66756e e._cookie_io_fun - 05450 6374696f 6e735f74 005f636f 6f6b6965 ctions_t._cookie ... /usr/lib64/gcc/x86_64-suse-linux/11/32/libgo.a/syscall.o /usr/lib64/gcc/x86_64-suse-linux/11/32/libgo.a/x509.o /usr/lib/libgo.so.19.0.0 My tools said, the diffs go away when disabling ASLR and leaving the filesystem readdir order unchanged across builds, so there could be some ordering issues. (Sometimes the tools can err, though)
I couldn't reproduce with a single multiple build w/o PGO (and LTO for the record), but that might have been lucky.
It seems, it is mostly related to filesystem readdir order (maybe some influence from ASLR). Try using 2 different ext4 filesystems or use disorderfs in shuffle mode.