Firebase-ios-sdk: Archiving app with AdMob and FirebaseCore generates linker warnings

Created on 15 Aug 2017  路  34Comments  路  Source: firebase/firebase-ios-sdk

  • Include pod 'Firebase/AdMob' pod 'Firebase/Core'in Podfile
  • Enable bitcode in Target \ Build Settings \ Build Options \ Enable bitcode
  • Product \ Archive

screen shot 2017-08-15 at 8 38 21 am

Tracked internally at b/63515760

ads

Most helpful comment

I'll open a new issue for this, since it's different from (though may be caused by) the original issue.

All 34 comments

Disabling Bitcode helps.

I can confirm with Xcode 9.3 Firebase 4.13 this issue still exists, and is quite annoying, as it generates over 200 errors. Disabling bitcode helps, but should not have to be done, since bitcode is useful for other things.

I can confirm Xcode 9.3 with the following pods , still has the issue when archiving project , any news on this ?

  • Firebase/AdMob (5.0.1):

    • Firebase/Core

    • Google-Mobile-Ads-SDK (= 7.30.0)

    • Firebase/Core (5.0.1):

    • Firebase/CoreOnly

    • FirebaseAnalytics (= 5.0.0)

    • Firebase/CoreOnly (5.0.1):

    • FirebaseCore (= 5.0.1)

    • FirebaseAnalytics (5.0.0):

    • FirebaseCore (~> 5.0)

    • FirebaseInstanceID (~> 3.0)

    • "GoogleToolboxForMac/NSData+zlib (~> 2.1)"

    • nanopb (~> 0.3)

    • FirebaseCore (5.0.1):

    • "GoogleToolboxForMac/NSData+zlib (~> 2.1)"

    • FirebaseInstanceID (3.0.0):

    • FirebaseCore (~> 5.0)

    • Google-Mobile-Ads-SDK (7.30.0)

We've run into this recently as well. It unfortunately kills any hope of noiseless CI reporting since it logs about 400 warnings during linking.

We'd appreciate an update on when this can be realistically silenced. Thanks 馃檹

The team is currently looking into this - we will ping this thread once we have more information.

Having the same isssue, but can鈥檛 archive at all. Using Carthage.

'/Users/xcodeserver/Library/Caches/XCSBuilder/Bots/742a8dbbc9ab5d4a5ddc9a4d1e174e0e/Source/Carthage/Build/iOS/Firebase.framework/Firebase' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file '/Users/xcodeserver/Library/Caches/XCSBuilder/Bots/742a8dbbc9ab5d4a5ddc9a4d1e174e0e/Source/Carthage/Build/iOS/Firebase.framework/Firebase' for architecture armv7

@walsht It looks like you're missing the Delete Firebase framework step from the Carthage instructions. The Firebase framework is only used for compiling and should not be used for linking.

@paulb777 Yes I did, thank you for pointing that out.

@davidair @paulb777 this issue is still occurring as originally reported, though. Very annoying...

@BranchS We expect to address the original issue with the next version of the Google-Mobile-Ads-SDK pod.

@paulb777 awesome! I assume that also goes for those of us on the downloadable SDK (no pods)?

@BranchS Yep, it would be in the next downloadable zip Firebase SDK after the Google-Mobile-Ads-SDK update.

This should be fixed in Google-Mobile-Ads 7.31.0 and higher. Please comment if you're still running into this issue.

Thanks @morganchen12 and @paulb777 馃憤 Did this happen to get cherry-picked into the Firebase pod subspecs as well? Not seeing it explicitly in https://firebase.google.com/support/release-notes/ios

Google Mobile Ads is both a standalone and Firebase product, so its changes weren't tracked in the Firebase changelog.

There's some ongoing discussion on whether or not we should include Google Mobile Ads changes in the Firebase changelog, so this may change in the future.

@morganchen12 @paulb777 Finally had an opportunity to update both Firebase (5.5.0) and Google-Mobile-Ads (7.31.0) and still seeing this during Xcode Archive builds.

I've included a sample project here reproducing the warnings: https://github.com/rob-keepsafe/FirebaseWarnings

@morganchen12 @paulb777 Same here with latest Xcode (9.4.1.) when archiving.

Using Firebase (5.5.0)
Using Google-Mobile-Ads-SDK (7.31.0)

Can you tell from the build log which library is causing these linker warnings?

I see 133 warnings when I clone the sample project, rename the bundle and archive. It's not immediately clear the origin of the offending symbols, but all of the other pods are from Firebase.

Thanks for the easily reproducible example @rob-keepsafe !

Disabling bitcode still is a workaround. I just checked the build log of my app, but I cannot see where the warnings are coming from. All I see there is this:

ld: warning: Linker asked to preserve internal global: 'sharedInstance.sharedInstance'
ld: warning: Linker asked to preserve internal global: '__block_descriptor_tmp'
ld: warning: Linker asked to preserve internal global: '__block_literal_global'
ld: warning: Linker asked to preserve internal global: '__block_descriptor_tmp'
ld: warning: Linker asked to preserve internal global: '__block_literal_global'
ld: warning: Linker asked to preserve internal global: '__block_descriptor_tmp'
ld: warning: Linker asked to preserve internal global: '__block_descriptor_tmp'
ld: warning: Linker asked to preserve internal global: '__block_literal_global'
Showing first 200 warnings only

Same bug here, not seems a destructive bug... release go fine...but is disturbing.

Xcode 10 GM, any project I add the quite fresh GoogleMobileAdsSdkiOS-7.33.1 (as a standalone), I get the warnings. It's been like that for quite a while (I think Xcode 8.x), amazing that it hasn't been fixed yet!
At least it doesn't seem to cause any problems that I can see.

Can confirm on Xcode 10, Firebase 5.9 generates 1785 warnings.

I can also confirm in Xcode 10 and Xcode 10.1 beta that the problem still persists.

@morganchen12 @paulb777 any update on this...? while not a showstopper, it's extremely frustrating, especially seeing as it's been going on for over a year...

Hey all, sorry for the slow update--Paul's identified the root cause and the AdMob team is continuing to investigate.

@morganchen12 Glad to hear it that the root cause was identified-- are you able to share it (just out of curiosity)? ETA yet for fix? Thanks so much for the continued work on this!

Hey thanks for getting on this.

Fixed in Google-Mobile-Ads-SDK 7.35.2

Confirmed fixed 馃帀 Thanks for all your help @paulb777 and @morganchen12 !

Just an fyi, looks like this may have caused a crash (or it's just coincidence that they both relate to a shared instance singleton): https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/ios/2ePobCo3QNg

We're reverting back to v7.34.0 with the linker warnings 鈽癸笍

@paulb777 can this be officially reopened, then? thanks!

I'll open a new issue for this, since it's different from (though may be caused by) the original issue.

Was this page helpful?
0 / 5 - 0 ratings