Bootstrap sometimes fails to build miri because of "nightly" feature confusion #118129
Closed
Description
opened on Nov 21, 2023
Step to reproduce:
rm build/host/stage0* -rf
./x.py check library/std compiler/rustc src/tools/miri
Now Miri fails to build with >1800 errors. The first ones are:
error[E0464]: multiple candidates for `rmeta` dependency `rustc_ast` found
--> src/tools/miri/src/lib.rs:53:1
|
53 | extern crate rustc_ast;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: candidate #1: /home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_ast-11854d11a3563889.rmeta
= note: candidate #2: /home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_ast-feb80e66ce1c74d4.rmeta
error[E0464]: multiple candidates for `rmeta` dependency `rustc_const_eval` found
--> src/tools/miri/src/lib.rs:54:1
|
54 | extern crate rustc_const_eval;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: candidate #1: /home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_const_eval-078a7b0d61866866.rmeta
= note: candidate #2: /home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_const_eval-2fa8de12acbc8979.rmeta
error[E0464]: multiple candidates for `rmeta` dependency `rustc_data_structures` found
--> src/tools/miri/src/lib.rs:55:1
|
55 | extern crate rustc_data_structures;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: candidate #1: /home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_data_structures-93605ddb6ab78ed8.rmeta
= note: candidate #2: /home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_data_structures-e65a21da042ec502.rmeta
error[E0464]: multiple candidates for `rmeta` dependency `rustc_errors` found
--> src/tools/miri/src/lib.rs:56:1
|
56 | extern crate rustc_errors;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: candidate #1: /home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_errors-792f00940afc5752.rmeta
= note: candidate #2: /home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_errors-ddd5d12697277ea9.rmeta
error[E0464]: multiple candidates for `rmeta` dependency `rustc_hir` found
--> src/tools/miri/src/lib.rs:57:1
|
57 | extern crate rustc_hir;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: candidate #1: /home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_hir-37bcaf20f0254cb3.rmeta
= note: candidate #2: /home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_hir-6f8ad5718a5b342e.rmeta
However, if I now run ./x.py check miri
, everything is fine. rm build/host/stage0* -rf && ./x.py check miri
is also fine. Something about explicitly giving the three paths to build is throwing bootstrap off. And even more strangely, the same sequence of commands worked fine before #116828.
Cc @rust-lang/bootstrap
Activity