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

stage0 run-make compiletest broken #122196

Closed
bjorn3 opened this issue Mar 8, 2024 · 2 comments · Fixed by #122248
Closed

stage0 run-make compiletest broken #122196

bjorn3 opened this issue Mar 8, 2024 · 2 comments · Fixed by #122248
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@bjorn3
Copy link
Member

bjorn3 commented Mar 8, 2024

COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 tests/run-make no longer works. librun_make_support.rlib is compiled using the bootstrap rustc wrapper which sets --sysroot build/$HOST_TRIPLE/stage0-sysroot, but then compiletest will compile rmake.rs using the sysroot of the bootstrap compiler causing it to not find the libstd.rlib against which librun_make_support.rlib is compiled.

This regressed with #113026. (cc @jieyouxu)

@bjorn3 bjorn3 added the C-bug Category: This is a bug. label Mar 8, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 8, 2024
@bjorn3
Copy link
Member Author

bjorn3 commented Mar 8, 2024

@jieyouxu
Copy link
Member

jieyouxu commented Mar 8, 2024

From the zulip comment

Pass the right --sysroot when compiling rmake.rs, use the bootstrap rustc wrapper in compiletest too? Or something else?

Passing the right --sysroot might be the least disruptive solution (would anything wonky happen if we use bootstrap rustc wrapper in compiletest too?), but I'm not sure if this is the best solution.

@jieyouxu jieyouxu added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 8, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 17, 2024
…ulacrum

Respect stage0 sysroot when compiling rmake.rs with COMPILETEST_FORCE_STAGE0

Context: <https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/stage0.20compiletest.20broken>.
> cg_clif uses `COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0` for running the rustc test suite. With the introduction of rmake.rs this broke. `librun_make_support.rlib` is compiled using the bootstrap rustc wrapper which sets `--sysroot build/aarch64-unknown-linux-gnu/stage0-sysroot`, but then compiletest will compile `rmake.rs` using the sysroot of the bootstrap compiler causing it to not find the `libstd.rlib` against which `librun_make_support.rlib` is compiled.

cc `@bjorn3`

Fixes rust-lang#122196.
@bors bors closed this as completed in a5dbdc2 Mar 17, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 17, 2024
Rollup merge of rust-lang#122248 - jieyouxu:rmake-sysroot, r=Mark-Simulacrum

Respect stage0 sysroot when compiling rmake.rs with COMPILETEST_FORCE_STAGE0

Context: <https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/stage0.20compiletest.20broken>.
> cg_clif uses `COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0` for running the rustc test suite. With the introduction of rmake.rs this broke. `librun_make_support.rlib` is compiled using the bootstrap rustc wrapper which sets `--sysroot build/aarch64-unknown-linux-gnu/stage0-sysroot`, but then compiletest will compile `rmake.rs` using the sysroot of the bootstrap compiler causing it to not find the `libstd.rlib` against which `librun_make_support.rlib` is compiled.

cc ``@bjorn3``

Fixes rust-lang#122196.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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.

3 participants