Closed
Description
Description
There is some desire to build Lighthouse in a reproducible way. Making Lighthouse reproducible means that two source builds of Lighthouse at the same commit and with the same toolchain would produce bit-identical binaries.
This issue is an umbrella issue to track progress towards this goal, and document cases where Lighthouse can already be built reproducibly.
Working Reproducible Builds
- On my M1 Pro Mac, building Lighthouse twice in a row with
make reproducible
results in identical binaries.
Failing Reproducible Builds
- On my x86_64 Linux desktop, building Lighthouse twice in a row under Cross (
make build-x86_64
) doesn't produce an identical binary. - On my x86_64 Linux desktop, building Lighthouse twice in a row on the host (
make reproducible
) doesn't produce an identical binary. - Building with Cross on our release builder also doesn't produce the same binary as one built locally with Cross.
Steps to resolve
Unclear.
I have no idea why the Cross builds are more variable than the macOS builds, when one would naively expect the Docker image to provide a stable toolchain/etc. Perhaps the default Linux linker is more random by default than the macOS linker?