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

clients:CMake:Hide symbols that are not TRTIS API #589

Merged

Conversation

Airie
Copy link
Contributor

@Airie Airie commented Aug 27, 2019

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

@@ -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")
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed : )

{
global:
extern "C++" {
nvidia::inferenceserver*
Copy link
Contributor

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*

Copy link
Contributor Author

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?

Copy link
Contributor

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>
@deadeyegoodwin deadeyegoodwin merged commit a799384 into triton-inference-server:master Aug 28, 2019
@Airie Airie deleted the cmake_hide_grpc_symbol branch August 28, 2019 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants