-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Undefined symbol errors when integrating Firebase SDK in Xcode project - Error: gRPC-Core Undefined symbol: absl::lts_20240116:: #13996
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Same here. |
Thanks for the report, this is an issue with the Abseil podspec that was exposed by the recent CocoaPods 1.16.1 release. Until a fix is released, see firebase/flutterfire#13563 (comment) for a workaround. The workaround could be applied manually as well by changing the build setting of the installed Abseil pod target in Xcode. |
[note: this was edited to be Add this to your Podfile if you want a workaround, note you may already have a post_install section, so you would just use the inner part(s): post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'abseil'
Pod::UI.puts "Workaround: Configuring abseil to use gnu++14 language standard for cocoapods 1.16+ compatibility".yellow
Pod::UI.puts " Remove workaround when upstream issue fixed https://github.com/firebase/firebase-ios-sdk/issues/13996".yellow
target.build_configurations.each do |config|
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'gnu++14'
end
end
end
end You will need to run |
Thank you for sharing the workaround @mikehardy |
The workaround didn't work on
|
I was able to fix it using C++17 post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'abseil'
Pod::UI.puts "Workaround: Configuring abseil to use c++17 language standard for cocoapods 1.16+ compatibility".yellow
Pod::UI.puts " Remove workaround when upstream issue fixed https://github.com/firebase/firebase-ios-sdk/issues/13996".yellow
target.build_configurations.each do |config|
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
end
end
end
end |
That's quite strange. The workaround definitely works for me with c++14, and I believe that's the intended direction for the fix (to add the same c++14 setting in abseil podspec that is in other podspecs) given discussion on #13989 - @paulb777 can you think of any reason 17 would be needed for @sauravexodus vs 14? |
Not sure - although to exactly match the CocoaPods 1.15 settings, |
Can you upload a full Podfile file for example. |
For reference, here is the commit that changed the Xcodeproj gem in the CocoaPods distribution CocoaPods/Xcodeproj@3157b7c#diff-ff9a4d09c635f0b936a889cc315e58fb2d38bf772b1712ea795498def364621aR424. Here is the discussion about the solution for the gRPC build grpc/grpc#38031 |
That explains why the other user had gnu++14, interesting that gRPC uses c++14 but here it's gnu++14. Anyway, I updated my workaround Podfile snippet in the various places I posted it to be gnu++14 after this new information, thanks |
@dorklein Flutter projects typically already have a post_install, regardless the idea is to add this to your post_install, only creating a whole post_install if you do not have one. You do not want to remove what is already there
Assuming you already have a post_install you want to keep all of it's contents, and just paste this into the bottom of the post_install before the final installer.pods_project.targets.each do |target|
if target.name == 'abseil'
Pod::UI.puts "Workaround: Configuring abseil to use gnu++14 language standard for cocoapods 1.16+ compatibility".yellow
Pod::UI.puts " Remove workaround when upstream issue fixed https://github.com/firebase/firebase-ios-sdk/issues/13996".yellow
target.build_configurations.each do |config|
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'gnu++14'
end
end
end ...then run
However, for Flutter there are reports of other modules having issues (url_launcher I believe?) and the only known-good-for-everything solution, if the above does not work for you, is to revert your cocoapods gem to 1.15.2 and your xcodeproj gem to 1.25.0: gem uninstall cocoapods
gem install cocoapods --version 1.15.2
gem uninstall xcodeproj # accept any warnings about dependent gems and just force it to uninstall
gem install xcodeproj --version 1.25.0
Since we all seem to be on the bleeding edge here regardless, I'll briefly mention that xcodeproj just released another patch release that looks like it is aimed 100% at this problem and likely fixes everything: https://github.com/CocoaPods/Xcodeproj/releases/tag/1.27.0 so perhaps just |
Fixed by updating to CocoaPods 1.16.2 |
Thanks, it works for me with Flutter projects, both successfully running locally on my Xcode and CodeMagic, with previously I tried this one #13996 (comment) change the 'gnu++14' to 'c++17' and it's fail |
Description
I’m experiencing a build failure in Xcode due to multiple “Undefined symbol” errors related to gRPC-Core and Abseil when integrating the Firebase SDK. The specific error messages indicate missing symbols for absl::lts_20240116:: components. The errors appear immediately after adding Firebase dependencies in the Podfile and running a build.
Reproducing the issue
Firebase SDK Version
11.4.0
Xcode Version
16.0
Installation Method
CocoaPods
Firebase Product(s)
Database, Firestore
Targeted Platforms
iOS
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
No response
If using CocoaPods, the project's Podfile.lock
PODS:
DEPENDENCIES:
SPEC CHECKSUMS:
Firebase: 7fd5466678d964be78fbf536d8a3385da19c4828
FirebaseABTesting: aef1719704fade00b200827e7973f352efc4caee
FirebaseAnalytics: 3feef9ae8733c567866342a1000691baaa7cad49
FirebaseAppCheckInterop: 1b9643ae2f1ee214488caa2f8e32b7bc2f0f3735
FirebaseAuth: c359af98bd703cbf4293eec107a40de08ede6ce6
FirebaseAuthInterop: 9ac948965ac13ec9d8a080f39490ddb2bda30520
FirebaseAuthUI: 8e5c09b20bf11478b9fa42c7ed6575fa95807c86
FirebaseCore: 6b32c57269bd999aab34354c3923d92a6e5f3f84
FirebaseCoreExtension: f1bc67a4702931a7caa097d8e4ac0a1b0d16720e
FirebaseCoreInternal: 35731192cab10797b88411be84940d2beb33a238
FirebaseCrashlytics: 41bbdd2b514a8523cede0c217aee6ef7ecf38401
FirebaseDatabase: ccd11f02c170076ffeeef40020cbb2f6d33e718c
FirebaseDynamicLinks: 192110d77418357fe994f2823a7df7db3ccb15bf
FirebaseEmailAuthUI: c448736db9fcd5895d29229a9e0aec016ece0389
FirebaseFacebookAuthUI: ff92c983c22ac3dce082beeaf8672c0c1b665650
FirebaseFirestore: 2ccdf893fd7e175aa8ec58faa06338b346d27db8
FirebaseFirestoreInternal: 004452c4669d5df8869c9f8f7a24ee0009852d5b
FirebaseGoogleAuthUI: bbfd673275e4a4a4a3d0e451884087452d088453
FirebaseInstallations: 6ef4a1c7eb2a61ee1f74727d7f6ce2e72acf1414
FirebaseOAuthUI: 13e6b83a4e9680f2806107d7b383ede1f550e499
FirebaseRemoteConfig: 7655681d02417bc9b287338edb9d721ff79e1a4a
FirebaseRemoteConfigInterop: e76f46ffa4d6a65e273d4dfebb6a79e588cec136
FirebaseSessions: 3f56f177d9e53a85021d16b31f9a111849d1dd8b
FirebaseSharedSwift: 505dae2d05969dbf6d43749a642bb1bf230f0252
FirebaseStorage: 1bf8f80ac3bb02c72844b7350e95e10be7113ef0
FirebaseStorageUI: 22fcea916105f65d47d38a3108b540282cab229d
FirebaseUI: 3909853fc34f316c822e195376f144b1b0c6ca15
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
abseil: d121da9ef7e2ff4cab7666e76c5a3e0915ae08c3
gRPC-C++: 2fa52b3141e7789a28a737f251e0c45b4cb20a87
gRPC-Core: a27c294d6149e1c39a7d173527119cfbc3375ce4
GoogleAppMeasurement: 987769c4ca6b968f2479fbcc9fe3ce34af454b8e
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
leveldb-library: cc8b8f8e013647a295ad3f8cd2ddf49a6f19be19
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
SDWebImage: 8a6b7b160b4d710e2a22b6900e25301075c34cb3
PODFILE CHECKSUM: a194547e91f868c217129d10c5eba58d2a378f7f
COCOAPODS: 1.16.1
The text was updated successfully, but these errors were encountered: