Re:NixOS Reproducible Builds: minimal ISO successfully indep...
by edgyquant on Sunday October 29, 2023 @01:05PM
(#38060518)
Why does this matter though? Why does order of compilation result in a different binary?
[ Parent
| on HN ]
Re:NixOS Reproducible Builds: minimal ISO successfully indep...
by speed_spread on Sunday October 29, 2023 @02:21PM
(#38061188)
Because order of completion of the parallel tasks is not guaranteed, if all tasks write to the same file you might get a different result each time.
Re:NixOS Reproducible Builds: minimal ISO successfully indep...
by kaba0 on Sunday October 29, 2023 @03:03PM
(#38061553)
Just some random, made up example: say you want to compile an OOP PL that has interfaces and implementations of that. You discover reachable implementations through static analysis, which is multi-threaded. You might discover implementations A,B,C in any order — but they will get their methods placed in the jump table based on this order. This will trivially result in semantically equivalent, but not binary-equivalent executables.
Of course there would have been better designs for this toy example, but binary reproducibility is/was usually not of the highest priority historically in most compiler infrastructures, and in some cases it might be a relatively big performance regression to fix, or simply just a too big refactor.