-
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
Std C++ levelDB linker error when linking against 6.14-6.16. #4819
Comments
This comment has been minimized.
This comment has been minimized.
Not sure why, but it looks like the C++ library is not being linked. This might help - https://stackoverflow.com/a/41729038/556617 |
That improved the situation now only get but this does not happen when I go back to 6.13.
|
As a side note I do have |
The last few missing symbols are from the FirebaseInstallatinos framework. It's a newer dependency, so it may not be linked into your project. Can you make sure it's included in your linked binaries and libraries in Xcode? |
OK it links now after I added the
But it links now after adding that Promises library. I also had to add the |
Thanks, it would still be helpful to know why the |
the linker should pick it the I'd like to see a reproducible example or other reports before updating the docs. |
This is what the module map for levelDB looks like (6.16):
|
Looks unchanged to me for 6.13.
|
Are you able to binary search between a project with the working 6.13.0 and not working 6.16.0 to see what's different? This could also be an issue with a corrupt Xcode module cache in DerivedData. Does removing DerivedData and rebuilding make a difference? |
I regularly delete DerivedData, in fact part of my build scripts because I have had so many issues with it. I will see if I can do a binary diff today. It is very consistent though and our project is not very complex, maybe I can create a small project to reproduce it for you. |
Sounds good. We can dive deeper with a repro case. |
hey I ran in the same issue. my repo is https://github.com/nidegen/Sketcher/tree/firebase |
Really looking forward to spm binary support 😄 |
@nidegen Thanks for the testcase. I've reproduced there and with the Database quickstart. Investigating .... |
The problem is the FirebaseDatabase module map. See the bottom for the details. It seems that since leveldb is not actually referenced as a module, the linker does not process its modulemap. The c++ reference must also be in the FirebaseDatabase module map. We'll fix in the next release. In the meantime, a workaround is to reset the module map as below to the 6.13.0 version or to explicitly add libc++ to the
|
awesome, thanks for looking into! i actually remember to have linked it to libc++ in another project:) looking forward to spm support;) |
Yes, thank you, sorry I did not get a repro case to you, things got busy. |
i updated the demo project to 6.18, and the linking of sqlite and libc++ still seem to not be working: https://github.com/nidegen/Sketcher/tree/firebase |
[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
When I try to link my library with versions after 6.13 I am getting an error saying it cant find std library symbols when linking the levelDB library. I get this error when I try to link my library to the Firebase SDK. The
carthage update
command succeeds without error, this is only after linking to my library.if I go back to 6.13 it does not have link errors.
Relevant Code:
Cartfile using 6.14, similar problem with 6.15 and 6.16 does not happen with 6.13:
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"==6.14
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAuthBinary.json"==6.14
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDatabaseBinary.json"==6.14
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMessagingBinary.json"==6.14
The text was updated successfully, but these errors were encountered: