-
Notifications
You must be signed in to change notification settings - Fork 15.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
Link Error since 3.20 #9975
Comments
Now that I dug a bit deeper into protobuf code, the problem is quite simple. |
Dupe of #9947 though thanks for filing. I'll see what we can do about this. |
@elharo It looks like the linked bug #9947 has been closed. I'm hitting the exact same issue as @thierryba on the Android platform with clang (using vcpkg). I've built the Release version of protobuf 3.20.1 and am seeing a linker error with a simple test:
Should this bug or #9947 be reopened? It would be great to get this addressed and included in the upcoming 3.21 release. Thanks! In the meantime, is there a known workaround for the issue? |
Thinking about it more... this may be due to our team/project's toolchain and a missing definition of NDEBUG. I'll dig deeper to ensure that is setup properly. Sorry for the noise! |
What version of protobuf and what language are you using?
Version: 3.20.1
Language: C++
What operating system (Linux, Windows, ...) and version?
MacOS 12
What runtime / compiler are you using (e.g., python version or gcc version)
Apple clang version 13.1.6
What did you do?
Steps to reproduce the behavior:
What did you expect to see
I'm expecting the binary to link flawlessly. It does with any version of protibuf up to (and including) 3.19.4.
What did you see instead?
Undefined symbols for architecture x86_64:
"google::protobuf::internal::InternalMetadata::~InternalMetadata()", referenced from:
google::protobuf::MessageLite::~MessageLite() in libFWProtobuf.a(foo.pb.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
The text was updated successfully, but these errors were encountered: