Skip to content
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

Provide Protobuf library if libtorch was built with included version #14277

Open
fmder opened this issue Nov 21, 2018 · 3 comments
Open

Provide Protobuf library if libtorch was built with included version #14277

fmder opened this issue Nov 21, 2018 · 3 comments
Labels
module: build Build system issues module: cpp Related to C++ API module: protobuf triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@fmder
Copy link
Contributor

fmder commented Nov 21, 2018

When building pytorch and libtorch with python setup.py build, an internal version of protobuf is used. Our C++ app also uses Protobuf but finds an incompatible version with the one used by libtorch. Would it be possible to add to the install a ProtobufConfig.cmake so that we can link against the same protobuf?

cc @yf225

@soumith
Copy link
Member

soumith commented Nov 21, 2018

the symbols of protobuf built internal to libtorch shouldn't even be exposed to the outside world. afaik those symbols are marked as hidden.

Hence, you should be able to safely build and link your C++ app using your protobuf of choice.

Are you getting linker errors in your C++ app?

@fmder
Copy link
Contributor Author

fmder commented Nov 21, 2018

The problem might be elsewhere then.

The error I get is a version missmatch when I generate my protoc.hpp file. The missmatch is because of the "google/protobuf/stubs/common.h" file that appears in the included path from TORCH_INCLUDE_DIRS.

@zou3519 zou3519 added the module: build Build system issues label Nov 26, 2018
@yf225 yf225 added module: protobuf triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module module: cpp Related to C++ API labels Oct 23, 2019
@yf225
Copy link
Contributor

yf225 commented Oct 23, 2019

This is related to #14573.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: build Build system issues module: cpp Related to C++ API module: protobuf triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

4 participants