Undefined symbols for architecture arm64
jqn opened this issue · 2 comments
jqn commented
I'm currently experiencing this issue and makes the build fail. This is a React Native project.
Ld /Users/jqn/Library/Developer/Xcode/DerivedData/DLinkApp-efmwexzucdsucjbsjovaikdquqsy/Build/Products/Debug-iphoneos/DLinkApp.app/PlugIns/DLinkAppTests.xctest/DLinkAppTests normal arm64
cd /Users/jqn/Sites/dealerslink/iPhone-DealersLink/DLinkApp/ios
export IPHONEOS_DEPLOYMENT_TARGET=9.1
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 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -L/Users/jqn/Library/Developer/Xcode/DerivedData/DLinkApp-efmwexzucdsucjbsjovaikdquqsy/Build/Products/Debug-iphoneos -L/Users/jqn/Library/Developer/Xcode/DerivedData/DLinkApp-efmwexzucdsucjbsjovaikdquqsy/Build/Products/Debug-iphoneos/SocketRocket -L/Users/jqn/Library/Developer/Xcode/DerivedData/DLinkApp-efmwexzucdsucjbsjovaikdquqsy/Build/Products/Debug-iphoneos/libPusher -L/Users/jqn/Sites/dealerslink/iPhone-DealersLink/DLinkApp/ios/DLinkAppTests -F/Users/jqn/Library/Developer/Xcode/DerivedData/DLinkApp-efmwexzucdsucjbsjovaikdquqsy/Build/Products/Debug-iphoneos -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks -filelist /Users/jqn/Library/Developer/Xcode/DerivedData/DLinkApp-efmwexzucdsucjbsjovaikdquqsy/Build/Intermediates/DLinkApp.build/Debug-iphoneos/DLinkAppTests.build/Objects-normal/arm64/DLinkAppTests.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -miphoneos-version-min=9.1 -dead_strip -bundle_loader /Users/jqn/Library/Developer/Xcode/DerivedData/DLinkApp-efmwexzucdsucjbsjovaikdquqsy/Build/Products/Debug-iphoneos/DLinkApp.app/DLinkApp -Xlinker -object_path_lto -Xlinker /Users/jqn/Library/Developer/Xcode/DerivedData/DLinkApp-efmwexzucdsucjbsjovaikdquqsy/Build/Intermediates/DLinkApp.build/Debug-iphoneos/DLinkAppTests.build/Objects-normal/arm64/DLinkAppTests_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -licucore -framework CFNetwork -framework Security -ObjC -licucore -framework CFNetwork -framework Security -all_load -licucore -framework XCTest /Users/jqn/Library/Developer/Xcode/DerivedData/DLinkApp-efmwexzucdsucjbsjovaikdquqsy/Build/Products/Debug-iphoneos/libReact.a -lPods-DLinkAppTests /Users/jqn/Library/Developer/Xcode/DerivedData/DLinkApp-efmwexzucdsucjbsjovaikdquqsy/Build/Products/Debug-iphoneos/libPusher/liblibPusher.a -Xlinker -dependency_info -Xlinker /Users/jqn/Library/Developer/Xcode/DerivedData/DLinkApp-efmwexzucdsucjbsjovaikdquqsy/Build/Intermediates/DLinkApp.build/Debug-iphoneos/DLinkAppTests.build/Objects-normal/arm64/DLinkAppTests_dependency_info.dat -o /Users/jqn/Library/Developer/Xcode/DerivedData/DLinkApp-efmwexzucdsucjbsjovaikdquqsy/Build/Products/Debug-iphoneos/DLinkApp.app/PlugIns/DLinkAppTests.xctest/DLinkAppTests
Undefined symbols for architecture arm64:
"std::__1::__next_prime(unsigned long)", referenced from:
std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::rehash(unsigned long) in libReact.a(RCTJSCExecutor.o)
"operator new[](unsigned long)", referenced from:
executeRandomAccessModule(RCTJSCExecutor*, unsigned int, unsigned long, unsigned long) in libReact.a(RCTJSCExecutor.o)
readRAMBundle(std::__1::unique_ptr<__sFILE, int (*)(__sFILE*)>, RandomAccessBundleData&) in libReact.a(RCTJSCExecutor.o)
"___cxa_guard_acquire", referenced from:
cachedSystemFont(double, double) in libReact.a(RCTFont.o)
"operator delete(void*)", referenced from:
std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::~__hash_table() in libReact.a(RCTJSCExecutor.o)
std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::__deallocate(std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, unsigned long>, void*>*) in libReact.a(RCTJSCExecutor.o)
____ZL37installBasicSynchronousHooksOnContextP9JSContext_block_invoke_5 in libReact.a(RCTJSCExecutor.o)
std::__1::unique_ptr<std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, unsigned long>, void*>, std::__1::__hash_node_destructor<std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, unsigned long>, void*> > > > std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::__construct_node_hash<std::__1::pair<unsigned long const, unsigned long> const&>(unsigned long, std::__1::pair<unsigned long const, unsigned long> const&&&) in libReact.a(RCTJSCExecutor.o)
std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::__rehash(unsigned long) in libReact.a(RCTJSCExecutor.o)
std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::erase(std::__1::__hash_const_iterator<std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, unsigned long>, void*>*>) in libReact.a(RCTJSCExecutor.o)
RCTSetUpCustomLibraryPointers() in libReact.a(RCTJSCWrapper.o)
...
"operator delete[](void*)", referenced from:
-[RCTJSCExecutor dealloc] in libReact.a(RCTJSCExecutor.o)
executeRandomAccessModule(RCTJSCExecutor*, unsigned int, unsigned long, unsigned long) in libReact.a(RCTJSCExecutor.o)
readRAMBundle(std::__1::unique_ptr<__sFILE, int (*)(__sFILE*)>, RandomAccessBundleData&) in libReact.a(RCTJSCExecutor.o)
RandomAccessBundleData::~RandomAccessBundleData() in libReact.a(RCTJSCExecutor.o)
"operator new(unsigned long)", referenced from:
std::__1::unique_ptr<std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, unsigned long>, void*>, std::__1::__hash_node_destructor<std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<unsigned long, unsigned long>, void*> > > > std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::__construct_node_hash<std::__1::pair<unsigned long const, unsigned long> const&>(unsigned long, std::__1::pair<unsigned long const, unsigned long> const&&&) in libReact.a(RCTJSCExecutor.o)
std::__1::__hash_table<std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::__unordered_map_hasher<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::hash<unsigned long>, true>, std::__1::__unordered_map_equal<unsigned long, std::__1::__hash_value_type<unsigned long, unsigned long>, std::__1::equal_to<unsigned long>, true>, std::__1::allocator<std::__1::__hash_value_type<unsigned long, unsigned long> > >::__rehash(unsigned long) in libReact.a(RCTJSCExecutor.o)
RCTSetUpCustomLibraryPointers() in libReact.a(RCTJSCWrapper.o)
RCTSetUpSystemLibraryPointers() in libReact.a(RCTJSCWrapper.o)
"___cxa_begin_catch", referenced from:
___clang_call_terminate in libReact.a(RCTJSCExecutor.o)
"___cxa_guard_release", referenced from:
cachedSystemFont(double, double) in libReact.a(RCTFont.o)
"___cxa_demangle", referenced from:
____RCTLogNativeInternal_block_invoke in libReact.a(RCTLog.o)
"std::__1::mutex::lock()", referenced from:
cachedSystemFont(double, double) in libReact.a(RCTFont.o)
-[RCTModuleData setUpInstanceAndBridge] in libReact.a(RCTModuleData.o)
"std::terminate()", referenced from:
___clang_call_terminate in libReact.a(RCTJSCExecutor.o)
"std::__1::mutex::~mutex()", referenced from:
cachedSystemFont(double, double) in libReact.a(RCTFont.o)
-[RCTModuleData .cxx_destruct] in libReact.a(RCTModuleData.o)
"std::__1::mutex::unlock()", referenced from:
cachedSystemFont(double, double) in libReact.a(RCTFont.o)
-[RCTModuleData setUpInstanceAndBridge] in libReact.a(RCTModuleData.o)
"___gxx_personality_v0", referenced from:
+[RCTConvert(RCTFont) UIFont:] in libReact.a(RCTFont.o)
+[RCTConvert(RCTFont) RCTFontWeight:] in libReact.a(RCTFont.o)
___37+[RCTConvert(RCTFont) RCTFontWeight:]_block_invoke in libReact.a(RCTFont.o)
+[RCTConvert(RCTFont) RCTFontStyle:] in libReact.a(RCTFont.o)
___36+[RCTConvert(RCTFont) RCTFontStyle:]_block_invoke in libReact.a(RCTFont.o)
+[RCTConvert(RCTFont) RCTFontVariantDescriptor:] in libReact.a(RCTFont.o)
___48+[RCTConvert(RCTFont) RCTFontVariantDescriptor:]_block_invoke in libReact.a(RCTFont.o)
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
jqn commented
The issue was CocoaPods. If you run into this issue what I did to fix it was to remove the tests target from the Pod file. It might not be the correct solution but it will help you move along with your project.
target "MyAppTests" do
end
lukeredpath commented
I can't see any symbols coming from libPusher here so I don't think this is a libPusher issue.