Skip to content

cargo run -p bootstrap -- test tidy fails because it can't find the sysroot #94797

Closed

Description

@jyn514

I tried this:

cargo run -p bootstrap -- test tidy

I expected to see this happen: Tidy runs fine, just as if I'd run x test tidy.

Instead, this happened:

Building stage0 tool tidy (x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu))
   Compiling itoa v0.4.6
   Compiling lazy_static v1.4.0
   Compiling regex-syntax v0.6.25
   Compiling same-file v1.0.6
   Compiling cfg-if v1.0.0
   Compiling memchr v2.4.1
   Compiling ryu v1.0.5
   Compiling serde v1.0.125
error[E0463]: can't find crate for `core`

error[E0463]: can't find crate for `compiler_builtins`

error[E0463]: can't find crate for `core`
 --> /home/jnelson/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/inline_lazy.rs:8:1
  |
8 | extern crate core;
  | ^^^^^^^^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for `std`
 --> /home/jnelson/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/inline_lazy.rs:9:1
  |
9 | extern crate std;
  | ^^^^^^^^^^^^^^^^^ can't find crate

The problem is that src/bootstrap/build.rs is setting RUSTC to ~/.cargo/bin/rustc, not ~/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/bin/rustc, which breaks because rustbuild then can't find the appropriate sysroot.

cc #92260

@rustbot label: +A-bootstrap

Activity

  1. added 4 commits that reference this issue on Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions