Skip to content

./x dist --stage 2 $tool broken after #138224 #138778

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

Open
pietroalbini opened this issue Mar 21, 2025 · 1 comment · May be fixed by #140006
Open

./x dist --stage 2 $tool broken after #138224 #138778

pietroalbini opened this issue Mar 21, 2025 · 1 comment · May be fixed by #140006
Labels
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

Creating distribution tarballs of tools with ./x dist --stage 2 $tool broke after #138224. We (Ferrocene) know it fails at least with rustfmt and clippy. From what I can see, it stopped building the stage1 library, causing that failure.

Build log before the PR got merged:
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.07s
Building stage0 library artifacts (x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.05s
Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.26s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Building stage0 tool lld-wrapper (x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.12s
Building stage1 library artifacts (x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.03s
Building compiler artifacts (stage1 -> stage2, x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.24s
Building tool clippy-driver (stage1 -> stage2, x86_64-unknown-linux-gnu)
   Compiling clippy v0.1.87 (/home/pietro/r/github/rust-lang/rust/master/src/tools/clippy)
   Compiling clippy_lints v0.1.87 (/home/pietro/r/github/rust-lang/rust/master/src/tools/clippy/clippy_lints)
Build log after the PR got merged:
Building bootstrap
   Compiling bootstrap v0.0.0 (/home/pietro/r/github/rust-lang/rust/master/src/bootstrap)
    Finished `dev` profile [unoptimized] target(s) in 5.83s
Building stage0 library artifacts (x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.10s
Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.33s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Building stage0 tool lld-wrapper (x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.20s
Building tool clippy-driver (stage1 -> stage2, x86_64-unknown-linux-gnu)
   Compiling proc-macro2 v1.0.93
   Compiling unicode-ident v1.0.14
   Compiling serde v1.0.217
   Compiling stable_deref_trait v1.2.0
   Compiling litemap v0.7.4
   Compiling writeable v0.5.5
   Compiling smallvec v1.13.2
   Compiling icu_locid_transform_data v1.5.0
   Compiling icu_properties_data v1.5.0
   Compiling utf8_iter v1.0.4
   Compiling equivalent v1.0.1
   Compiling write16 v1.0.0
   Compiling icu_normalizer_data v1.5.0
   Compiling utf16_iter v1.0.5
   Compiling hashbrown v0.15.2
   Compiling rustc_apfloat v0.2.2+llvm-462a31f5a5ab
error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-unknown-linux-gnu` target may not be installed
  = help: consider adding the standard library to the sysroot with `x build library --target x86_64-unknown-linux-gnu`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-unknown-linux-gnu` target may not be installed
  = help: consider adding the standard library to the sysroot with `x build library --target x86_64-unknown-linux-gnu`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

error: could not compile `proc-macro2` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `unicode-ident` (lib) due to 1 previous error
error: could not compile `serde` (build script) due to 1 previous error
error: could not compile `icu_locid_transform_data` (lib) due to 1 previous error
error: could not compile `litemap` (lib) due to 1 previous error
error: could not compile `stable_deref_trait` (lib) due to 1 previous error
error: could not compile `icu_properties_data` (lib) due to 1 previous error
error: could not compile `write16` (lib) due to 1 previous error
error: could not compile `equivalent` (lib) due to 1 previous error
error: could not compile `utf8_iter` (lib) due to 1 previous error
error: could not compile `writeable` (lib) due to 1 previous error
error: could not compile `smallvec` (lib) due to 1 previous error
error: could not compile `icu_normalizer_data` (lib) due to 1 previous error
error: could not compile `utf16_iter` (lib) due to 1 previous error
error: could not compile `rustc_apfloat` (build script) due to 1 previous error
error: could not compile `hashbrown` (lib) due to 1 previous error
Build completed unsuccessfully in 0:00:08
@pietroalbini pietroalbini added the C-bug Category: This is a bug. label Mar 21, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 21, 2025
@pietroalbini pietroalbini added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Mar 21, 2025
tshepang added a commit to ferrocene/ferrocene that referenced this issue Mar 24, 2025
This results in `./x dist $tool` fails, so we temporarily disable
the change to move forward, while waiting for response to
rust-lang/rust#138778.

This reverts commit 028aaa1.
tshepang added a commit to ferrocene/ferrocene that referenced this issue Mar 25, 2025
This results in `./x dist $tool` fails, so we temporarily disable
the change to move forward, while waiting for response to
rust-lang/rust#138778.

This reverts commit 028aaa1.
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 7, 2025
@onur-ozkan onur-ozkan marked this as a duplicate of #139993 Apr 18, 2025
@onur-ozkan
Copy link
Member

onur-ozkan commented Apr 18, 2025

I have the fix but I want to add a test coverage for #138004 before sending a PR. I'm hoping to do that in a couple of hours (don't have time atm).

bors added a commit to rust-lang-ci/rust that referenced this issue Apr 20, 2025
ensure compiler existance of tools on the dist step

Fixes rust-lang#138778 with a coverage on rust-lang#138123 and rust-lang#138004.

try-job: dist-powerpc64le-linux
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. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants