macOS 27: "rust-lld: error: could not load TAPI file"
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I have rust-lld configured as my linker on macOS 27:
# ~/.cargo/config.toml
[target.aarch64-apple-darwin]
linker = "rust-lld"
Building anything spams a ton of linker errors like this:
error: linking with `rust-lld` failed: exit status: 1
|
= note: "rust-lld" "-flavor" "darwin" "[redacted]/target/debug/build/crc32fast-492ddc9329c1658b/rustcD8bsOM/symbols.o" "<2 object files omitted>" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-platform_version" "macos" "11.0.0" "11.0.0" "-syslibroot" "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk" "-o" "[redacted]/target/debug/build/crc32fast-492ddc9329c1658b/build_script_build-492ddc9329c1658b" "-dead_strip"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: rust-lld: error: could not load TAPI file at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/usr/lib/libSystem.tbd: malformed file
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/usr/lib/libSystem.tbd:4:20: error: unknown architecture
arm64e.x1-macos, arm64e.x1-maccatalyst ]
^~~~~~~~~~~~~~~
And none of the symbols can be found:
rust-lld: error: undefined symbol: _memcpy
>>> referenced by [redacted]/target/debug/build/crc32fast-492ddc9329c1658b/build_script_build-492ddc9329c1658b.build_script_build.7efdbd0b7c09a1c1-cgu.0.rcgu.o:(symbol __RINvMNtCs8Mbv00yxnRz_4core3stre5splitcECsaTYcvwnyYI7_18build_script_build+0x78)
>>> referenced by [redacted]/target/debug/build/crc32fast-492ddc9329c1658b/build_script_build-492ddc9329c1658b.build_script_build.7efdbd0b7c09a1c1-cgu.0.rcgu.o:(symbol __RINvMNtCs8Mbv00yxnRz_4core3stre5splitcECsaTYcvwnyYI7_18build_script_build+0x58)
>>> referenced by [redacted]/target/debug/build/crc32fast-492ddc9329c1658b/build_script_build-492ddc9329c1658b.build_script_build.7efdbd0b7c09a1c1-cgu.0.rcgu.o:(symbol __RINvMNtCs8Mbv00yxnRz_4core6optionINtB3_6OptionNtNtCs82bWklYMk3w_3std7process6OutputE8and_thenmNCNvCsaTYcvwnyYI7_18build_script_build19minor_rustc_version0EB1y_+0x50)
>>> referenced 155 more times
Removing my global linker setting fixes builds.
This might be an upstream LLVM/lld issue, but I haven't found any similar reports.
Meta
rustc +stable --version --verbose:
rustc +stable --version --verbose
rustc 1.98.1 (48a229cea 2026-09-01)
binary: rustc
commit-hash: 48a229ceaefd4985c50990b14116b6d856af0985
commit-date: 2026-09-01
host: aarch64-apple-darwin
release: 1.98.1
LLVM version: 22.1.8
rustc +nightly --version --verbose:
ustc 1.100.0-nightly (923c95cdf 2026-09-16)
binary: rustc
commit-hash: 923c95cdf5ba65cea505aa2ea829f578e1506ed8
commit-date: 2026-09-16
host: aarch64-apple-darwin
release: 1.100.0-nightly
LLVM version: 23.1.1
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 on aarch64 macOS 27 using the ~/.cargo/config.toml rust-lld setting, then compare the failure with that setting removed. Investigate whether Rust or upstream LLVM/lld owns parsing the malformed libSystem.tbd TAPI entry. Done means identifying the responsible component and a confirmed fix or actionable upstream report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100