You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For me currently x b --stage 1 library/std works fine, while x c --stage 1 library/std with a lot of errors related to core not being found.
error: could not compile ppv-lite86 due to 750 previous errors
error: could not compile test due to 60 previous errors
error: could not compile proc_macro due to 2 previous errors
This is the commit that I'm trying to check: c68cd2f
I had the same problem previously too, but it usually solves magically after rebase / x clean / etc. However the usual "reboot router" kind of solutions doesn't seem to help this time :')
Found the issue. I broke this when I added --all-targets in #88094. Not exactly sure why it's breaking, but it seems fine to me to only run --all-targets in stage 0.
That works fine and makes it ok not to call add_to_sysroot in check, but the same step is missing before checking tests and examples. That would be an alternate fix; call builder.ensure(compile::Std) before --all-targets, not just before building the compiler.
Hmm, I wonder if we should start using --extern noprelude:core in bootstrap to avoid all these sysroot shenanigans. It would make the code a lot simpler I think, and avoid having to compile things twice.
@jyn514 is the fix here to still only run --all-targets in stage0, or is your latest comment a better solution? If the latter, is that an easy solution? This is my first contribution to rust so I'm not well versed on how bootstrap, or anything else for that matter, works.
Activity
[-]checking std doesn't work[/-][+]`x check --stage 1 std` doesn't work[/+]ehuss commentedon Jun 30, 2022
It's not really clear to me how #81064 was supposed to work, but commenting out this line makes it work for me.
jyn514 commentedon Jul 14, 2022
Found the issue. I broke this when I added
--all-targetsin #88094. Not exactly sure why it's breaking, but it seems fine to me to only run--all-targetsin stage 0.Mentoring instructions: change
rust/src/bootstrap/check.rs
Line 143 in 601c5a2
jyn514 commentedon Jul 14, 2022
The way it works is by building all of libstd before checking the compiler:
rust/src/bootstrap/check.rs
Lines 195 to 202 in 601c5a2
That works fine and makes it ok not to call
add_to_sysrootin check, but the same step is missing before checking tests and examples. That would be an alternate fix; callbuilder.ensure(compile::Std)before--all-targets, not just before building the compiler.jyn514 commentedon Jul 14, 2022
Hmm, I wonder if we should start using
--extern noprelude:corein bootstrap to avoid all these sysroot shenanigans. It would make the code a lot simpler I think, and avoid having to compile things twice.jo3bingham commentedon Jul 15, 2022
@rustbot claim
jo3bingham commentedon Jul 15, 2022
@jyn514 is the fix here to still only run
--all-targetsin stage0, or is your latest comment a better solution? If the latter, is that an easy solution? This is my first contribution torustso I'm not well versed on how bootstrap, or anything else for that matter, works.jyn514 commentedon Jul 15, 2022
@jo3bingham my second comment is a harder but more correct solution. I would accept either as PRs, neither are terribly hard.
(My third comment about sysroots I think is the ideal solution, but involves several large refactors to bootstrap and isn't a good first PR.)
jyn514 commentedon Jul 15, 2022
Take a look at the bootstrapping section of the dev guide, especially the bit about contributing: https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#contributing-to-bootstrap
Rollup merge of rust-lang#99293 - jo3bingham:issue-98720-fix, r=jyn514
jo3bingham commentedon Aug 2, 2022
Fixed by #99293. I forgot to link the issue in the PR, but this can be closed now that it has merged.