Skip to content

Some bootstrap tests fail with custom rustc #105766

Closed
@cuviper

Description

@cuviper

Command

I tried this with Rust 1.66.0, simplified from my build for Fedora:

$ ./configure --local-rust-root=/usr
$ ./x test bootstrap

I expected to see this happen: passing tests

Instead, this happened: 20 builder::tests::... failures, all of this sort:

---- builder::tests::alias_and_path_for_library stdout ----
failed to execute command: "/builddir/build/BUILD/rustc-1.66.0-src/build/x86_64-unknown-linux-gnu/stage0/bin/rustc" "--target" "x86_64-unknown-linux-gnu" "--print" "target-libdir"
error: No such file or directory (os error 2)
thread 'main' panicked at 'status code: 1', lib.rs:1654:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

My stage0 should be using /usr/bin/rustc.

Version it worked on

It most recently worked on: Rust 1.65.0

Version with regression

rustc-1.66.0-src/version:

1.66.0 (69f9c33d7 2022-12-12)

I bisected this to #98483, commit 55c040e, which stopped using CARGO and RUSTC environment variables when building a Config.

Backtrace

Backtrace

thread 'main' panicked at 'status code: 1', lib.rs:1654:9
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: bootstrap::detail_exit
             at ./lib.rs:1654:9
   3: bootstrap::util::fail
             at ./util.rs:475:5
   4: bootstrap::util::output
             at ./util.rs:425:19
   5: bootstrap::Build::new
             at ./lib.rs:436:13
   6: bootstrap::builder::tests::configure_with_args
             at ./builder/tests.rs:18:27
   7: bootstrap::builder::tests::configure
             at ./builder/tests.rs:6:5
   8: bootstrap::builder::tests::alias_and_path_for_library
             at ./builder/tests.rs:142:55
   9: bootstrap::builder::tests::alias_and_path_for_library::{{closure}}
             at ./builder/tests.rs:140:1
  10: core::ops::function::FnOnce::call_once
             at /builddir/build/BUILD/rustc-1.65.0-src/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged +A-bootstrap

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions