I think the linker is crashing when attempting to build some of the compiler repository tools.
I just rebased to the latest commit on main
, so it's at 36a15ceaf4230e658a9453d2f14532bb99fd5dd4, and I ran update-checkout and deleted the previous build directory, so everything should be fresh.
macOS Sonoma 14.0 (23A344)
M1 Pro
Xcode 15.0 (15A240d)
[1351/2166][ 62%][557.124s] Linking CXX executable bin/lldb-moduleimport-test
FAILED: bin/lldb-moduleimport-test
<...>
0 0x102b3f648 __assert_rtn + 72
1 0x102afa0f0 ___Z13dispatchApplyIRKmZ15dispatchForEachIKN6mach_o13CompactUnwind11Diff24FixupEZNK2ld16LayoutExecutable18writeCompactUnwindENSt3__14spanIhLm18446744073709551615EEEyRKNS7_13SectionLayoutEE4$_26EvNSA_IT_Lm18446744073709551615EEEmT0_EUlmE_EvOSG_SI__block_invoke + 0
2 0x18c541950 _dispatch_client_callout2 + 20
3 0x18c5561a4 _dispatch_apply_invoke_and_wait + 176
4 0x18c555464 _dispatch_apply_with_attr_f + 1176
5 0x18c555650 dispatch_apply + 96
6 0x102afa398 ld::LayoutExecutable::writeContentWithoutLinkEdit(std::__1::span<unsigned char, 18446744073709551615ul>, unsigned long long) + 672
7 0x102b00020 ld::LayoutExecutable::writeToFile(char const*) + 15248
8 0x102ab22e8 main + 9424
ld: Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp, line 5758.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
And the same for bin/swift-refactor
.
Build command:
utils/build-script \
--skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" \
--sccache --release-debuginfo --debug-swift --swift-disable-dead-stripping
Apparently this is something of a known issue in Xcode 15, and there are suggestions that adding the -ld_classic
linker flag might resolve it. I checked the release notes for 15.0.1 and 15.1 beta, and neither of them mention it.
Has anybody else encountered this issue? What did you do to resolve it?