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

Error when running ui tests after run-make-fulldeps #92644

Open
pietroalbini opened this issue Jan 7, 2022 · 1 comment
Open

Error when running ui tests after run-make-fulldeps #92644

pietroalbini opened this issue Jan 7, 2022 · 1 comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@pietroalbini
Copy link
Member

While running the test suite I noticed that executing the run-make-fulldeps suite before the ui suite causes the following tests to fail:

  • ui/allocator/no_std-alloc-error-handler-default.rs
  • ui/allocator/no_std-alloc-error-handler-custom.rs
error[E0464]: multiple matching crates for `libc`
  --> /.../src/test/ui/allocator/no_std-alloc-error-handler-default.rs:16:1
   |
LL | extern crate libc;
   | ^^^^^^^^^^^^^^^^^^
   |
   = note: candidates:
           crate `libc`: /.../build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-2383dbda905dd8ee.rlib
           crate `libc`: /.../build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-a96bf8e49971bcfd.rlib

error: aborting due to previous error

For more information about this error, try `rustc --explain E0464`.

After a quick investigation it seems like building rustc-demangler puts an extra copy of liblibc-HASH.rlib (with a different hash) in the stage2 libs directory, causing the UI test not to know which libc to link to.

Reproduction

Running this command (just the ui test before run-make-fulldeps) works:

./x.py --stage 2 test src/test/ui/allocator/no_std-alloc-error-handler-default.rs src/test/run-make-fulldeps

Running this command (run-make-fulldeps before the ui test) fails:

./x.py --stage 2 src/test/run-make-fulldeps test src/test/ui/allocator/no_std-alloc-error-handler-default.rs
@pietroalbini pietroalbini added A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. labels Jan 7, 2022
@jyn514 jyn514 added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Mar 30, 2023
@jyn514
Copy link
Member

jyn514 commented May 25, 2023

I am unclear: how did you get bootstrap to run the fulldeps test first? it should be run in a fixed order regardless of the order of the CLI arguments: #110229 (comment)

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 C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

2 participants