Nightly `rustc-dev` can't be used in cross-compilation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Bug
I've made a minimal reproducible repo: https://github.com/tombh/nightly_cross_minimal_repro
Pasting main.rs:
#![feature(rustc_private)]
extern crate rustc_ast;
extern crate rustc_driver;
extern crate rustc_macros;
fn main() {
println!("{}", rustc_ast::node_id::CRATE_NODE_ID)
}
The build commands are here: https://github.com/tombh/nightly_cross_minimal_repro/blob/main/.github/workflows/ci.yml
Pasting the most relevant part:
rustup toolchain install nightly-2024-09-30
rustup default nightly-2023-09-30
rustup target add aarch64-unknown-linux-gnu
rustup component add rust-src rustc-dev-aarch64-unknown-linux-gnu llvm-tools
...
cargo -v build --locked --release --target aarch64-unknown-linux-gnu
And here is the failing build: https://github.com/tombh/nightly_cross_minimal_repro/actions/runs/11463471346/job/31897390824#step:5:9
Also, just out of interest, here is a failing build with a more recent nightly (nightly-2024-10-21), it fails differently, it can't find derive_where: https://github.com/tombh/nightly_cross_minimal_repro/actions/runs/11463505291/job/31897508604#step:5:9
Relevant Issues
- The bug is being discussed in a
rustupissue: https://github.com/rust-lang/rustup/issues/3255. That is where it was suggested that this is rather arustorcargoissue. - #62447
- #70838
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the commands in .github/workflows/ci.yml against the minimal main.rs repository for the two nightly toolchains. Compare both failure modes, then read rustup#3255, #62447, and #70838 to establish component ownership and the expected cross-compilation behavior; done means the root cause and an actionable fix location are confirmed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100