-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Nightly rustc-dev
can't be used in cross-compilation
#132728
Comments
maybe cc #75247 |
Cross-compilation of tools that link against rustc internal libraries is fundamentally impossible outside of the context of building rustc itself. Rustc uses several proc-macros. Proc-macros need to be compiled for the host rather than the target. It is unreasonable to compile a copy of the proc-macros for each possible system which you want to cross-compile from. Aside from the fact that rustc itself doesn't currently support recording the hashes of all these proc-macro versions in the crate metadata. There is the |
Does that mean that it could be possible for Or at least, should this issue be converted to a documentation issue? And/or could the error messages be improved? |
Yeah, I think it would make sense to omit rustc-dev-aarch64-unknown-linux-gnu from the rustup manifest for hosts other than aarch64-unknown-linux-gnu. |
I think? |
So would it be useful for me to make an issue on the |
The manifest is generated by code in this repo. Rustup only reads the manifest. |
Ah right, so the issue here is enough. I've never looked at the codebase here, so I don't suppose I'd be able to easily help out, though I'm certainly open to the possibility. |
Bug
I've made a minimal reproducible repo: https://github.com/tombh/nightly_cross_minimal_repro
Pasting
main.rs
:The build commands are here: https://github.com/tombh/nightly_cross_minimal_repro/blob/main/.github/workflows/ci.yml
Pasting the most relevant part:
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 findderive_where
: https://github.com/tombh/nightly_cross_minimal_repro/actions/runs/11463505291/job/31897508604#step:5:9Relevant Issues
rustup
issue: "Can't find crate forrustc_*
" when cross-compiling a crate withrustc_private
on rustup#3255. That is where it was suggested that this is rather arust
orcargo
issue.rustc_macros
whichrustc
depends on in rustc_llvm #62447The text was updated successfully, but these errors were encountered: