From 281764c0df3b999f7d9c816f83f23188e5c35176 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 2 Jul 2025 10:25:38 +0900 Subject: [PATCH] GH-46964: [CI][Packaging] Synchronize conan files for 20.0.0 --- ci/conan/all/conandata.yml | 9 ++++- ci/conan/all/conanfile.py | 19 ++++++++-- .../20.0.0-0001-fix-downloaded-mimalloc.patch | 37 +++++++++++++++++++ ci/conan/config.yml | 2 + ci/conan/merge_status.sh | 2 +- 5 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 ci/conan/all/patches/20.0.0-0001-fix-downloaded-mimalloc.patch diff --git a/ci/conan/all/conandata.yml b/ci/conan/all/conandata.yml index 4efaf70568f..3bd3ec61eb9 100644 --- a/ci/conan/all/conandata.yml +++ b/ci/conan/all/conandata.yml @@ -21,6 +21,9 @@ # SOFTWARE. sources: + "20.0.0": + url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-20.0.0/apache-arrow-20.0.0.tar.gz?action=download" + sha256: "89efbbf852f5a1f79e9c99ab4c217e2eb7f991837c005cba2d4a2fbd35fad212" "19.0.1": url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-19.0.1/apache-arrow-19.0.1.tar.gz?action=download" sha256: "acb76266e8b0c2fbb7eb15d542fbb462a73b3fd1e32b80fad6c2fafd95a51160" @@ -43,6 +46,10 @@ sources: url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-14.0.2/apache-arrow-14.0.2.tar.gz?action=download" sha256: "1304dedb41896008b89fe0738c71a95d9b81752efc77fa70f264cb1da15d9bc2" patches: + "20.0.0": + - patch_file: "patches/20.0.0-0001-fix-downloaded-mimalloc.patch" + patch_description: "use cci package" + patch_type: "conan" "19.0.1": - patch_file: "patches/19.0.1-0001-fix-cmake.patch" patch_description: "use cci package" @@ -74,4 +81,4 @@ patches: - patch_file: "patches/11.0.0-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" - \ No newline at end of file + diff --git a/ci/conan/all/conanfile.py b/ci/conan/all/conanfile.py index 6881ee6f325..7dab8c82f69 100644 --- a/ci/conan/all/conanfile.py +++ b/ci/conan/all/conanfile.py @@ -239,6 +239,15 @@ def validate(self): raise ConanException("'with_boost' option should be True when 'gandiva=True'") if not self.options.with_utf8proc: raise ConanException("'with_utf8proc' option should be True when 'gandiva=True'") + if self.options.with_orc: + if not self.options.with_lz4: + raise ConanException("'with_lz4' option should be True when 'orc=True'") + if not self.options.with_snappy: + raise ConanException("'with_snappy' option should be True when 'orc=True'") + if not self.options.with_zlib: + raise ConanException("'with_zlib' option should be True when 'orc=True'") + if not self.options.with_zstd: + raise ConanException("'with_zstd' option should be True when 'orc=True'") if self.options.with_thrift and not self.options.with_boost: raise ConanException("'with_boost' option should be True when 'thrift=True'") if self.options.parquet: @@ -247,8 +256,7 @@ def validate(self): if self.options.with_flight_rpc and not self.options.with_protobuf: raise ConanException("'with_protobuf' option should be True when 'with_flight_rpc=True'") - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._min_cppstd) + check_min_cppstd(self, self._min_cppstd) if self.options.get_safe("skyhook", False): raise ConanInvalidConfiguration("CCI has no librados recipe (yet)") @@ -268,7 +276,9 @@ def validate(self): raise ConanInvalidConfiguration("arrow:parquet requires arrow:with_thrift") def build_requirements(self): - if Version(self.version) >= "13.0.0": + if Version(self.version) >= "20.0.0": + self.tool_requires("cmake/[>=3.25 <4]") + else: self.tool_requires("cmake/[>=3.16 <4]") def source(self): @@ -294,6 +304,7 @@ def source(self): # END get(self, **self.conan_data["sources"][self.version], filename=f"apache-arrow-{self.version}.tar.gz", strip_root=True) + self._patch_sources() def generate(self): tc = CMakeToolchain(self) @@ -374,6 +385,7 @@ def generate(self): if self.options.with_zstd: tc.variables["ARROW_ZSTD_USE_SHARED"] = bool(self.dependencies["zstd"].options.shared) tc.variables["ORC_SOURCE"] = "SYSTEM" + tc.variables["ARROW_ORC"] = bool(self.options.with_orc) tc.variables["ARROW_WITH_THRIFT"] = bool(self.options.with_thrift) tc.variables["ARROW_THRIFT"] = bool(self.options.with_thrift) tc.variables["Thrift_SOURCE"] = "SYSTEM" @@ -420,7 +432,6 @@ def _patch_sources(self): apply_conandata_patches(self) def build(self): - self._patch_sources() cmake = CMake(self) cmake.configure(build_script_folder=os.path.join(self.source_folder, "cpp")) cmake.build() diff --git a/ci/conan/all/patches/20.0.0-0001-fix-downloaded-mimalloc.patch b/ci/conan/all/patches/20.0.0-0001-fix-downloaded-mimalloc.patch new file mode 100644 index 00000000000..44b1691bdb3 --- /dev/null +++ b/ci/conan/all/patches/20.0.0-0001-fix-downloaded-mimalloc.patch @@ -0,0 +1,37 @@ +MIT License + +Copyright (c) 2019 Conan.io + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake +index 63bdd4ab76..9744f01b1e 100644 +--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake ++++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake +@@ -2268,1 +2268,1 @@ endif() + # mimalloc - Cross-platform high-performance allocator, from Microsoft + + if(ARROW_MIMALLOC) ++ find_package(mimalloc REQUIRED CONFIG) ++endif() ++ ++if(0) + if(NOT ARROW_ENABLE_THREADING) + message(FATAL_ERROR "Can't use mimalloc with ARROW_ENABLE_THREADING=OFF") + endif() diff --git a/ci/conan/config.yml b/ci/conan/config.yml index 33c0261df74..02100ba9d4c 100644 --- a/ci/conan/config.yml +++ b/ci/conan/config.yml @@ -21,6 +21,8 @@ # SOFTWARE. versions: + "20.0.0": + folder: all "19.0.1": folder: all "18.1.0": diff --git a/ci/conan/merge_status.sh b/ci/conan/merge_status.sh index 229c3a4394c..295f6a37087 100644 --- a/ci/conan/merge_status.sh +++ b/ci/conan/merge_status.sh @@ -15,4 +15,4 @@ # specific language governing permissions and limitations # under the License. -UPSTREAM_REVISION=1729c3c2c3b0e9d058821fa00e8a54154415efc6 +UPSTREAM_REVISION=2cf8d725f6387f65be58a13435896328b36a14b9