-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Reproducible builds: Automatically remap $CARGO_HOME and $PWD #5505
Comments
Thanks for the report! I think this is plausible to do but currently if done naively I think it would break all debugger integrations, so we probably don't want to do this until that's fixed. |
Maybe we can do this only on release builds? |
If we can solve the debug problem, yes we may be able to do it by default on release builds as well. |
@alexcrichton debugging in rust depends on debug symbols, correct?
couldn't we remap those paths if |
Perhaps, but I believe they still show up in panic paths |
@alexcrichton Any additional colour on what could/would break wrt debuggers? I am somewhat surprised $PWD makes it into the binaries at all. Edit: |
@mfarrugi debuggers use the paths in debuginfo (which don't show up in |
The question is what to map the paths to. In Debian we install source code into |
these also look blocking rust-lang/rust#40374 |
I am also facing reproducible issue, reported in rust-lang/rust#102299 I tried adding |
@alexcrichton How can I make rust builds are reproducible? can you let me the procedure that you know or can u guide me?. The reproducible issue I faced is reported here rust-lang/rust#102299 |
We also have rust-lang/rust#111540 which might help |
Wonder if we should close this in favor of rust-lang/rust#111540 and #12137? |
Yea, closing since this is now implemented. |
As a followup of rust-lang/rust#41555, I think
$CARGO_HOME
and$PWD
(the location of the project) should be remapped to fixed values automatically.I found both of those paths inside binaries and I have to add boilerplate to all of my reprotest scripts to normalize them.
The motivation behind this is that alice and bob can both download the same release of a rust project,
cargo build --release
it and end up with a 100% identical binary, given a sufficiently similar build environment (rustc version and system libraries).The text was updated successfully, but these errors were encountered: