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

Update to only export LIBRARY_EXPORT symbols from the shared library for Linux #362

Merged

Conversation

yaqian256
Copy link
Contributor

@yaqian256 yaqian256 commented Jun 5, 2024

This PR is to update the Linux build to only export LIBRARY_EXPORT symbols from the shared library.

Currently the labview grpc shared library for Linux exports all symbols. This causes symbol collisions for some use case. For example, the liblabview_grpc_server.so exports the following unique symbols (you can see the full list by running the nm -C -D liblabview_grpc_server.so command)

0000000000b3ef88 u grpc::internal::GrpcLibraryInitializer::GrpcLibraryInitializer()::g_core_codegen
0000000000b3ef98 u grpc::internal::GrpcLibraryInitializer::GrpcLibraryInitializer()::g_gli

If in a labview app that uses grpc-labview, it calls another C library that also uses grpc which also exports the above symbols, there will be collisions.

To avoid that issues, we should update the Linux build (include both Desktop and RT) to only export LIBRARY_EXPORT symbols from the shared library. We already do this for the Windows build.

@yaqian256 yaqian256 marked this pull request as ready for review June 5, 2024 08:01
@yaqian256 yaqian256 changed the title Update to only export LIBRARY_EXPORT symbols from the shared library Update to only export LIBRARY_EXPORT symbols from the shared library for Linux Jun 5, 2024
@ni-sujain ni-sujain merged commit add68a6 into ni:master Jun 12, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants