-
Notifications
You must be signed in to change notification settings - Fork 114
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
Pass --remap-path-prefix
to cargo
#1118
Conversation
scripts/common
Outdated
@@ -10,6 +10,9 @@ set -o pipefail | |||
# https://docs.rs/env_logger | |||
export RUST_LOG="${RUST_LOG:-info}" | |||
|
|||
# Reduce build nondeterminism by remapping paths so that they don't include local segments. | |||
export RUSTFLAGS="--remap-path-prefix=$PWD=/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to take into account any existing value of RUSTFLAGS
(same concern about stomping on user-specified values also applies to scripts/run_tests_tsan
btw)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, done.
This is meant to reduce nondeterminism across machines or docker vs host, but it does not seem to fully solve the problem yet (it does remove some paths from the resulting binary, so I think it is necessary, but not sufficient). Ref project-oak#865
CI is failing and I have no idea what's going on or why it is related to this change. Even locally, it seems that running @daviddrysdale do you have any hint of what may be happening? |
It looks like the cargo cache is lost somehow. The
It looks like the |
Although the immediate fix will be for the cargo cache issue, we should probably also not rely on luck for inter-process synchronization. In bash-land something like this has worked for me in the past; doing something equivalent in |
I'm abandoning this for now, we may resurrect it in a different form in |
This is meant to reduce nondeterminism across machines or docker vs host, but it does not seem to fully
solve the problem yet (it does remove some paths from the resulting
binary, so I think it is necessary, but not sufficient).
Ref #865
Checklist
Cloudbuild
cover any TODOs and/or unfinished work.
construction.