rust-1.89 build failure due to "Undefined symbols for architecture x86_64"
Open
Nobody has claimed this yet.
C-bug
needs-triage
O-macos
T-bootstrap
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.2k
- PR merge metrics
- PR metrics pending
Description
Summary
The error was raised while compile rustc_driver at (stage0 -> stage1, x86_64-apple-darwin),
Operating system
macos 10.13.6, llvm@19 , lld@19
Build Log
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: Undefined symbols for architecture x86_64:
"vtable for std::__1::bad_function_call", referenced from:
__ZNSt3__125__throw_bad_function_callB8ne190107Ev in librustc_codegen_llvm-2b2ea9dfb9729065.rlib(ef10e86dc40538c1-PassWrapper.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"std::__1::bad_function_call::~bad_function_call()", referenced from:
__ZNSt3__125__throw_bad_function_callB8ne190107Ev in librustc_codegen_llvm-2b2ea9dfb9729065.rlib(ef10e86dc40538c1-PassWrapper.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: could not compile `rustc_driver` (lib) due to 1 previous error
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 by reproducing the stage0 → stage1 rustc_driver build for x86_64-apple-darwin on macOS 10.13.6 with llvm@19 and lld@19. Inspect the linker invocation and the rustc_codegen_llvm PassWrapper.o reference to determine why the listed std::__1 symbols are missing; done means rustc_driver links successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100