-
Notifications
You must be signed in to change notification settings - Fork 27
RSDK-9740: Make google libraries a private dependency of the SDK #357
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
Conversation
acmorrow
left a comment
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.
This is really great. I think several of the places where grpc is being tagged as a dependency are perhaps vestigial?
| target_link_libraries(simple_module | ||
| PRIVATE Threads::Threads | ||
| viam-cpp-sdk::viamsdk | ||
| ${VIAMCPPSDK_GRPCXX_LIBRARIES} |
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'm a little surprised that simple_module has a direct link dependency on grpc?
| target_link_libraries(tflite_module | ||
| PRIVATE Threads::Threads | ||
| PRIVATE viam-cpp-sdk::viamsdk | ||
| PRIVATE ${VIAMCPPSDK_GRPCXX_LIBRARIES} |
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.
Ditto tflite module dependency on grpc
|
|
||
| target_link_libraries(example_module | ||
| viam-cpp-sdk::viamsdk | ||
| gRPC::grpc++ |
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.
Same question
| PUBLIC Boost::log | ||
| PUBLIC xtensor | ||
| PRIVATE ${VIAMCPPSDK_GRPCXX_REFLECTION_LIBRARIES} | ||
| PRIVATE ${VIAMCPPSDK_GRPCXX_LIBRARIES} |
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.
🎉
| PRIVATE ${VIAMCPPSDK_GRPCXX_REFLECTION_LIBRARIES} | ||
| PRIVATE ${VIAMCPPSDK_GRPCXX_LIBRARIES} | ||
| PRIVATE ${VIAMCPPSDK_GRPC_LIBRARIES} | ||
| PRIVATE ${VIAMCPPSDK_PROTOBUF_LIBRARIES} |
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 have a suspicion there may no longer be any actual direct usage of abseil in viamsdk. Can you please check?
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.
happily you're right!
| target_link_libraries(example_dial_api_key | ||
| Boost::program_options | ||
| viam-cpp-sdk::viamsdk | ||
| ${VIAMCPPSDK_GRPCXX_LIBRARIES} |
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 don't see any actual use of grpc in this examples sources.
| # | ||
| find_package(viam-cpp-sdk CONFIG REQUIRED viamsdk) | ||
|
|
||
| find_package(gRPC CONFIG REQUIRED) |
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.
Still needed?
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.
Oops good catch thank you
acmorrow
left a comment
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.
LGTM, just a question.
|
|
||
| self.requires('xtensor/[>=0.24.3]') | ||
| self.requires('abseil/[>=20230125.3]', transitive_libs=True) | ||
| self.requires('abseil/[>=20230125.3]') |
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.
Is this actually still needed? I'd expect absl to be a transitive dep of proto/grpc so not needing to be mentioned here?
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 was surprised by this too but yes--my working theory is that it's because the API gencode does include some abseil headers/need some of their symbols, this was making the build fail with undefined symbol errors when I took it out
| if self.settings.os in ["Linux", "FreeBSD"]: | ||
| self.cpp_info.components[component].system_libs = ["pthread"] | ||
|
|
||
| self.cpp_info.components["viamapi"].requires.append("abseil::absl_strings") |
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.
Guessing this is related to above inclusion.
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.
Exactly!
No description provided.