Skip to content

iOS: Linker Error after update to Cpp version 4.4.2 #24

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

Closed
ForestRingGames opened this issue Mar 1, 2018 · 3 comments
Closed

iOS: Linker Error after update to Cpp version 4.4.2 #24

ForestRingGames opened this issue Mar 1, 2018 · 3 comments

Comments

@ForestRingGames
Copy link

ForestRingGames commented Mar 1, 2018

We recently reported this issue (#21 (comment)) and now tried to update to the latest version on iOS:

We downloaded iOS SDK version 4.9.0 and CPP SDK version 4.4.2 and added these frameworks (manually, no CocoaPods) to Xcode:

image

Unfortunately, we're getting this linker error:

Undefined symbols for architecture arm64:
  "flatbuffers::Parser::ParseFlexBuffer(char const*, char const*, flexbuffers::Builder*)", referenced from:
      firebase::util::JsonToVariant(char const*) in firebase(variant_util_be3a3a6b14e247f3427cf0fbbde761a7.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

We already tried to add all of the CPP framework files to the project, hoping that the missing parts would be in one of the other frameworks - but this didn't help. It seems like none of the frameworks contain the missing piece.

What can we do to get it running again?

@a-maurice
Copy link
Contributor

Hi, I'm a developer on the Firebase C++ libraries, sorry for the delay in getting back to you. This is indeed a missing dependency on our end, and we'll try to get a official fix out ASAP.

As for potential fixes to get you running again before that is out, there are two options:

  1. The symbols that are missing are not actually being used, so I'm wondering if you are using a linker flag that forces symbols to be resolved, like "-Wl,-force_load"? If so, dropping that might resolve your problem.

  2. I've attached a new firebase.framework that have those symbols removed, which should be another way to resolve your linker errors, if you want to try that out.

Thanks for pointing out this issue to us.
FirebaseFramework.zip

@ForestRingGames
Copy link
Author

Thank you, with your attached file it does work.

The only linker flag we use is "-ObjC", so that's most likely not the issue?

We're going to try to update Android as well tomorrow, we'll report back if we have any more issues (but hopefully not ;) )

@a-maurice
Copy link
Contributor

Great, glad that fixed it. We've released the fix officially with Firebase C++ 4.4.3:
https://firebase.google.com/support/release-notes/cpp-relnotes#4.4.3

@firebase firebase locked and limited conversation to collaborators Oct 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants