Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase pods generate duplicate symbols for architecture arm64

I need help to solve my duplicate symbols errors. It started after installing Firebase Analytics with CocoaPods.

The duplicate symbols were all (34) in: /Library/Developer/Xcode/DerivedData/appName/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/nanopb.build/Objects-normal/arm64/

pb_common 2.o; pb_common.o; pb_encode 2.o; pb_encode.o; pb_decode 2.o and pb_decode.o

After updating to Xcode 11.2 and installing Firebase 6.10.0 (was 6.11.0) 5 other duplicate symbol errors appeared in GoogleUtilities:

duplicate symbol '_OBJC_CLASS_$_GULAppEnvironmentUtil' in:
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULAppEnvironmentUtil 3.o
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULAppEnvironmentUtil.o

duplicate symbol '_OBJC_METACLASS_$_GULAppEnvironmentUtil' in:
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULAppEnvironmentUtil 3.o
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULAppEnvironmentUtil.o

duplicate symbol '_GULNSDataZlibRemainingBytesKey' in:
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULNSData+zlib 2.o
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULNSData+zlib.o

duplicate symbol '_GULNSDataZlibErrorKey' in:
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULNSData+zlib 2.o
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULNSData+zlib.o

duplicate symbol '_GULNSDataZlibErrorDomain' in:
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULNSData+zlib 2.o
/Users/abnormalsolutions/Library/Developer/Xcode/DerivedData/infood-agjvxotmgtevwrbdluxflosleqao/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/GoogleUtilities.build/Objects-normal/arm64/GULNSData+zlib.o

ld: 5 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation).

I have seen other duplicate symbols questions on SO and tried out some suggestions, but I don't dare experimenting too much. Deleting Derived data does not help. I also tried removing -Objc linker flag from Other Linker flags under Build Settings, as suggested here on SO. Didn't help either.

I'm now back with Firebase 6.11.0. Here are my Firebase pods:

pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Messaging'
pod 'Firebase/AdMob'

Please tell me if I need to post more details. I really have no idea how to deal with this!

like image 485
Dan Abnormal Avatar asked Oct 31 '19 21:10

Dan Abnormal


1 Answers

Ok, so I came across a solution.

pod deintegrate
pod install
like image 101
Dan Abnormal Avatar answered Oct 16 '22 15:10

Dan Abnormal