rustc-1.88.0 does not build using external LLVM due to missing rust-lld
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
When building using an external LLVM, the build fails due to a missing rust-lld even when lld is present in path.
Summary
Here is the end of the build log:
Dist rust-docs-1.88.0-x86_64-apple-darwin
finished in 27.638 seconds
Installing stage2 docs (x86_64-apple-darwin)
install: creating uninstall script at /tmp/dst.rustc/usr/local/lib/rustlib/uninstall.sh
install: installing component 'rust-docs'
rust docs installed.
Dist rust-std-1.88.0-x86_64-apple-darwin
finished in 0.442 seconds
Installing stage2 std (x86_64-apple-darwin)
install: creating uninstall script at /tmp/dst.rustc/usr/local/lib/rustlib/uninstall.sh
install: installing component 'rust-std-x86_64-apple-darwin'
rust std installed.
thread 'main' panicked at src/bootstrap/src/lib.rs:1779:24:
src.symlink_metadata() failed with No such file or directory (os error 2) ("src = /tera/tera/debo/Projects/rustc/rustc-1.88.0-src/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/bin/rust-lld")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Panic was initiated from src/bootstrap/src/lib.rs:1779:24
Build completed unsuccessfully in 0:26:40
Command used
DESTDIR=/tmp/dst.rustc x.py install
Note the error from bootstrap in the log:
Warning: LLD is enabled when using external llvm-config. LLD will not be built and copied to the sysroot.
Expected behaviour
I expected it to build.
Actual behaviour
Failed to build. See above log snippet. Entire log is attached.
Bootstrap configuration (bootstrap.toml)
I am using a system LLVM llvm-20.1.7:
llvm-config = "/usr/local/bin/llvm-config"
Operating system
macOS 10.12.6
HEAD
6b00bc3880198600130e1cf62b8f8a93494488cc
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
Start at src/bootstrap/src/lib.rs:1779 and reproduce with the shown bootstrap.toml, external llvm-config, and DESTDIR=/tmp/dst.rustc x.py install command. Read the warning about LLD not being built or copied to the sysroot and trace the rust-lld handling; done means the build and installation complete when lld is available in PATH.
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
- Mostly clear
- Newbie friendliness
- 42/100