bootstrap failed when enable both 'gcc'/'llvm' codegen backends
Open
Nobody has claimed this yet.
C-bug
S-needs-info
T-bootstrap
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Summary
when i bootstrap main rustc, it failed with
thread 'main' (83973) panicked at src/bootstrap/src/core/build_steps/compile.rs:1623:34:
libgccjit_path.canonicalize() failed with No such file or directory (os error 2) ("Cannot find libgccjit at /home/zhanghe/rust/build/x86_64-unknown-linux-gnu/gcc/x86_64-unknown-linux-gnu/install/lib/libgccjit.so"
Command used
zhanghe@zhanghe-System-Product-Name:~/rust$ export DESTDIR=/home/zhanghe/rustgccjit
zhanghe@zhanghe-System-Product-Name:~/rust$ ./x install --config config.example.toml
Expected behaviour
Actual behaviour
Bootstrap configuration (bootstrap.toml)
change-id = 148671
[build]
docs = false
extended = true
optimized-compiler-builtins = true
tools = [
"cargo",
"clippy",
"rustfmt",
"rust-analyzer",
"rust-analyzer-proc-macro-srv",
"analysis",
"src",
"wasm-component-ld",
"miri", "cargo-miri" # for dev/nightly channels
]
build = "x86_64-unknown-linux-gnu"
host = ["x86_64-unknown-linux-gnu"]
target = [
"x86_64-unknown-linux-gnu",
]
[target."x86_64-unknown-linux-gnu"]
profiler = true
[llvm]
download-ci-llvm = false
[gcc]
download-ci-gcc = false
[rust]
codegen-backends = ["llvm","gcc"]
download-rustc = false
[dist]
compression-formats = ["xz"]
vendor = false
Operating system
HEAD
Additional context
Build Log
<log>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with ./x install --config config.example.toml using both codegen-backends = ["llvm", "gcc"] and the provided bootstrap settings. Start at src/bootstrap/src/core/build_steps/compile.rs:1623, then trace how the configured GCC backend path is produced. Done means the bootstrap completes without the libgccjit.so missing-file panic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100