Failed build: ld assertions being hit with Xcode 15

ld: Assertion failed: (false && "not a GOT atom in non lazy pointers section"), function symbolIndexOfNonLazyAtom, file Layout.cpp, line 4930.

When trying to build our project using Xcode 15 RC (15A240d) we are tripping an assertion in the linker step while the build system is running the following command: "/Applications/Xcode 15 RC.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library "/Applications/Xcode 15 RC.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib" -dynamic -dylib -dylib_compatibility_version 1.0.0 -dylib_current_version 1.0.0 -arch arm64 -dylib_install_name @rpath/MyFramework.framework/MyFramework -dead_strip -platform_version ios 12.0.0 17.0 -syslibroot "/Applications/Xcode 15 RC.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk" -O3 -e xport_dynamic -o ${ROOT_PATH}/sdk/iOS/ACSCallingSDK/release-iphoneos/MyFramework.framework/MyFramework -L${ROOT_PATH}/build/EagerLinkingTBDs/release-iphoneos -L${ROOT_PATH}/sdk/iOS/ACSCallingSDK/release-iphoneos -L${ROOT_PATH}/libShared/output/archive/arm64-v8a/release/release-iphoneos -L${ROOT_PATH}/libShared/output/archive/arm64-v8a/release "-L/Applications/Xcode 15 RC.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos" -L/usr/lib/swift -reproducible -filelist ${ROOT_PATH}/build/MyFramework.build/release-iphoneos/Objects-normal/arm64/MyFramework.LinkFileList -rpath /usr/lib/swift -rpath @executable_path/Frameworks -rpath @loader_path/Frameworks -object_path_lto ${ROOT_PATH}/build/MyFramework.build/release-iphoneos/Objects-normal/arm64/MyFramework_lto.o -export_dynamic -add_ast_path ${ROOT_PATH}/build/MyFramework.build/release-iphoneos/Objects-normal/arm64/MyFramework.swiftmodule -lACSCallingSharedLibOutput -lc++ -lz -lobjc -e xport_dynamic -framework MyDependencyCommon -framework CoreTelephony -framework ExternalAccessory -framework SystemConfiguration -framework CoreML -framework CoreServices -weak_framework Vision -framework Accelerate -dependency_info ${ROOT_PATH}/build/MyFramework.build/release-iphoneos/Objects-normal/arm64/MyFramework_dependency_info.dat -framework Foundation -lobjc -lc++ -lSystem "/Applications/Xcode 15 RC.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/lib/darwin/libclang_rt.ios.a" -F${ROOT_PATH}/build/EagerLinkingTBDs/release-iphoneos -F${ROOT_PATH}/sdk/iOS/ACSCallingSDK/release-iphoneos -F${OUT_PATH}/SpoolCallingStack/Tools_MyDependencyCommon/1c/c6ed5b/8b904fdbe52392e7b02188b0 Stack trace of assertion: 0 0x100edf648 __assert_rtn + 72 1 0x100e90d94 ld::atomNeedsRegularBind(ld::Atom const*, ld::Options const&) + 0 2 0x100e90f38 void dispatchForEach<ld::SectionLayout*, ld::IndirectSymbolTableBuilder::IndirectSymbolTableBuilder(ld::Options const&, ld::LinkedAtomPlacement const&, std::__1::span<ld::SegmentLayout, 18446744073709551615ul>)::$_24>(std::__1::span<ld::SectionLayout*, 18446744073709551615ul>, unsigned long, ld::IndirectSymbolTableBuilder::IndirectSymbolTableBuilder(ld::Options const&, ld::LinkedAtomPlacement const&, std::__1::span<ld::SegmentLayout, 18446744073709551615ul>)::$_24)::'lambda'(unsigned long)::operator()(unsigned long) const + 216 3 0x1aa4c8440 _dispatch_client_callout2 + 20 4 0x1aa4dd544 _dispatch_apply_invoke_and_wait + 224 5 0x1aa4dc84c _dispatch_apply_with_attr_f + 1180 6 0x1aa4dca38 dispatch_apply + 96 7 0x100e9e500 ld::LayoutExecutable::writeToFile(char const*) + 8304 8 0x100e522e8 main + 9424 ld: Assertion failed: (false && "not a GOT atom in non lazy pointers section"), function symbolIndexOfNonLazyAtom, file Layout.cpp, line 4930. clang: error: linker command failed with exit code 1 (use -v to see invocation)

Accepted Answer

[I’m gonnna need a hot key for this (-: ]

This isn’t the same issue, but see my response here. In short:

  • There’s a new linker implementation.

  • You can temporarily switch back to the old one.

  • If you need a long-term fix, make sure to file a bug.

  • If you do file a bug, please post your bug number, just for the record.

Share and Enjoy

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

Thank you Quinn, for the quick response =]

I've submitted a feedback a couple of days ago: FB13171156

Failed build: ld assertions being hit with Xcode 15
 
 
Q