Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate symbol errors with Firebase iOS SDK v5.5.0+ #1832

Closed
andwun opened this issue Sep 17, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@andwun
Copy link

commented Sep 17, 2018

After upgrading Firebase iOS SDK from v5.4.1 to v5.5.0 or later, duplicate symbol errors make my builds fail:

duplicate symbol _pb_field_iter_next in:
    /Users/redacted/Library/Developer/Xcode/DerivedData/redacted-fajkgspepnsyukaipdzoafipxkmd/Build/Products/Debug-iphonesimulator/nanopb/libnanopb.a(pb_common.o)
    /Users/redacted/Documents/Code/redacted/iOS/Pods/GoogleAppMeasurement/Frameworks/GoogleAppMeasurement.framework/GoogleAppMeasurement(pb_common_072e976572d290cdb35c7ac508302b94.o)
[...]
ld: 30 duplicate symbols for architecture x86_64

I'm using Cocoapods to integrate Firebase. use_frameworks! is not used.

From analyzing Podfile.lock, the dependency tree looks like:

  • Firebase/Core
    • FirebaseAnalytics
      • nanopb
      • GoogleAppMeasurement
        • nanopb

... so this seems much like a Firebase-internal problem.

Does this mean use_frameworks! is now required to use the SDK?
If so, it would be helpful to have this mentioned in the docs and release notes.

Environment

  • Xcode version: 9.4.1 and 10.0 GM
  • Firebase SDK version: Good: 5.4.1, Bad: 5.5.0
  • Cocoapods version: 1.5.3
@paulb777

This comment has been minimized.

Copy link
Member

commented Sep 17, 2018

CocoaPods should ensure there is only one version of pb_common.o. I suspect the problem is from cruft in DerivedData between Firebase version updates. Does rm -rf ~/Library/Developer/Xcode/DerivedData help? If you're still stuck, please share the Podfile and Podfile.lock.

@Piramanayagamm

This comment has been minimized.

Copy link

commented Sep 19, 2018

I am also facing the same problem. Removing DerivedData is not helping out. Here is my Pod file

target 'XXX' do
pod 'UIColor+Hex'
pod 'AFNetworking', '> 2.6.3'
pod 'AFNetworkActivityLogger', '
> 2.0'
pod 'Lockbox', '> 2.1.0'
pod 'libextobjc', '
> 0.4'
pod 'Mantle', '1.5.4'
pod 'ReactiveCocoa', '> 2.0'
pod 'RSSwizzle', '
> 0.1.0'
pod 'GoogleTagManager', '3.15.0'
pod 'UrbanAirship-iOS-SDK', '8.6.0'
pod 'TOCropViewController', '2.2'
pod 'UICountingLabel', '~> 1.4.0'
pod 'Fabric', '1.7.2'
pod 'Crashlytics', '3.9.3'
pod 'OptimizelySDKiOS','2.1.0'
pod 'Firebase/Core'
end

@ryanwilson

This comment has been minimized.

Copy link
Member

commented Sep 19, 2018

@Piramanayagamm can you please share your Podfile.lock as well so we can see what versions each pod resolved to? Thanks!

@paulb777 paulb777 added this to the 5.9.0 milestone Sep 20, 2018

@paulb777

This comment has been minimized.

Copy link
Member

commented Sep 20, 2018

We reproduced this yesterday and the fix will be in the upcoming Firebase 5.9.0 release. Internally tracked at b/116139404

Two possible workarounds:

  • Use use_frameworks! in the Podfile
  • Remove -all_load from the Other Linker Flags Build Setting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.