Firebase-ios-sdk: Duplicate symbol _FirebaseCoreVersionString for architecture arm64 when using SDK version 5.0.0 via Cocoapods

Created on 10 May 2018  路  4Comments  路  Source: firebase/firebase-ios-sdk

Evironment

  • Xcode version: Version 9.3 (9E145)
  • Firebase SDK version: 5.0.0
  • Firebase Component: Core
  • Component version: 5.0.0

Problem

Steps to reproduce:

Can not reproduce in a clean/simple project that contains only Firebase/Core as its cocoa pod dependency.

  1. Pod install
  2. Archive
  3. Error

Error Code:

duplicate symbol _FirebaseCoreVersionString in:
    /Users/user/Library/Developer/Xcode/DerivedData/Target-dowlcsklsjexzzgbaaufnfpvjeqd/Build/Intermediates.noindex/ArchiveIntermediates/Target/BuildProductsPath/Release-iphoneos/FirebaseCore/FirebaseCore.framework/FirebaseCore(FIRVersion.o)
    /Users/user/Library/Developer/Xcode/DerivedData/Target-dowlcsklsjexzzgbaaufnfpvjeqd/Build/Intermediates.noindex/ArchiveIntermediates/Target/BuildProductsPath/Release-iphoneos/FirebaseCore/FirebaseCore.framework/FirebaseCore(FirebaseCore_vers.o)
ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Discussion

Tried to delete ~/Library/Developer/Xcode/DerivedData/ but the error perseveres.
Firebase/Core 4.0.20 part of Firebase 4.13.0 works as intended.

core

All 4 comments

@averello This looks like a known issue that the fix will go out in the next patch. (Unfortunately a documentation glitch is currently showing the 5.0.0 known issues in the 4.13.0 section of the release notes.)

The fix (and workaround) is visible at #1223.

Note, that we've only seen this issue when the -all_load option is set in Other Linker Flags. Is that the case for you?

+1. I just got this too when I updated from cocoapods 1.4.0 to 1.5.2, presumably because I cleared my build folder.
Yes, I have -all_load, required by one of the frameworks I build.

duplicate symbol _FirebaseCoreVersionString in:
    /Users/Tim/Library/Developer/Xcode/DerivedData/Photobooth-carrpjksdzfewpftlvqzuglaxplu/Build/Products/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/FirebaseCore(FIRVersion.o)
    /Users/Tim/Library/Developer/Xcode/DerivedData/Photobooth-carrpjksdzfewpftlvqzuglaxplu/Build/Products/Debug-iphonesimulator/FirebaseCore/FirebaseCore.framework/FirebaseCore(FirebaseCore_vers.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

UPDATE: per the answer here, -all_load is no longer needed (since XCode 4.2 it seems!) if you're using -ObjC. https://stackoverflow.com/questions/2567498/objective-c-categories-in-static-library/2615407#2615407

I removed it from the libs that needed it, and those libs appear to still be working fine. So far (caveat emptor)

@xaphod Thanks for the confirmation! I'll close this now since the fix is on the way for the next release.

Was this page helpful?
0 / 5 - 0 ratings