-
Notifications
You must be signed in to change notification settings - Fork 1.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
clients:CMake:Hide symbols that are not TRTIS API #589
clients:CMake:Hide symbols that are not TRTIS API #589
Conversation
src/clients/c++/CMakeLists.txt
Outdated
@@ -40,7 +40,7 @@ add_library( | |||
$<TARGET_OBJECTS:proto-library> | |||
$<TARGET_OBJECTS:grpc-library> | |||
) | |||
|
|||
set_target_properties(request PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/EXPORT_SYMBOLS") |
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.
Can you follow the formatting convention from here: https://github.com/NVIDIA/tensorrt-inference-server/blob/master/src/servers/CMakeLists.txt#L223
Name the version script as librequest.ldscript and use configure_file to copy it to the build area: https://github.com/NVIDIA/tensorrt-inference-server/blob/master/src/servers/CMakeLists.txt#L209
Use 2 set_target_properties, one for LINK_FLAGS and one for LINK_DEPENDS.
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.
Fixed : )
src/clients/c++/EXPORT_SYMBOLS
Outdated
{ | ||
global: | ||
extern "C++" { | ||
nvidia::inferenceserver* |
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.
Should be able to use nvidia::inferenceserver::client*
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.
I actually started with client*, but in the simple_client.cc (and my internal project repo), there is this call: ni::ServerStatus server_status
status_ctx->GetServerStatus(&server_status);
, these will be undefined.
The server_status is defined in core/server_status.proto, seems like a server-only file?
request.h includes server_status.pb.h, should this server_status.pb.h be part of client headers as well?
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.
I see... you can just keep it like it is...
gRPC symbols were visible and caused crash on client application which is using different version of gRPC Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
fix style
2fb23eb
to
6dd8e00
Compare
gRPC symbols were visible and caused crash on
client application which is using different
version of gRPC
Signed-off-by: Wenjia Zhou wenjiaz@nvidia.com