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

bootstrap: stage 0/1 doctests fail because of missing codegen backend #52186

Closed
RalfJung opened this issue Jul 9, 2018 · 3 comments · Fixed by #58238
Closed

bootstrap: stage 0/1 doctests fail because of missing codegen backend #52186

RalfJung opened this issue Jul 9, 2018 · 3 comments · Fixed by #58238
Labels
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)

Comments

@RalfJung
Copy link
Member

RalfJung commented Jul 9, 2018

To reproduce, make sure you have an entirely clean checkout -- I did rm -rf build/. Then run

./x.py --incremental --stage 0 test src/libcore

This will go on for a while and ultimately fail with

    Finished release [optimized] target(s) in 40.58s
     Running build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps/coretests-c81f2af9b50a498c

running 81 tests
.................................................................................
test result: ok. 81 passed; 0 failed; 0 ignored; 0 measured; 795 filtered out

   Doc-tests core
error: failed to find a `codegen-backends` folder in the sysroot candidates:
* /home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu
* /home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu
* /home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0-sysroot

error: test failed, to rerun pass '--doc'


command did not execute successfully: "/home/r/src/rust/rustc.2/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-j" "8" "--release" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/home/r/src/rust/rustc.2/src/libstd/Cargo.toml" "-p" "core" "--" "slice" "--quiet"
expected success, got: exit code: 101

Notably, it doesn't seem to build LLVM at all -- which may be why it can't find a codegen-backend...

@RalfJung
Copy link
Member Author

Turns out that ./x.py --incremental --stage 0 test src/libcore --no-doc works fine.

However, stage 0 tests with doctests still seem pretty much broken. Can these even reasonably work without having a "bootstrap rustdoc"?

@RalfJung RalfJung changed the title bootstrap: --stage 0 test src/libcore fails with obscure error message bootstrap: stage 0 doctests fail with obscure error message Jul 11, 2018
@RalfJung RalfJung changed the title bootstrap: stage 0 doctests fail with obscure error message bootstrap: stage 0 doctests fail because of missing codegen backend Jul 11, 2018
@estebank estebank 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) labels Jan 19, 2019
@RalfJung
Copy link
Member Author

RalfJung commented Feb 6, 2019

Cc @Mark-Simulacrum

@RalfJung
Copy link
Member Author

RalfJung commented Feb 6, 2019

Note that it fails in stage 1 as well -- both of these fail:

./x.py --stage 0 test src/libcore
./x.py --stage 1 test src/libcore

@RalfJung RalfJung changed the title bootstrap: stage 0 doctests fail because of missing codegen backend bootstrap: stage 0/1 doctests fail because of missing codegen backend Feb 6, 2019
bors added a commit that referenced this issue Feb 13, 2019
Fixes rustdoc in stage 0, stage 1

When a request for rustdoc is passed for stage 0, x.py build --stage 0
src/tools/rustdoc or ensure(tool::Rustdoc { .. }) with top_stage = 0, we
return the rustdoc for that compiler (i.e., the beta rustdoc).

This fixes stage 0 of #52186 as well as being part of general workflow improvements (making stage 0 testing for std work) for rustbuild.

The stage 1 fix (second commit) completely resolves the problem, so this fixes #52186.
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 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.

2 participants