-
Notifications
You must be signed in to change notification settings - Fork 2.1k
arrow: Add missing protobuf as tool_requires #28902
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
arrow: Add missing protobuf as tool_requires #28902
Conversation
When using protobuf, protoc is run at build time. Without this change protoc will fail to run if protobuf is built with shared=true.
franramirez688
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.
Thanks for this PR! 🙏
Looks great, but could you add the failure/success logs to your PR description before/after applying your fix? It helps a lot for reviewers and any other users 😁
|
I can confirm that without this, building with After the fix, this now compiles as expected, but it needs a further fix for the repro option |
| self.cpp_info.components["libarrow_substrait"].libs = [f"arrow_substrait{suffix}"] | ||
| self.cpp_info.components["libarrow_substrait"].requires = ["libparquet", "dataset"] | ||
| self.cpp_info.components["libarrow_substrait"].requires = ["libparquet"] | ||
| if self.options.dataset_modules: |
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 fix is the result of:
- The user reproduction case points to using
-o="*:shared=True" -o="&:with_protobuf=True" -o="&:substrait=True" - But the
datasetcomponent is only created if theself.options.dataset_modulesis notFalse, and as the option isFalseby default, Conan raised an exception here because nodatasetcomponent existed. - The fix just adds the internal requirement when it makes sense
In fact, the proper fix would be to force dataset when substrait is used, as per the sourccode:
add_arrow_lib(arrow_substrait
CMAKE_PACKAGE_NAME
ArrowSubstrait
PKG_CONFIG_NAME
arrow-substrait
OUTPUTS
ARROW_SUBSTRAIT_LIBRARIES
SOURCES
${ARROW_SUBSTRAIT_SRCS}
SHARED_LINK_FLAGS
${ARROW_VERSION_SCRIPT_FLAGS} # Defined in cpp/arrow/CMakeLists.txt
SHARED_LINK_LIBS
arrow_dataset_shared
substrait
SHARED_INSTALL_INTERFACE_LIBS
ArrowDataset::arrow_dataset_shared
STATIC_LINK_LIBS
arrow_dataset_static
substrait
STATIC_INSTALL_INTERFACE_LIBS
ArrowDataset::arrow_dataset_static
PRIVATE_INCLUDES
${SUBSTRAIT_INCLUDES})But went for this as it seemed more direct, but happy to change the approach
Summary
Changes to recipe: *arrow/ **
When building with protobuf.
Motivation
Arrow uses protoc as a built tool.
When building with "*:shared=true" and options to enable protobuf and substrait, protoc can't find the shared libraries it needs to run.
Details
Adds a tool Require and build environment. Fixes the issue.
Add a 👍 reaction to pull requests you find important to help the team prioritize, thanks!