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

Rebuild llvm spuriously less frequently #138333

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Mar 11, 2025

I noticed that x check was rebuilding rustc_llvm basically every time I modified a source file. I tracked this down to the following env variable change:

cargo::core::compiler::fingerprint:     dirty: EnvVarChanged { name: "REAL_LIBRARY_PATH", old_value: Some("/home/jyn/.local/lib/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib"), new_value: None }

The problem was that I had installed rust-analyzer from rustup, not as a standalone tool. As a result, rustup sets
LD_LIBRARY_PATH=$(rustc --print target-libdir) in the environment under the assumption that rust-analyzer needs it to link to rustc_private crates. This is not in fact the case; RA does not link to rustc_private. But rustup does not know this. Ideally we would make rustup smarter, but that takes a while because rustup has infrequent releases.

In the meantime, as a workaround, be a little more selective about when we forward LD_LIBRARY_PATH. See the new comment for more details.

Note that there are still cases when we will spuriously rebuild; in particular when setting llvm-config = /path/to/llvm-config and using rust-analyzer installed from rustup. but both of those are individually rare, and the combination seems very unlikely to me.

try-job: dist-x86_64-linux

@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2025

r? @onur-ozkan

rustbot has assigned @onur-ozkan.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Mar 11, 2025
@rust-log-analyzer

This comment has been minimized.

I noticed that `x check` was rebuilding rustc_llvm basically every time I modified
a source file. I tracked this down to the following env variable change:
```
cargo::core::compiler::fingerprint:     dirty: EnvVarChanged { name: "REAL_LIBRARY_PATH", old_value: Some("/home/jyn/.local/lib/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib"), new_value: None }
```

The problem was that I had installed rust-analyzer from rustup, not as a
standalone tool. As a result, rustup sets
`LD_LIBRARY_PATH=$(rustc --print target-libdir)` in the environment
under the assumption that rust-analyzer needs it to link to
rustc_private crates. This is not in fact the case; RA does not link to
rustc_private. But rustup does not know this. Ideally we would make
rustup smarter, but that takes a while because rustup has infrequent
releases.

In the meantime, as a workaround, be a little more selective about when we forward
LD_LIBRARY_PATH. See the new comment for more details.
@jyn514 jyn514 force-pushed the spurious-llvm-rebuilds branch from a191eb0 to 2a8c87b Compare March 11, 2025 03:13
Copy link
Member

@onur-ozkan onur-ozkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@onur-ozkan
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 11, 2025

📌 Commit 2a8c87b has been approved by onur-ozkan

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 11, 2025
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Mar 12, 2025
…nur-ozkan

Rebuild llvm spuriously less frequently

I noticed that `x check` was rebuilding rustc_llvm basically every time I modified a source file. I tracked this down to the following env variable change:
```
cargo::core::compiler::fingerprint:     dirty: EnvVarChanged { name: "REAL_LIBRARY_PATH", old_value: Some("/home/jyn/.local/lib/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib"), new_value: None }
```

The problem was that I had installed rust-analyzer from rustup, not as a standalone tool. As a result, rustup sets
`LD_LIBRARY_PATH=$(rustc --print target-libdir)` in the environment under the assumption that rust-analyzer needs it to link to rustc_private crates. This is not in fact the case; RA does not link to rustc_private. But rustup does not know this. Ideally we would make rustup smarter, but that takes a while because rustup has infrequent releases.

In the meantime, as a workaround, be a little more selective about when we forward LD_LIBRARY_PATH. See the new comment for more details.

Note that there are still cases when we will spuriously rebuild; in particular when setting `llvm-config = /path/to/llvm-config` and using rust-analyzer installed from rustup. but both of those are individually rare, and the combination seems very unlikely to me.
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Mar 12, 2025
…nur-ozkan

Rebuild llvm spuriously less frequently

I noticed that `x check` was rebuilding rustc_llvm basically every time I modified a source file. I tracked this down to the following env variable change:
```
cargo::core::compiler::fingerprint:     dirty: EnvVarChanged { name: "REAL_LIBRARY_PATH", old_value: Some("/home/jyn/.local/lib/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib"), new_value: None }
```

The problem was that I had installed rust-analyzer from rustup, not as a standalone tool. As a result, rustup sets
`LD_LIBRARY_PATH=$(rustc --print target-libdir)` in the environment under the assumption that rust-analyzer needs it to link to rustc_private crates. This is not in fact the case; RA does not link to rustc_private. But rustup does not know this. Ideally we would make rustup smarter, but that takes a while because rustup has infrequent releases.

In the meantime, as a workaround, be a little more selective about when we forward LD_LIBRARY_PATH. See the new comment for more details.

Note that there are still cases when we will spuriously rebuild; in particular when setting `llvm-config = /path/to/llvm-config` and using rust-analyzer installed from rustup. but both of those are individually rare, and the combination seems very unlikely to me.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 12, 2025
Rollup of 25 pull requests

Successful merges:

 - rust-lang#134076 (Stabilize `std::io::ErrorKind::InvalidFilename`)
 - rust-lang#136842 (Add libstd support for Trusty targets)
 - rust-lang#137314 (change definitely unproductive cycles to error)
 - rust-lang#137504 (Move methods from Map to TyCtxt, part 4.)
 - rust-lang#137621 (Add std support to cygwin target)
 - rust-lang#137701 (Convert `ShardedHashMap` to use `hashbrown::HashTable`)
 - rust-lang#138109 (make precise capturing args in rustdoc Json typed)
 - rust-lang#138161 (Add PeekMut::refresh)
 - rust-lang#138162 (Update the standard library to Rust 2024)
 - rust-lang#138174 (Elaborate trait assumption in `receiver_is_dispatchable`)
 - rust-lang#138175 (Support rmeta inputs for --crate-type=bin --emit=obj)
 - rust-lang#138269 (uefi: fs: Implement FileType, FilePermissions and FileAttr)
 - rust-lang#138313 (Update books)
 - rust-lang#138318 (Rustdoc: remove a bunch of `@ts-expect-error` from main.js)
 - rust-lang#138331 (Use `RUSTC_LINT_FLAGS` more)
 - rust-lang#138333 (Rebuild llvm spuriously less frequently)
 - rust-lang#138343 (Enable `f16` tests for `powf`)
 - rust-lang#138345 (Some autodiff cleanups)
 - rust-lang#138346 (naked functions: on windows emit `.endef` without the symbol name)
 - rust-lang#138347 (Reduce `kw::Empty` usage, part 2)
 - rust-lang#138360 (Fix false-positive in `expr_or_init` and in the `invalid_from_utf8` lint)
 - rust-lang#138371 (Update compiletest's `has_asm_support` to match rustc)
 - rust-lang#138372 (Refactor `pick2_mut` & `pick3_mut` to use `get_disjoint_mut`)
 - rust-lang#138376 (Item-related cleanups)
 - rust-lang#138377 (Remove unnecessary lifetime from `PatInfo`.)

r? `@ghost`
`@rustbot` modify labels: rollup
@jieyouxu
Copy link
Member

This looks most likely to have caused rollup failure on dist-x86_64-linux, running try-job to check.

warning: rustc_llvm@0.0.0: /rustroot/bin/clang++: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /rustroot/bin/clang++)
warning: rustc_llvm@0.0.0: /rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /rustroot/bin/clang++)
warning: rustc_llvm@0.0.0: /rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /rustroot/bin/clang++)
warning: rustc_llvm@0.0.0: /rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /rustroot/bin/clang++)
warning: rustc_llvm@0.0.0: /rustroot/bin/clang++: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /rustroot/bin/clang++)
warning: rustc_llvm@0.0.0: /rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /rustroot/bin/clang++)
error: failed to run custom build command for `rustc_llvm v0.0.0 (/checkout/compiler/rustc_llvm)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/build/rustc_llvm-778d5bfb7e0f28f6/build-script-build` (exit status: 1)
  --- stdout
  cargo:rustc-check-cfg=cfg(llvm_component,values("ipo"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("bitreader"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("bitwriter"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("linker"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("asmparser"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("lto"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("coverage"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("instrumentation"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("x86"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("arm"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("aarch64"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("amdgpu"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("avr"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("loongarch"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("m68k"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("csky"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("mips"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("powerpc"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("systemz"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("jsbackend"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("webassembly"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("msp430"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("sparc"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("nvptx"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("hexagon"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("riscv"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("xtensa"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("bpf"))
  cargo:rerun-if-env-changed=RUST_CHECK
  cargo:rerun-if-env-changed=REAL_LIBRARY_PATH_VAR
  cargo:rerun-if-env-changed=REAL_LIBRARY_PATH
  cargo:rerun-if-env-changed=LLVM_CONFIG
  cargo:rerun-if-changed=/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/bin/llvm-config
  cargo:rustc-cfg=llvm_component="aarch64"
  cargo:rustc-cfg=llvm_component="amdgpu"
  cargo:rustc-cfg=llvm_component="arm"
  cargo:rustc-cfg=llvm_component="asmparser"
  cargo:rustc-cfg=llvm_component="avr"
  cargo:rustc-cfg=llvm_component="bitreader"
  cargo:rustc-cfg=llvm_component="bitwriter"
  cargo:rustc-cfg=llvm_component="bpf"
  cargo:rustc-cfg=llvm_component="coverage"
  cargo:rustc-cfg=llvm_component="csky"
  cargo:rustc-cfg=llvm_component="hexagon"
  cargo:rustc-cfg=llvm_component="instrumentation"
  cargo:rustc-cfg=llvm_component="ipo"
  cargo:rustc-cfg=llvm_component="linker"
  cargo:rustc-cfg=llvm_component="loongarch"
  cargo:rustc-cfg=llvm_component="lto"
  cargo:rustc-cfg=llvm_component="m68k"
  cargo:rustc-cfg=llvm_component="mips"
  cargo:rustc-cfg=llvm_component="msp430"
  cargo:rustc-cfg=llvm_component="nvptx"
  cargo:rustc-cfg=llvm_component="powerpc"
  cargo:rustc-cfg=llvm_component="riscv"
  cargo:rustc-cfg=llvm_component="sparc"
  cargo:rustc-cfg=llvm_component="systemz"
  cargo:rustc-cfg=llvm_component="webassembly"
  cargo:rustc-cfg=llvm_component="x86"
  cargo:rustc-cfg=llvm_component="xtensa"
  cargo:rerun-if-env-changed=LLVM_ENZYME
  cargo:rerun-if-env-changed=LLVM_RUSTLLVM
  cargo:rerun-if-env-changed=LLVM_ASSERTIONS
  cargo:rerun-if-changed=llvm-wrapper/LLVMWrapper.h
  cargo:rerun-if-changed=llvm-wrapper/RustWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/SuppressLLVMWarnings.h
  cargo:rerun-if-changed=llvm-wrapper/README
  cargo:rerun-if-changed=llvm-wrapper/Linker.cpp
  cargo:rerun-if-changed=llvm-wrapper/PassWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/CoverageMappingWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/ArchiveWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/SymbolWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/.editorconfig
  OUT_DIR = Some(/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-587e4d8aab9561c7/out)
  OPT_LEVEL = Some(3)
  TARGET = Some(x86_64-unknown-linux-gnu)
  HOST = Some(x86_64-unknown-linux-gnu)
  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
  CXX_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
  CXX_x86_64_unknown_linux_gnu = Some(sccache clang++)
  cargo:rerun-if-env-changed=CC_KNOWN_WRAPPER_CUSTOM
  CC_KNOWN_WRAPPER_CUSTOM = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some(false)
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
---
  cargo:rerun-if-env-changed=CC_SHELL_ESCAPED_FLAGS
  CC_SHELL_ESCAPED_FLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
  CXXFLAGS_x86_64-unknown-linux-gnu = None
  CARGO_ENCODED_RUSTFLAGS = Some(--cfg=bootstrap--cfg=windows_raw_dylib-Csymbol-mangling-version=v0-Zunstable-options--check-cfg=cfg(bootstrap)--check-cfg=cfg(llvm_enzyme)-Zmacro-backtrace-Csplit-debuginfo=off-Clink-args=-Wl,-z,origin-Clink-args=-Wl,-rpath,$ORIGIN/../lib-Clinker-flavor=gnu-lld-cc-Zunstable-options-Alinker-messages-Zon-broken-pipe=kill-Zdefault-visibility=protected-Clink-args=-Wl,--icf=all)
  cargo:warning=/rustroot/bin/clang++: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /rustroot/bin/clang++)
  cargo:warning=/rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /rustroot/bin/clang++)
  cargo:warning=/rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /rustroot/bin/clang++)
  cargo:warning=/rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /rustroot/bin/clang++)
  cargo:warning=/rustroot/bin/clang++: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /rustroot/bin/clang++)
  cargo:warning=/rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /rustroot/bin/clang++)

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 12, 2025
@jieyouxu
Copy link
Member

@bors try

@bors
Copy link
Contributor

bors commented Mar 12, 2025

⌛ Trying commit 2a8c87b with merge 932bf85...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 12, 2025
Rebuild llvm spuriously less frequently

I noticed that `x check` was rebuilding rustc_llvm basically every time I modified a source file. I tracked this down to the following env variable change:
```
cargo::core::compiler::fingerprint:     dirty: EnvVarChanged { name: "REAL_LIBRARY_PATH", old_value: Some("/home/jyn/.local/lib/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib"), new_value: None }
```

The problem was that I had installed rust-analyzer from rustup, not as a standalone tool. As a result, rustup sets
`LD_LIBRARY_PATH=$(rustc --print target-libdir)` in the environment under the assumption that rust-analyzer needs it to link to rustc_private crates. This is not in fact the case; RA does not link to rustc_private. But rustup does not know this. Ideally we would make rustup smarter, but that takes a while because rustup has infrequent releases.

In the meantime, as a workaround, be a little more selective about when we forward LD_LIBRARY_PATH. See the new comment for more details.

Note that there are still cases when we will spuriously rebuild; in particular when setting `llvm-config = /path/to/llvm-config` and using rust-analyzer installed from rustup. but both of those are individually rare, and the combination seems very unlikely to me.

try-job: dist-x86_64-linux
@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config remote.upstream.url=https://github.com/rust-lang/rust
file:.git/config remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/*
file:.git/config submodule.library/backtrace.active=true
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
---
[RUSTC-TIMING] leb128 test:false 0.075
   Compiling wasm-encoder v0.219.1
[RUSTC-TIMING] overload test:false 0.033
   Compiling nu-ansi-term v0.46.0
warning: rustc_llvm@0.0.0: /rustroot/bin/clang++: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /rustroot/bin/clang++)
warning: rustc_llvm@0.0.0: /rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /rustroot/bin/clang++)
warning: rustc_llvm@0.0.0: /rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /rustroot/bin/clang++)
warning: rustc_llvm@0.0.0: /rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /rustroot/bin/clang++)
warning: rustc_llvm@0.0.0: /rustroot/bin/clang++: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /rustroot/bin/clang++)
warning: rustc_llvm@0.0.0: /rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /rustroot/bin/clang++)
error: failed to run custom build command for `rustc_llvm v0.0.0 (/checkout/compiler/rustc_llvm)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/release/build/rustc_llvm-778d5bfb7e0f28f6/build-script-build` (exit status: 1)
  --- stdout
  cargo:rustc-check-cfg=cfg(llvm_component,values("ipo"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("bitreader"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("bitwriter"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("linker"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("asmparser"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("lto"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("coverage"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("instrumentation"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("x86"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("arm"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("aarch64"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("amdgpu"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("avr"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("loongarch"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("m68k"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("csky"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("mips"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("powerpc"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("systemz"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("jsbackend"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("webassembly"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("msp430"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("sparc"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("nvptx"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("hexagon"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("riscv"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("xtensa"))
  cargo:rustc-check-cfg=cfg(llvm_component,values("bpf"))
  cargo:rerun-if-env-changed=RUST_CHECK
  cargo:rerun-if-env-changed=REAL_LIBRARY_PATH_VAR
  cargo:rerun-if-env-changed=REAL_LIBRARY_PATH
  cargo:rerun-if-env-changed=LLVM_CONFIG
  cargo:rerun-if-changed=/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/bin/llvm-config
  cargo:rustc-cfg=llvm_component="aarch64"
  cargo:rustc-cfg=llvm_component="amdgpu"
  cargo:rustc-cfg=llvm_component="arm"
  cargo:rustc-cfg=llvm_component="asmparser"
  cargo:rustc-cfg=llvm_component="avr"
  cargo:rustc-cfg=llvm_component="bitreader"
  cargo:rustc-cfg=llvm_component="bitwriter"
  cargo:rustc-cfg=llvm_component="bpf"
  cargo:rustc-cfg=llvm_component="coverage"
  cargo:rustc-cfg=llvm_component="csky"
  cargo:rustc-cfg=llvm_component="hexagon"
  cargo:rustc-cfg=llvm_component="instrumentation"
  cargo:rustc-cfg=llvm_component="ipo"
  cargo:rustc-cfg=llvm_component="linker"
  cargo:rustc-cfg=llvm_component="loongarch"
  cargo:rustc-cfg=llvm_component="lto"
  cargo:rustc-cfg=llvm_component="m68k"
  cargo:rustc-cfg=llvm_component="mips"
  cargo:rustc-cfg=llvm_component="msp430"
  cargo:rustc-cfg=llvm_component="nvptx"
  cargo:rustc-cfg=llvm_component="powerpc"
  cargo:rustc-cfg=llvm_component="riscv"
  cargo:rustc-cfg=llvm_component="sparc"
  cargo:rustc-cfg=llvm_component="systemz"
  cargo:rustc-cfg=llvm_component="webassembly"
  cargo:rustc-cfg=llvm_component="x86"
  cargo:rustc-cfg=llvm_component="xtensa"
  cargo:rerun-if-env-changed=LLVM_ENZYME
  cargo:rerun-if-env-changed=LLVM_RUSTLLVM
  cargo:rerun-if-env-changed=LLVM_ASSERTIONS
  cargo:rerun-if-changed=llvm-wrapper/LLVMWrapper.h
  cargo:rerun-if-changed=llvm-wrapper/RustWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/SuppressLLVMWarnings.h
  cargo:rerun-if-changed=llvm-wrapper/README
  cargo:rerun-if-changed=llvm-wrapper/Linker.cpp
  cargo:rerun-if-changed=llvm-wrapper/PassWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/CoverageMappingWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/ArchiveWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/SymbolWrapper.cpp
  cargo:rerun-if-changed=llvm-wrapper/.editorconfig
  OUT_DIR = Some(/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-06a91be4642f3583/out)
  OPT_LEVEL = Some(3)
  TARGET = Some(x86_64-unknown-linux-gnu)
  HOST = Some(x86_64-unknown-linux-gnu)
  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
  CXX_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
  CXX_x86_64_unknown_linux_gnu = Some(sccache clang++)
  cargo:rerun-if-env-changed=CC_KNOWN_WRAPPER_CUSTOM
  CC_KNOWN_WRAPPER_CUSTOM = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some(false)
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
---
  cargo:rerun-if-env-changed=CC_SHELL_ESCAPED_FLAGS
  CC_SHELL_ESCAPED_FLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
  CXXFLAGS_x86_64-unknown-linux-gnu = None
  CARGO_ENCODED_RUSTFLAGS = Some(--cfg=bootstrap--cfg=windows_raw_dylib-Csymbol-mangling-version=v0-Zunstable-options--check-cfg=cfg(bootstrap)--check-cfg=cfg(llvm_enzyme)-Zmacro-backtrace-Csplit-debuginfo=off-Wrustc::internal-Drustc::symbol_intern_string_literal-Wkeyword_idents_2024-Wunsafe_op_in_unsafe_fn-Clink-args=-Wl,-z,origin-Clink-args=-Wl,-rpath,$ORIGIN/../lib-Clinker-flavor=gnu-lld-cc-Zunstable-options-Alinker-messages-Zon-broken-pipe=kill-Zdefault-visibility=protected-Clink-args=-Wl,--icf=all)
  cargo:warning=/rustroot/bin/clang++: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /rustroot/bin/clang++)
  cargo:warning=/rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /rustroot/bin/clang++)
  cargo:warning=/rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /rustroot/bin/clang++)
  cargo:warning=/rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /rustroot/bin/clang++)
  cargo:warning=/rustroot/bin/clang++: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /rustroot/bin/clang++)
  cargo:warning=/rustroot/bin/clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /rustroot/bin/clang++)

  --- stderr


  error occurred in cc-rs: command did not execute successfully (status code exit status: 1): LC_ALL="C" "sccache" "clang++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "--target=x86_64-unknown-linux-gnu" "-I/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/include" "-std=c++17" "-fno-exceptions" "-funwind-tables" "-fno-rtti" "-D_GNU_SOURCE" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_LIMIT_MACROS" "-DLLVM_COMPONENT_AARCH64" "-DLLVM_COMPONENT_AMDGPU" "-DLLVM_COMPONENT_ARM" "-DLLVM_COMPONENT_ASMPARSER" "-DLLVM_COMPONENT_AVR" "-DLLVM_COMPONENT_BITREADER" "-DLLVM_COMPONENT_BITWRITER" "-DLLVM_COMPONENT_BPF" "-DLLVM_COMPONENT_COVERAGE" "-DLLVM_COMPONENT_CSKY" "-DLLVM_COMPONENT_HEXAGON" "-DLLVM_COMPONENT_INSTRUMENTATION" "-DLLVM_COMPONENT_IPO" "-DLLVM_COMPONENT_LINKER" "-DLLVM_COMPONENT_LOONGARCH" "-DLLVM_COMPONENT_LTO" "-DLLVM_COMPONENT_M68K" "-DLLVM_COMPONENT_MIPS" "-DLLVM_COMPONENT_MSP430" "-DLLVM_COMPONENT_NVPTX" "-DLLVM_COMPONENT_POWERPC" "-DLLVM_COMPONENT_RISCV" "-DLLVM_COMPONENT_SPARC" "-DLLVM_COMPONENT_SYSTEMZ" "-DLLVM_COMPONENT_WEBASSEMBLY" "-DLLVM_COMPONENT_X86" "-DLLVM_COMPONENT_XTENSA" "-DLLVM_RUSTLLVM" "-DNDEBUG" "-fdebug-prefix-map=/checkout=/rustc/932bf85b1faeca5d139be28c9ff3d1357063bec8" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-06a91be4642f3583/out/ef10e86dc40538c1-PassWrapper.o" "-c" "llvm-wrapper/PassWrapper.cpp"


warning: build failed, waiting for other jobs to finish...
[RUSTC-TIMING] allocator_api2 test:false 0.420
[RUSTC-TIMING] shlex test:false 0.232
---
Caused by:
    Command RUST_BACKTRACE=full python3 /checkout/x.py build --target x86_64-unknown-linux-gnu --host x86_64-unknown-linux-gnu --stage 2 library/std --rust-profile-generate /tmp/tmp-multistage/opt-artifacts/rustc-pgo --set llvm.thin-lto=false --set llvm.link-shared=true [at /checkout/obj] has failed with exit code Some(1)

Stack backtrace:
   0: <anyhow::Error>::msg::<alloc::string::String>
             at /rust/deps/anyhow-1.0.95/src/backtrace.rs:27:14
   1: <opt_dist::exec::CmdBuilder>::run
             at /rustc/932bf85b1faeca5d139be28c9ff3d1357063bec8/src/tools/opt-dist/src/exec.rs:80:17
   2: <opt_dist::exec::Bootstrap>::run
             at /rustc/932bf85b1faeca5d139be28c9ff3d1357063bec8/src/tools/opt-dist/src/exec.rs:181:9
   3: opt_dist::execute_pipeline::{closure#1}::{closure#0}
             at /rustc/932bf85b1faeca5d139be28c9ff3d1357063bec8/src/tools/opt-dist/src/main.rs:222:13
   4: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}::{closure#0}, ()>
             at /rustc/932bf85b1faeca5d139be28c9ff3d1357063bec8/src/tools/opt-dist/src/timer.rs:111:22
   5: opt_dist::execute_pipeline::{closure#1}
             at /rustc/932bf85b1faeca5d139be28c9ff3d1357063bec8/src/tools/opt-dist/src/main.rs:211:9
   6: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}, opt_dist::training::RustcPGOProfile>
             at /rustc/932bf85b1faeca5d139be28c9ff3d1357063bec8/src/tools/opt-dist/src/timer.rs:111:22
   7: opt_dist::execute_pipeline
             at /rustc/932bf85b1faeca5d139be28c9ff3d1357063bec8/src/tools/opt-dist/src/main.rs:208:29
   8: opt_dist::main
             at /rustc/932bf85b1faeca5d139be28c9ff3d1357063bec8/src/tools/opt-dist/src/main.rs:400:18
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/core/src/ops/function.rs:250:5
  10: std::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core::result::Result<(), anyhow::Error>, core::result::Result<(), anyhow::Error>>
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/std/src/sys/backtrace.rs:152:18
  11: std::rt::lang_start::<core::result::Result<(), anyhow::Error>>::{closure#0}
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/std/src/rt.rs:199:18
  12: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/core/src/ops/function.rs:284:13
  13: std::panicking::try::do_call
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/std/src/panicking.rs:587:40
  14: std::panicking::try
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/std/src/panicking.rs:550:19

@bors
Copy link
Contributor

bors commented Mar 12, 2025

💔 Test failed - checks-actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants