-
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
Static initializers prevent using libraries which also use Protobuf #5914
Comments
If I understand correctly it sounds like TensorFlow bundles its own copy of protobuf, resulting in ODR violations when TensorFlow users try to use both TensorFlow and protobuf. Unfortunately I don't think we can really do anything on the protobuf side to fix this, and the only solution is to avoid linking against two separate copies of protobuf. The static initializers are not the problem, because ultimately ODR violations are undefined behavior no matter what how we do our initialization. |
What version of protobuf and what language are you using?
Version: v3.6.0
Language: C++
What operating system (Linux, Windows, ...) and version?
Linux Ubuntu 18.04
What runtime / compiler are you using (e.g., python version or gcc version)
GCC 7.3.0
What did you do?
Follow this link to see the steps to reproduce:
tensorflow/tensorflow#24976
What did you expect to see
I expect using Protobuf and Tensorflow (and any other library that uses Protobuf) to work fine together. Without using cumbersome workarounds like wrapping anything in an addition shared library.
What did you see instead?
Segmentation fault during static initialization.
See this link for more details:
tensorflow/tensorflow#24976
The text was updated successfully, but these errors were encountered: