-
Notifications
You must be signed in to change notification settings - Fork 629
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
Limit protobuff symbol visibility #179
Conversation
Builds 36082 and it seems to work at least now. I'm still thinking/working in the mean time on the long term solution. |
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
I created wrapper for proto_dali class that makes it private. It finally allows us to hide all libprotobuf symbols. |
Builds 36211. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH, I only mostly understand how this works by inspection. But if it passes the tests we have in place now without segfaulting then AFAIK it should be ok and better than what we had before.
@cliffwoolley - giving more background. The problem we have so far is that we leaks protobuf symbols. It happens because we expose dali_proto::* in our API and require everyone using to libdali.so to include dali.pb.h. dali.pb.h includes protobuf headers, so all libs depending on libdali.so need to link with libprotobuf. Currently we expose libprotobuf symbols in libdali.so (what is bad). This patch replaces dali_proto::* with DaliProtoPriv which makes dali.pb.h internal. Since now, all that everyone needs to do is to include dali_proto_intern.h which just keeps a pointer to dali_proto::Argument (but for that we don't need to expose dali.pb.h, it is just pointer to some class). |
I will deal with OpenCV and some C++ symbols in other PR. |
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki jlisiecki@nvidia.com