Overview
Reproducible builds, also known as deterministic compilation, is a process of building software which ensures the resulting binary code can be reproduced. Source code compiled deterministically will always output the same binary.
Reproducible builds can act as part of a chain of trust; the source code can be signed, and deterministic compilation can prove that the binary was compiled from trusted source code. Verified reproducible builds provide a strong countermeasure against attacks where binaries do not match their source code, e.g., because an attacker has inserted malicious code into a binary.
This is a relevant attack; attackers sometimes attack binaries but not the source code, e.g., because they can only change the distributed binary or to evade detection since it is the source code that developers normally review and modify. In a survey of 17 experts, reproducible builds had a very high utility rating from 58.8% participants, but also a high-cost rating from 70.6%. Various efforts are being made to modify software development tools to reduce these costs.
5 sources for this section
- 1Reproducible builds — Wikipedia, revision 1369484582
- 2"reproducible-builds.org". reproducible-builds.org. Archived from the original on 20 May 2016. Retrieved 22 August 2016. Reproducible builds are a set of software development practices which create a verifiable path from human readable source code to the binary code used by computers....build system needs to be made entirely deterministic: transfor
- 3Lamb, Chris; Zacchiroli, Stefano (March 2022). "Reproducible Builds: Increasing the Integrity of Software Supply Chains". IEEE Software. 39 (2): 62–70. arXiv:2104.06020. doi:10.1109/MS.2021.3073045. S2CID 233219473. Retrieved 26 March 2023.
- 4Ratliff, Emily (4 April 2016). "Establishing Correspondence Between an Application and its Source Code | SecurityWeek.com". www.securityweek.com. SecurityWeek. Archived from the original on 20 September 2016. Retrieved 22 August 2016.
- 5Ladisa, Piergiorgio; Plate, Henrik; Martinez, Matias; Barais, Olivier (19 April 2022). "SoK: Taxonomy of Attacks on Open-Source Software Supply Chains". 2023 IEEE Symposium on Security and Privacy (SP). pp. 1509–1526. arXiv:2204.04008. doi:10.1109/SP46215.2023.10179304. ISBN 978-1-6654-9336-9.
Methods
For the compilation process to be deterministic, the input to the compiler must be the same, regardless of the build environment used. This typically involves normalizing variables that may change, such as order of input files, timestamps, locales, and paths.
Additionally, the compilers must not introduce non-determinism themselves. This sometimes happens when using hash tables with a random hash seed value. It can also happen when using the address of variables because that varies from address space layout randomization (ASLR).
Build systems, such as Bazel, GNU Guix, and Gitian, can be used to automate deterministic build processes.
History
The GNU Project used reproducible builds in the early 1990s. Changelogs from 1992 indicate the ongoing effort.
One of the older projects to promote reproducible builds is the Bitcoin project with Gitian, and later, GNU Guix. In 2013, the Tor (anonymity network) project started using Gitian for their reproducible builds.
Starting in 2011, a reproducible Java build system was developed for the decentralized peer-to-peer FOSS project DirectDemocracyP2P. The concepts of the system's application to automated updates recommendation support was first presented in April 2013 at Decentralized Coordination. A treatise focusing on the implementation details of the reproducible Java compilation tool itself was published in 2015.
8 sources for this section
- 1Reproducible builds — Wikipedia, revision 1369484582
- 7Gilmore, John (2017-01-24). "SOURCE_PREFIX_MAP and Occam's Razor". rb-general (Mailing list).
- 8"LICENSE-file of the Gitian-Project". GitHub. Retrieved 2019-12-03.
- 9Deterministic Builds Part Two: Technical Details.
- 10"DDP2P". GitHub. 2011.
- 11"Security by Decentralized Certification of Automatic-Updates for Open Source Software controlled by Volunteers". Citeseer.
- 12Silaghi, Marius C.; Alhamed, Khalid; Dhannoon, Osamah; Qin, Song; Vishen, Rahul; Knowles, Ryan; Hussien, Ihsan; Yang, Yi; Matsui, Toshihiro; Yokoo, Makoto; Hirayama, Katsutoshi (2013). "DirectDemocracyP2P—Decentralized deliberative petition drives—". IEEE P2P 2013 Proceedings. pp. 1–2. doi:10.1109/P2P.2013.6688733. ISBN 978-1-4799-0515-7.
Challenges
In some cases other changes must be made to make a build process reproducible. For example, some data structures do not guarantee a stable order in each execution. A typical solution is to modify the build process to specify a sorted output from those structures.
2 sources for this section
The source notesEvidence & further reading14 sources
- Reproducible builds — Wikipedia, revision 1369484582 Wikipedia contributors · Reference source · accessed 2026-09-22
- "reproducible-builds.org". reproducible-builds.org. Archived from the original on 20 May 2016. Retrieved 22 August 2016. Reproducible builds are a set of software development practices which create a verifiable path from human readable source code to the binary code used by computers....build system needs to be made entirely deterministic: transfor reproducible-builds.org · Reference source · link imported 2026-09-22
- Lamb, Chris; Zacchiroli, Stefano (March 2022). "Reproducible Builds: Increasing the Integrity of Software Supply Chains". IEEE Software. 39 (2): 62–70. arXiv:2104.06020. doi:10.1109/MS.2021.3073045. S2CID 233219473. Retrieved 26 March 2023. hal.science · Reference source · link imported 2026-09-22
- Ratliff, Emily (4 April 2016). "Establishing Correspondence Between an Application and its Source Code | SecurityWeek.com". www.securityweek.com. SecurityWeek. Archived from the original on 20 September 2016. Retrieved 22 August 2016. securityweek.com · Reference source · link imported 2026-09-22
- Ladisa, Piergiorgio; Plate, Henrik; Martinez, Matias; Barais, Olivier (19 April 2022). "SoK: Taxonomy of Attacks on Open-Source Software Supply Chains". 2023 IEEE Symposium on Security and Privacy (SP). pp. 1509–1526. arXiv:2204.04008. doi:10.1109/SP46215.2023.10179304. ISBN 978-1-6654-9336-9. arxiv.org · Reference source · link imported 2026-09-22
- "Gitian: a secure software distribution method". gitian.org. Retrieved 2018-01-10. gitian.org · Reference source · link imported 2026-09-22