Questions tagged [binary-reproducibility]

the goal or quality of consistently reproducing identical build output given identical source input, or often more specifically the goal of byte-for-byte identical executable files when built repeatedly, perhaps on different machines or at different times

Binary reproducibility is the goal or quality of consistently reproducing identical build output given identical source input, or often more specifically the goal of byte-for-byte identical executable files (or identical checksums, hashes or other digests of those files) when built repeatedly, perhaps on different machines or at different times. The process by which this is achieved is often called a deterministic build or reproducible build.

For software subject to a requirement to be able to determine whether an arbitrary executable resulted from building a specific set of sources, binary reproducibility provides a straightforward, easily explained answer to that requirement. This requirement is often applied to software that is security-sensitive (e.g. Bitcoin Core, Tor), or used in a heavily regulated market (e.g. avionics, health care equipment, licensed gambling).

A number of tools or elements involved in builds may hamper this goal for a variety of reasons. Inclusion of environmental information such as timestamps, compiler versions, user and computer names and absolute paths is common, as is inclusion of a random UUID on every run to simplify matching of an executable with related files such as detached debug symbols or platform-specific native images. Many compilers produce nondeterministic compiler-generated symbol names, either for constructs explicitly defined but not named by in source code, or as an artifact of an implementation detail not surfaced in source code at all. Finally, highly optimizing compilers may employ nondeterministic optimization techniques such as Monte Carlo simulation guided optimization or profile guided optimization.

66 questions
2
votes
1 answer

Pytorch - Not able to achieve reproducibility

I am a training a image classifier model using Pytorch. While training it I am not able to set the seed. I have exploited all my options but still not getting any consistent results. Please help me with the same. I was using this but my model is…
2
votes
1 answer

Ensuring reproducible builds using NuGet packages

I have a .NET app called Application. This application depends on two NuGet packages: Database, version 2.* Logging, version 3.* The Database package depends on two additional packages: DTO, version 1.* DAL, version 4.* Currently, Application…
dymanoid
  • 14,771
  • 4
  • 36
  • 64
2
votes
1 answer

How to get reproducible builds while using unnamed namespaces with MSVC?

workerFunc is a function in the unnamed namespace. The MSVC compiler (Version 19.16.27026.1 for x64) was used to generate two object files from the same translation unit, one per machine. Here are symbol names that compiler has produced for the same…
2
votes
0 answers

How do I prevent cargo fmt from changing the compiled binary?

I reformatted my code base with rustfmt 0.4.1-stable and had a huge diff that is hard to check by eye. A long time ago, I had a similar problem after cargo fmt produced a huge diff. At that time, I solved it by: cargo build --release strip -s…
user1244932
  • 7,352
  • 5
  • 46
  • 103
2
votes
0 answers

Rscript and simple graph

[edit 3] At this point, it is possible for me to use the commands: library(Cairo) CairoPNG("test.png") pie( 1:10, labels=paste("label number",1:10)) dev.off() to obtain the same figure quality. Someone with apparently the same problem:…
Gildas
  • 998
  • 10
  • 16
2
votes
1 answer

Reproducible builds with Visual Studio - object file difference

I am trying to ensure that two different machines produce identical builds. I have tried to make the environment as similar as possible but I still see some differences in the generated .obj and .exe files. I have been able to rule out embedded path…
Zitrax
  • 19,036
  • 20
  • 88
  • 110
2
votes
4 answers

Why does every build change the exe-file?

Building the same project (without any changes) produces binary different exe-files: some small regions of them are different. Empty project, version information (and auto-increment on every build) is turned off. Why it happens? And is it possible…
valentyn
  • 55
  • 4
1
vote
1 answer

Potential downsides of /BREPRO MSVC linker option?

I have been investigating sources of non-reproducibility in our product's build process. It's a mostly C# app but it also has some C++ DLL's that we build ourselves. I came across some mentions of an undocumented flag for the MSVC linker called…
marzipan
  • 49
  • 2
1
vote
1 answer

Seed in tensorflow initializer (tf.keras.initializers) doesn't guarantees reproducible results

looking at tensorflow documentation (see, e.g., https://www.tensorflow.org/api_docs/python/tf/keras/initializers/GlorotNormal) a seed should guarantee that "multiple initializers will produce the same sequence when constructed with the same seed…
1
vote
0 answers

Reproducible issues with Python statsmodel and Docker

I'm running some Python statsmodel code in a Docker container. When I run this code on two different computers (using the same Docker container pulled from DockerHub, not built locally 2x), I am getting different results. The differences are tiny -…
1
vote
0 answers

linter to warn about non-deterministic behaviour

Is there a linter/helper which warns about non-deterministic behaviour in Go programs? My aim is to have reproducible output in a tool used for reproducible builds. I would like the linter to warn about use of random number generators, use of…
jochen
  • 3,728
  • 2
  • 39
  • 49
1
vote
1 answer

Latex \today macro expanding to December 31st, 1979

With latex installed through the nix package manager (on nixos), \today always expands to December 31st, 1979. How do I get this to return the correct date? MWE Create a directory and add the mwe.tex and flake.nix (based off…
voidee123
  • 13
  • 2
1
vote
0 answers

Is it possible to check if the source code matches the App version?

Germany (SAP / Telekom) built a Corona-App. It's available in the Android Store and the code is on Github. Is it possible to check if the code on Github matches the code in the Android Store?
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
1
vote
0 answers

CMake / G++ reproducible build issue with changing build path

For quite some time I have been investigating with limited success reproducible build issue I have with a software I am packaging for Debian. Reproducibility is affected when build path changes, and result is the below differences (reported using…
Nicolas
  • 39
  • 2
  • 5
1
vote
0 answers

Identify / Remove differences in identically build .NET exe's

I am back trying to compare two .exe's, this time with some changes. Building project in Microsoft Visual Studio 2010 Project target framework = .NET Framework 3.5 Client Profile I build the project, run dumpbin /rawdata on the .exe and output to…
ZayJay
  • 199
  • 1
  • 6