Linker command fail after upgrade from xcode 9.2 to xcode 9.4.1

I upgraded XCode from 9.2 to 9.4.1 and now I am getting this error:

ld: Assertion failed: (target->definition() != ld::Atom::definitionProxy), function addDyldInfo, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-351.8/src/ld/OutputFile.cpp, line 4213.

EDIT: Here is the detailed error message.

Ld /Users/Regis/Library/Developer/Xcode/DerivedData/UmtPlus-gotzoynnllcwircryjfseogfutkh/Build/Products/Debug-iphoneos/UmtPlus.app/UmtPlus normal arm64 cd "/Users/Regis/Dropbox/Laubrass/Mac/UmtPlus V19/devRS_UmtPlus" export IPHONEOS_DEPLOYMENT_TARGET=8.2 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -L/Users/Regis/Library/Developer/Xcode/DerivedData/UmtPlus-gotzoynnllcwircryjfseogfutkh/Build/Products/Debug-iphoneos -F/Users/Regis/Library/Developer/Xcode/DerivedData/UmtPlus-gotzoynnllcwircryjfseogfutkh/Build/Products/Debug-iphoneos -filelist /Users/Regis/Library/Developer/Xcode/DerivedData/UmtPlus-gotzoynnllcwircryjfseogfutkh/Build/Intermediates.noindex/UmtPlus.build/Debug-iphoneos/UmtPlus.build/Objects-normal/arm64/UmtPlus.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=8.2 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/Regis/Library/Developer/Xcode/DerivedData/UmtPlus-gotzoynnllcwircryjfseogfutkh/Build/Intermediates.noindex/UmtPlus.build/Debug-iphoneos/UmtPlus.build/Objects-normal/arm64/UmtPlus_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/Regis/Library/Developer/Xcode/DerivedData/UmtPlus-gotzoynnllcwircryjfseogfutkh/Build/Intermediates.noindex/UmtPlus.build/Debug-iphoneos/UmtPlus.build/Objects-normal/arm64/UmtPlus.swiftmodule -lz -lsqlite3 -weak_framework Speech -Xlinker -dependency_info -Xlinker /Users/Regis/Library/Developer/Xcode/DerivedData/UmtPlus-gotzoynnllcwircryjfseogfutkh/Build/Intermediates.noindex/UmtPlus.build/Debug-iphoneos/UmtPlus.build/Objects-normal/arm64/UmtPlus_dependency_info.dat -o /Users/Regis/Library/Developer/Xcode/DerivedData/UmtPlus-gotzoynnllcwircryjfseogfutkh/Build/Products/Debug-iphoneos/UmtPlus.app/UmtPlus

0 0x106e252c0 __assert_rtn + 129 1 0x106e9b82e ld::tool::OutputFile::addDyldInfo(ld::Internal&, ld::Internal::FinalSection, ld::Atom const, ld::Fixup, ld::Fixup, ld::Fixup, ld::Atom const, ld::Atom const*, unsigned long long, unsigned long long) + 3244 2 0x106e901e9 ld::tool::OutputFile::generateLinkEditInfo(ld::Internal&) + 1215 3 0x106e8ab3a ld::tool::OutputFile::write(ld::Internal&) + 116 4 0x106e26254 main + 1146 A linker snapshot was created at: /tmp/UmtPlus-2018-07-15-074029.ld-snapshot ld: Assertion failed: (target->definition() != ld::Atom::definitionProxy), function addDyldInfo, file /Library/Caches/com.apple.xbs/Sources/ld64/ld64-351.8/src/ld/OutputFile.cpp, line 4213. clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 answer

  • answered 2018-08-15 05:55 Jayraj Vala

    That may be occurring because of command line tool. try Xcode -> preferences -> Locations and set command line tools to your Xcode 9.3.