xcode15 ld: Assertion failed: (extras.otherInstrOffset != 0 && "Kind::arm64_adrp_ldr missing extra info")

When I upgrade to xcode15, I get an error compiling the project with the following error message

0 0x104f5f648 __assert_rtn + 72 1 0x104e87c5c ld::Fixup::applyFixup(ld::Atom const*, ld::LayoutLinkedImage const&, unsigned char*) const + 8268 2 0x104f1a7d8 ___ZN2ld16LayoutExecutable27writeContentWithoutLinkEditENSt3__14spanIhLm18446744073709551615EEEy_block_invoke + 332 3 0x18c39b950 _dispatch_client_callout2 + 20 4 0x18c3b01a4 _dispatch_apply_invoke_and_wait + 176 5 0x18c3af464 _dispatch_apply_with_attr_f + 1176 6 0x18c3af650 dispatch_apply + 96 7 0x104f1a9e4 void mapReduce<ld::Atom const*, mach_o::Error>(std::__1::span<ld::Atom const*, 18446744073709551615ul>, unsigned long, void (unsigned long, mach_o::Error&, std::__1::span<ld::Atom const*, 18446744073709551615ul>) block_pointer, void (std::__1::span<mach_o::Error, 18446744073709551615ul>) block_pointer) + 336 8 0x104f1a594 ld::LayoutExecutable::writeContentWithoutLinkEdit(std::__1::span<unsigned char, 18446744073709551615ul>, unsigned long long) + 1180 9 0x104f20020 ld::LayoutExecutable::writeToFile(char const*) + 15248 10 0x104ed22e8 main + 9424 ld: Assertion failed: (extras.otherInstrOffset != 0 && "Kind::arm64_adrp_ldr missing extra info"), function applyFixup, file Fixup.cpp, line 793.

clang: error: linker command failed with exit code 1 (use -v to see invocation)

This error only occurs when archiving, not when building. I don't get this error when I delete the C++ code in the project. How do I solve it?

When you try to build qtquick3d you get the same error. For example via vcpkg: vcpkg install qtquick3d results in:

0  0x104eaf648  __assert_rtn + 72
1  0x104dd7c5c  ld::Fixup::applyFixup(ld::Atom const*, ld::LayoutLinkedImage const&, unsigned char*) const + 8268
2  0x104e6a7d8  ___ZN2ld16LayoutExecutable27writeContentWithoutLinkEditENSt3__14spanIhLm18446744073709551615EEEy_block_invoke + 332
3  0x19e8b4440  _dispatch_client_callout2 + 20
4  0x19e8c9544  _dispatch_apply_invoke_and_wait + 224
5  0x19e8c884c  _dispatch_apply_with_attr_f + 1180
6  0x19e8c8a38  dispatch_apply + 96
7  0x104e6a9e4  void mapReduce<ld::Atom const*, mach_o::Error>(std::__1::span<ld::Atom const*, 18446744073709551615ul>, unsigned long, void (unsigned long, mach_o::Error&, std::__1::span<ld::Atom const*, 18446744073709551615ul>) block_pointer, void (std::__1::span<mach_o::Error, 18446744073709551615ul>) block_pointer) + 336
8  0x104e6a594  ld::LayoutExecutable::writeContentWithoutLinkEdit(std::__1::span<unsigned char, 18446744073709551615ul>, unsigned long long) + 1180
9  0x104e70020  ld::LayoutExecutable::writeToFile(char const*) + 15248
10  0x104e222e8  main + 9424
ld: Assertion failed: (extras.otherInstrOffset != 0 && "Kind::arm64_adrp_ldr missing extra info"), function applyFixup, file Fixup.cpp, line 793.
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Another occurrence of this liker bug: https://github.com/godotengine/godot/issues/81948

Xcode 15 has a new linker that’s triggered a bunch of problems like this. See my posts on this thread for general advice on this topic. Before doing that, however, you should re-test with the current Xcode 15.1 beta, because it has fixes to various bugs like this.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Seems to be fixed by the latest xcode update

xcode15 ld: Assertion failed: (extras.otherInstrOffset != 0 &amp;&amp; "Kind::arm64_adrp_ldr missing extra info")
 
 
Q