Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librustc_driver.so not reproducible #112098

Open
sundeep-kokkonda opened this issue May 30, 2023 · 1 comment
Open

librustc_driver.so not reproducible #112098

sundeep-kokkonda opened this issue May 30, 2023 · 1 comment
Labels
A-reproducibility Area: Reproducible / Deterministic builds requires-custom-config This issue requires custom config/build for rustc in some way

Comments

@sundeep-kokkonda
Copy link
Contributor

sundeep-kokkonda commented May 30, 2023

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: #98185

EDIT(AlbertLarsan68): Fixed the link

@workingjubilee workingjubilee added the A-reproducibility Area: Reproducible / Deterministic builds label May 30, 2023
@deltragon

This comment was marked as resolved.

@jyn514 jyn514 added the requires-custom-config This issue requires custom config/build for rustc in some way label May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-reproducibility Area: Reproducible / Deterministic builds requires-custom-config This issue requires custom config/build for rustc in some way
Projects
None yet
Development

No branches or pull requests

4 participants