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

PR #94122 Broke cargo -Z build-std #94219

Closed
ivmarkov opened this issue Feb 21, 2022 · 5 comments · Fixed by #94220
Closed

PR #94122 Broke cargo -Z build-std #94219

ivmarkov opened this issue Feb 21, 2022 · 5 comments · Fixed by #94220
Labels
C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression.

Comments

@ivmarkov
Copy link
Contributor

I don't know how that's possible, but #94122 broke cargo -Z build-std, so all our CIs currently fail with:

...
Compiling rustc-demangle v0.1.21
   Compiling thiserror-impl v1.0.30
   Compiling strum_macros v0.23.1
   Compiling ureq v2.4.0
   Compiling rustc-std-workspace-alloc v1.99.0 (/home/ivan/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-alloc)
   Compiling panic_abort v0.0.0 (/home/ivan/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_abort)
   Compiling panic_unwind v0.0.0 (/home/ivan/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_unwind)
   Compiling std_detect v0.1.5 (/home/ivan/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/stdarch/crates/std_detect)
   Compiling hashbrown v0.12.0
   Compiling thiserror v1.0.30
error[E0463]: can't find crate for `miniz_oxide`
   --> /home/ivan/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/lib.rs:369:1
    |
369 | extern crate miniz_oxide;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

...

Commenting out the three lines this PR introduces allows the STD build to proceed normally.

@ivmarkov ivmarkov added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Feb 21, 2022
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Feb 21, 2022
@GuillaumeGomez
Copy link
Member

How a rustdoc tag can break a normal build? O.o

@ivmarkov
Copy link
Contributor Author

Well, I can dig a bit further - but - if I trust my eyes - commenting these three lines allows the build to continue?

And - strictly speaking - is it just a rustdoc tag? You are declaring a crate as extern.

@GuillaumeGomez
Copy link
Member

Ok, I think I know where the problem comes from: miniz_oxide is an optional dependency and it should have been taken into account...

@bors bors closed this as completed in ed35309 Feb 22, 2022
@camelid camelid removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Feb 22, 2022
@camelid
Copy link
Member

camelid commented Feb 22, 2022

It seems that maybe it'd be a good idea to test -Z build-std in CI somehow so this sort of thing doesn't happen again?

@GuillaumeGomez
Copy link
Member

@camelid Agreed. The difficult part is that I think it'd require a whole new CI run. To be discussed with infra...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants