-
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
bootstrap panic generating rustc docs while cross-compiling with x.py dist
#110071
Comments
n.b. I'm not sure I actually was using
instead. But this still shouldn't happen. |
x.py dist
x.py dist
I think this will be fixed by #109880. |
In general RustcDocs is pretty broken, see #108535 |
x.py dist
x.py dist
#109880 merged but this is still unfortunately still an issue :( reproduced with @catamorphism did you ever find a quick workaround? |
…ur-ozkan Set `RustcDocs` to only run on host `./x dist` currently crashes when cross compiling. Add the fix described by `@catamorphism` in rust-lang#110071. Fixes rust-lang#110071
Rollup merge of rust-lang#122129 - tgross35:rustcdocs-host-only, r=onur-ozkan Set `RustcDocs` to only run on host `./x dist` currently crashes when cross compiling. Add the fix described by `@catamorphism` in rust-lang#110071. Fixes rust-lang#110071
Set `RustcDocs` to only run on host `./x dist` currently crashes when cross compiling. Add the fix described by `@catamorphism` in rust-lang/rust#110071. Fixes #110071
With
RUST_BACKTRACE=full ./x.py dist --target riscv64gc-unknown-linux-musl --verbose
and the followingconfig.toml
file:the
rust-installer
command fails while installing docs because it can't find the target'scompiler-doc
directory. This makes sense because thecompiler-doc
directory is created in one of two places:https://github.com/rust-lang/rust/blob/master/src/bootstrap/doc.rs#L631
https://github.com/rust-lang/rust/blob/master/src/bootstrap/doc.rs#L780
and both of these are only invoked for the host (in the enclosing impls of each of those call sites,
ONLY_HOSTS
is set to true).So the problem is that the
dist::RustcDocs
step, which relies on the existence of thecompiler-doc
directory (see https://github.com/rust-lang/rust/blob/master/src/bootstrap/dist.rs#L150 ), is run for the target ( https://github.com/rust-lang/rust/blob/master/src/bootstrap/dist.rs#L140 ), but the steps that would create that directory have only been run for the host.I was able to fix this by adding
const ONLY_HOSTS: bool = true
inside theimpl Step for RustcDocs
( https://github.com/rust-lang/rust/blob/master/src/bootstrap/dist.rs#L130 ), so that rustc docs aren't generated for the target. I'm not sure if that's the right solution, and in general I'm unsure about the logic for which pieces of documentation are generated for the host and which ones for the target under cross-compilation.The end of the output, showing that
rust-installer
fails due to reading a nonexistent directory, is:The text was updated successfully, but these errors were encountered: