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

Miri does not figure out its sysroot at build time #61830

Closed
RalfJung opened this issue Jun 14, 2019 · 3 comments · Fixed by #61832
Closed

Miri does not figure out its sysroot at build time #61830

RalfJung opened this issue Jun 14, 2019 · 3 comments · Fixed by #61832
Labels
A-miri Area: The miri tool C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@RalfJung
Copy link
Member

The currently shipped Miri is broken, it fails to detect its sysroot because RUST_SYSROOT was not set at build time:

thread 'main' panicked at 'could not find sysroot. Either set `MIRI_SYSROOT` at run-time, or at build-time specify `RUST_SYSROOT` env var or use rustup or multirust', src/libcore/option.rs:1034:5

@oli-obk I thought bootstrap takes care of providing the env vars for that?

@RalfJung
Copy link
Member Author

Hm, no, I cannot find any trace of a RUST_SYSROOT env var in current or past bootstrap.

Looks like the miri driver itself as shipped never had a proper sysroot set, it always relied on cargo miri providing one.

@jonas-schievink jonas-schievink added A-miri Area: The miri tool T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. labels Jun 14, 2019
@RalfJung
Copy link
Member Author

And anyway we cannot hard-code a sysroot at compile-time into a binary that we ship. ;)

And actually, just not doing anything should work here! miri and rustc are distributed in the same directory, so the existing sysroot computation should work. We just have to change miri to "trust" the default sysroot.

@RalfJung
Copy link
Member Author

rust-lang/miri#772 should hopefully fix this.

@RalfJung RalfJung mentioned this issue Jun 14, 2019
Centril added a commit to Centril/rust that referenced this issue Jun 16, 2019
Centril added a commit to Centril/rust that referenced this issue Jun 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-miri Area: The miri tool C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants