librustc_driver.so not reproducible #112098
Labels
A-reproducibility
Area: Reproducible / deterministic builds
requires-custom-config
This issue requires custom config/build for rustc in some way
rustc-driver.zip
Hello,
The librustc_driver-***.so is not reproducible between different builds when using vendor sources on rust tarball (Without Vendor sources it's reproducible).
The attached script 'issue-reproducible.sh' will reproduce the issue (See attachment rustc-driver.zip and I've used rust 1.69.0 sources). Since the only difference between the builds is 'build-path', by adding a '--remap-path-prefix' command in src/bootstrap/builder.rs file fixed the issue. The 'issue-fixed.sh' script will generate the reproducible binaries.
Since this issue happens only with vendor sources between different build paths in same host, it is clear that some crate is depending on local build path and generating a different assembly code.
I've analyzed the librustc_driver-***.so files and found the .rustc section is differed. But, I couldn't figure out which crate is causing this issue. The *.rlib & *.rmeta files generated during stage0/1 also showing a lot of differences and couldn't figure out which crate causing this issue.
It might be a bug in rust. What could be the reason that causing this issue when using vendor sources? Let me know is there anyway I can figure it out.
There was some similar issue here: rust-lang/cargo#15122
EDIT(AlbertLarsan68): Fixed the link
The text was updated successfully, but these errors were encountered: