-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: fix recipe when arrow/*:parquet=True #24044
Conversation
This comment has been minimized.
This comment has been minimized.
Thanks! Please also set |
Another thing I noticed, is that arrow always uses a vendored version of mimalloc: https://github.com/apache/arrow/blob/b2e8c33c86c819b167a1cbca834da3c9047a9350/cpp/cmake_modules/ThirdpartyToolchain.cmake#L2197-L2204 Should I drop mimalloc from the requirement list (but leave the option to toggle mimalloc on or off)? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@RubenRBS I think this is ready for review :). The conan v2 pipeline failure seems to be due to the same issue described in #24011. |
This comment has been minimized.
This comment has been minimized.
@perseoGI CI is green! :) |
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.
Some comments from a review alongside @perseoGI
@@ -261,6 +264,11 @@ def validate(self): | |||
if self.dependencies["jemalloc"].options.enable_cxx: | |||
raise ConanInvalidConfiguration("jemmalloc.enable_cxx of a static jemalloc must be disabled") | |||
|
|||
if self.options.with_thrift and not self.options.with_zlib: |
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.
There are more checks in ThirdpartyToolchain.cmake
that might be worth to reflect in the recipe, instead of relying on autodiscovery
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.
That file is over 5000 lines long :D. I do not have the bandwidth to read through it to see what's going on.
If you have some specific checks in mind?
Otherwise I suggest we leave this to be addressed in another PR.
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 the only one that stood out to me, so I'm happy with keeping that on a follow-up PR, yes :)
@@ -101,7 +101,7 @@ class ArrowConan(ConanFile): | |||
"with_glog": False, | |||
"with_grpc": False, | |||
"with_json": False, | |||
"with_thrift": False, | |||
"with_thrift": True, |
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 there a good reason to have this set to true? Is this just for testing the changes n the CI? We could then revert it now
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.
Yes! with_thrift
needs to be True in order to build Arrow with Parquet support (which is now enabled by default based on #24044 (comment)).
@@ -351,6 +360,7 @@ def generate(self): | |||
tc.variables["ARROW_WITH_THRIFT"] = bool(self.options.with_thrift) | |||
tc.variables["Thrift_SOURCE"] = "SYSTEM" | |||
if self.options.with_thrift: | |||
tc.variables["ARROW_THRIFT"] = True |
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.
As far as I can see, this variable was not set, but maybe we would need to set ARROW_WITH_THRIFT
instead? Am I missing something? Do you have any insight? Thanks!
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 am not super familiar with Arrow's code base, so I am not 100% sure on what's the difference between ARROW_WITH_THRIFT
and ARROW_THRIFT
.
A quick search on Arrow's codebase suggests that ARROW_THRIFT
is only referenced in
$ find arrow -type f -exec grep -P "\bARROW_THRIFT\b" {} +
arrow/cpp/cmake_modules/ThirdpartyToolchain.cmake:if(ARROW_THRIFT)
arrow/python/build/lib.linux-x86_64-cpython-312/cmake_modules/ThirdpartyToolchain.cmake:if(ARROW_THRIFT)
Where it seems to be used only to turn on ZLIB support - link
if(ARROW_THRIFT)
set(ARROW_WITH_ZLIB ON)
endif()
So I think setting both ARROW_WITH_THRIFT
and ARROW_THRIFT
is ok (will push a commit to do so ASAP).
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!
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.
Didn't mean to approve just yet!
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Abril Rincón Blanco <[email protected]> Co-authored-by: PerseoGI <[email protected]>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Conan v1 pipeline ✔️Warning Conan Center will stop receiving updates for Conan 1.x packages soon - please see announcement. All green in build 28 (
Conan v2 pipeline ✔️
All green in build 30 (
|
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.
@@ -261,6 +264,11 @@ def validate(self): | |||
if self.dependencies["jemalloc"].options.enable_cxx: | |||
raise ConanInvalidConfiguration("jemmalloc.enable_cxx of a static jemalloc must be disabled") | |||
|
|||
if self.options.with_thrift and not self.options.with_zlib: |
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 the only one that stood out to me, so I'm happy with keeping that on a follow-up PR, yes :)
@@ -351,6 +360,7 @@ def generate(self): | |||
tc.variables["ARROW_WITH_THRIFT"] = bool(self.options.with_thrift) | |||
tc.variables["Thrift_SOURCE"] = "SYSTEM" | |||
if self.options.with_thrift: | |||
tc.variables["ARROW_THRIFT"] = True |
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!
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.
Finally! This is merging! Thank you for your patience!!!
Awesome! |
* Fix recipe when arrow/*:parquet=True * Add patch description and type annotations * Set parquet=True * Do not look for static analyzers * Bugfix * Bugfix * Refactor patches * Backport fixes from upstream * Patch v17.0.0 * Woops. Forgot to apply patch to v16.1.0 * Bump deps * Bugfix * Add patch_source * Add check to ensure with_boost=True when with_thrift=True * Fix typos * Cleanups * Set ARROW_THRIFT Co-authored-by: Abril Rincón Blanco <[email protected]> Co-authored-by: PerseoGI <[email protected]> * Bugfix * Bugfix --------- Co-authored-by: Abril Rincón Blanco <[email protected]> Co-authored-by: PerseoGI <[email protected]>
Specify library name and version: arrow/all
When the arrow package is built with
arrow/*:parquet=True
,arrow/*:with_thrift=True
is also required.Thrift is found by Arrow by calling FindThriftAlt.cmake, which uses some custom logic to define
thrift::thrift
when the project is compiled on Windows.This causes the
transitive_header=True
specified in Thrift's recipe to be ignored.conan-center-index/recipes/thrift/all/conanfile.py
Lines 69 to 70 in b4b8a8d
This PR patches FindThriftAlt.cmake so that
find_package(Thrift)
is always called.Fixes #20082 (note that without the patch I am unable to build the package using MSVC regardless of the
build_type
).While debugging the above issue I also realized that
ARROW_WITH_RE2
was not explicitly set by the recipe, which on my machine causes compilation to fail for v11.0.0. This PR also addresses this issue.Finally, I am bumping
thrift
,xsimd
, andzstd
to avoid version conflicts with other packages on cci.