-
Notifications
You must be signed in to change notification settings - Fork 74k
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 for libtensorflow_cc.so when using LoadSavedModel #40004
Comments
Hi @ravikyram It seems links 1 and 3 are about building tensorflow_cc.so itself. I'm having no issues building the tensorflow library, just with linking against it, so I'll discard those.
I just realised, I built tensorflow_cc with the commandline |
To supplement the information I already put here, I continued developing my program after having exported the protobuf symbols from libtensorflow_cc.so. However, I ran into a version issue where another dependency used a different version of protobuf. I understand that such are not really concerns of tensorflow, and just exporting the symbols is the simpler option, but an ideal solution for me would be to make sure the header "tensorflow/cc/saved_model/loader.h" does not depend on protobuf symbols. Or more likely, implement an alternative interface that does not use protobuf::Map and an implementation similar to SavedModelBundleLite |
@xiandong79 That is exactly the error I reported here, perhaps mark it duplicate and close? No need to open multiple issues for the same problem |
@dhgelling Sure, I have closed it. #44899 do you have solutions to overcome/bypass the error? |
yes, expanding on the solution I mentioned when reporting the issue, before building / linking libtensorflow_cc.so, add |
add
As I use FloopCZ /tensorflow_cc (re-)Build and (re-)install the library
however, it does not work yet. @dhgelling should I do other modification? |
I mean if that solution works then go with that, no? The reason my solution doesn't work with Another option would be to just make the changes in a branch of tensorflow and make |
@dgel |
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you. |
Closing as stale. Please reopen if you'd like to work on this further. |
The version scripts don't export any symbols from protobuf. This is fine as long as basic functionality doesn't use symbols from protobuf, but LoadSavedModel seems to me to be a part of the basic functionality of tensorflow. Adding
*google*protobuf*
to the version scripts fixes the issue, as would hiding the protobuf data from the interfaceSystem information
Describe the current behavior
When using the LoadSavedModel function from c++ and linking against tensorflow_cc.so, a link error appears saying
undefined reference to 'google::protobuf::internal::MapFieldBase::SyncMapWithRepeatedField() const'
Describe the expected behavior
The program links and runs without issues
Standalone code to reproduce the issue
Any c++ program using LoadSavedModel and linking libtensorflow_cc.so will do
The text was updated successfully, but these errors were encountered: