Alexey Serbin has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/18000


Change subject: KUDU-3334 hide protobuf symbols in libkudu_client
......................................................................

KUDU-3334 hide protobuf symbols in libkudu_client

As it turns out, there are conflicts during static initialization of
symbols related to protobuf extensions in an application linking in
libkudu_client and also dynamically linked against libprotobuf.  That
seems to be attributed to the creation of two independent descriptor
pools in such cases [1].  At least, such issues became apparent when
both the application and libkudu_client started using libprotobuf
3.14.0.

One example of an application described above is impalad.  It links in
libkudu_client and libprotobuf: the latter is necessary to communicate
with other Impala's backend components via KRPC.

This patch adds extra flags for the linker to completely hide all the
symbols inherited by libkudu_client from libprotobuf which is statically
linked into the Kudu C++ library in case of RELEASE builds.

As for the rest of libraries statically linked into libkudu_client,
it seems no problems encountered so far if those symbols are just made
local using the version script mechanism, so no other libraries are put
under --exclude-libs linker's flag except for libprotobuf.

[1] 
https://stackoverflow.com/questions/29960871/protobuf-message-object-creation-by-name

Change-Id: I584e1f726f8a4f368579c2c323a230fe98e29dee
---
M src/kudu/client/CMakeLists.txt
1 file changed, 4 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/00/18000/1
--
To view, visit http://gerrit.cloudera.org:8080/18000
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I584e1f726f8a4f368579c2c323a230fe98e29dee
Gerrit-Change-Number: 18000
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>

Reply via email to