This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 9888ac36c1 GH-35168: [CI][Packaging][Conan] Merge upstream changes 
(#35169)
9888ac36c1 is described below

commit 9888ac36c1424840a5d95d1bf6a88cbb7671f0a3
Author: Sutou Kouhei <[email protected]>
AuthorDate: Mon Apr 17 10:49:17 2023 +0900

    GH-35168: [CI][Packaging][Conan] Merge upstream changes (#35169)
    
    ### Rationale for this change
    
    There are some changes since the previous synchronization: #14671
    `72cd6af1dab6e57f82d7da1decb29079bde433b4` or later in 
https://github.com/conan-io/conan-center-index/commits/master/recipes/arrow
    
    ### What changes are included in this PR?
    
    Run `ci/conan/merge_upstream.sh` and resolve conflicts manually.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    No.
    * Closes: #35168
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 ci/conan/all/conandata.yml                         |  57 ++--
 ci/conan/all/conanfile.py                          |  21 +-
 .../patches/1.0.0-0004-mallctl-takes-size_t.patch  |  33 --
 .../patches/10.0.0-0001-mallctl-takes-size_t.patch |  35 ---
 ci/conan/all/patches/10.0.0-0002-fix-cmake.patch   | 333 ---------------------
 .../patches/7.0.0-0003-mallctl-takes-size_t.patch  |  35 ---
 .../patches/8.0.0-0003-mallctl-takes-size_t.patch  |  35 ---
 ci/conan/config.yml                                |   2 +
 ci/conan/merge_status.sh                           |   2 +-
 9 files changed, 36 insertions(+), 517 deletions(-)

diff --git a/ci/conan/all/conandata.yml b/ci/conan/all/conandata.yml
index a446cf7e3b..376fdfbfa7 100644
--- a/ci/conan/all/conandata.yml
+++ b/ci/conan/all/conandata.yml
@@ -21,36 +21,29 @@
 # SOFTWARE.
 
 sources:
+  "10.0.1":
+    url: 
"https://www.apache.org/dyn/closer.lua/arrow/arrow-10.0.1/apache-arrow-10.0.1.tar.gz?action=download";
+    sha256: "c814e0670112a22c1a6ec03ab420a52ae236a9a42e9e438c3cbd37f37e658fb3"
   "10.0.0":
-    url: "https://github.com/apache/arrow/archive/apache-arrow-10.0.0.tar.gz";
-    sha256: "2852b21f93ee84185a9d838809c9a9c41bf6deca741bed1744e0fdba6cc19e3f"
+    url: 
"https://www.apache.org/dyn/closer.lua/arrow/arrow-10.0.0/apache-arrow-10.0.0.tar.gz?action=download";
+    sha256: "5b46fa4c54f53e5df0019fe0f9d421e93fc906b625ebe8e89eed010d561f1f12"
   "8.0.1":
-    url: "https://github.com/apache/arrow/archive/apache-arrow-8.0.1.tar.gz";
-    sha256: "e4c86329be769f2c8778aacc8d6220a9a13c90d59d4988f9349d51299dacbd11"
+    url: 
"https://www.apache.org/dyn/closer.lua/arrow/arrow-8.0.1/apache-arrow-8.0.1.tar.gz?action=download";
+    sha256: "82d46929f7574715551da21700f100b39f99c3c4d6790f26cac86d869d64e94e"
   "8.0.0":
-    url: "https://github.com/apache/arrow/archive/apache-arrow-8.0.0.tar.gz";
-    sha256: "19ece12de48e51ce4287d2dee00dc358fbc5ff02f41629d16076f77b8579e272"
+    url: 
"https://www.apache.org/dyn/closer.lua/arrow/arrow-8.0.0/apache-arrow-8.0.0.tar.gz?action=download";
+    sha256: "ad9a05705117c989c116bae9ac70492fe015050e1b80fb0e38fde4b5d863aaa3"
   "7.0.0":
-    url: "https://github.com/apache/arrow/archive/apache-arrow-7.0.0.tar.gz";
-    sha256: "57e13c62f27b710e1de54fd30faed612aefa22aa41fa2c0c3bacd204dd18a8f3"
+    url: 
"https://www.apache.org/dyn/closer.lua/arrow/arrow-7.0.0/apache-arrow-7.0.0.tar.gz?action=download";
+    sha256: "e8f49b149a15ecef4e40fcfab1b87c113c6b1ee186005c169e5cdf95d31a99de"
   "2.0.0":
-    url: "https://github.com/apache/arrow/archive/apache-arrow-2.0.0.tar.gz";
-    sha256: "ea299df9cf440cfc43393ce12ee6d9a4c9d0dfa9fde33c3bc9b70ec25520a844"
+    url: 
"https://www.apache.org/dyn/closer.lua/arrow/arrow-2.0.0/apache-arrow-2.0.0.tar.gz?action=download";
+    sha256: "be0342cc847bb340d86aeaef43596a0b6c1dbf1ede9c789a503d939e01c71fbe"
   "1.0.0":
-    url: "https://github.com/apache/arrow/archive/apache-arrow-1.0.0.tar.gz";
-    sha256: "08fbd4c633c08939850d619ca0224c75d7a0526467c721c0838b8aa7efccb270"
+    url: 
"https://www.apache.org/dyn/closer.lua/arrow/arrow-1.0.0/apache-arrow-1.0.0.tar.gz?action=download";
+    sha256: "86ddb9feb48203a5aaf9cc4f2827525e20a2ca4d7239e492af17e74532ccf243"
 patches:
-  "10.0.0":
-    - patch_file: "patches/10.0.0-0001-mallctl-takes-size_t.patch"
-      patch_description: "use size_t instead of ssize_t"
-      patch_type: "backport"
-    - patch_file: "patches/10.0.0-0002-fix-cmake.patch"
-      patch_description: "use cci package"
-      patch_type: "conan"
   "8.0.1":
-    - patch_file: "patches/8.0.0-0003-mallctl-takes-size_t.patch"
-      patch_description: "use size_t instead of ssize_t"
-      patch_type: "backport"
     - patch_file: "patches/8.0.0-0005-install-utils.patch"
       patch_description: "enable utilis installation"
       patch_type: "conan"
@@ -58,9 +51,6 @@ patches:
       patch_description: "use cci package"
       patch_type: "conan"
   "8.0.0":
-    - patch_file: "patches/8.0.0-0003-mallctl-takes-size_t.patch"
-      patch_description: "use size_t instead of ssize_t"
-      patch_type: "backport"
     - patch_file: "patches/8.0.0-0005-install-utils.patch"
       patch_description: "enable utilis installation"
       patch_type: "conan"
@@ -68,9 +58,6 @@ patches:
       patch_description: "use cci package"
       patch_type: "conan"
   "7.0.0":
-    - patch_file: "patches/7.0.0-0003-mallctl-takes-size_t.patch"
-      patch_description: "use size_t instead of ssize_t"
-      patch_type: "backport"
     - patch_file: "patches/7.0.0-0006-install-utils.patch"
       patch_description: "enable utilis installation"
       patch_type: "conan"
@@ -80,26 +67,20 @@ patches:
   "2.0.0":
     - patch_file: "patches/2.0.0-0003-fix-shared-msvc.patch"
       patch_description: "make shared enabled in msvc"
-      patch_type: "backport"
-    - patch_file: "patches/1.0.0-0004-mallctl-takes-size_t.patch"
-      patch_description: "use size_t instead of ssize_t"
-      patch_type: "backport"
+      patch_type: "official"
     - patch_file: "patches/2.0.0-0005-gandiva-engine.patch"
       patch_description: "fix grandiva compilation error"
-      patch_type: "backport"
+      patch_type: "official"
     - patch_file: "patches/2.0.0-0008-fix-cmake.patch"
       patch_description: "use cci package"
       patch_type: "conan"
   "1.0.0":
     - patch_file: "patches/1.0.0-0003-fix-shared-msvc.patch"
       patch_description: "make shared enabled in msvc"
-      patch_type: "backport"
-    - patch_file: "patches/1.0.0-0004-mallctl-takes-size_t.patch"
-      patch_description: "use size_t instead of ssize_t"
-      patch_type: "backport"
+      patch_type: "official"
     - patch_file: "patches/1.0.0-0005-fix-make12-namespace.patch"
       patch_description: "fix ambiguous `make12` function between std and date"
-      patch_type: "backport"
+      patch_type: "official"
     - patch_file: "patches/1.0.0-0006-fix-cmake.patch"
       patch_description: "use cci package"
       patch_type: "conan"
diff --git a/ci/conan/all/conanfile.py b/ci/conan/all/conanfile.py
index 89484064f9..663c92e4a0 100644
--- a/ci/conan/all/conanfile.py
+++ b/ci/conan/all/conanfile.py
@@ -434,7 +434,7 @@ class ArrowConan(ConanFile):
             return
         # END
         get(self, **self.conan_data["sources"][self.version],
-                  destination=self.source_folder, strip_root=True)
+                  filename=f"apache-arrow-{self.version}.tar.gz", 
destination=self.source_folder, strip_root=True)
 
     def generate(self):
         # BUILD_SHARED_LIBS and POSITION_INDEPENDENT_CODE are automatically 
parsed when self.options.shared or self.options.fPIC exist
@@ -450,7 +450,7 @@ class ArrowConan(ConanFile):
         if is_msvc(self):
             tc.variables["ARROW_USE_STATIC_CRT"] = is_msvc_static_runtime(self)
         tc.variables["ARROW_DEPENDENCY_SOURCE"] = "SYSTEM"
-        tc.variables["ARROW_PACKAGE_KIND"] = "conan"
+        tc.variables["ARROW_PACKAGE_KIND"] = "conan" # See 
https://github.com/conan-io/conan-center-index/pull/14903/files#r1057938314 for 
details
         tc.variables["ARROW_GANDIVA"] = bool(self.options.gandiva)
         tc.variables["ARROW_PARQUET"] = self._parquet()
         tc.variables["ARROW_SUBSTRAIT"] = 
bool(self.options.get_safe("substrait", False))
@@ -471,8 +471,8 @@ class ArrowConan(ConanFile):
         tc.variables["ARROW_CSV"] = bool(self.options.with_csv)
         tc.variables["ARROW_CUDA"] = bool(self.options.with_cuda)
         tc.variables["ARROW_JEMALLOC"] = self._with_jemalloc()
-        tc.variables["ARROW_MIMALLOC"] = bool(self.options.with_mimalloc)
         tc.variables["jemalloc_SOURCE"] = "SYSTEM"
+        tc.variables["ARROW_MIMALLOC"] = bool(self.options.with_mimalloc)
         tc.variables["ARROW_JSON"] = bool(self.options.with_json)
         tc.variables["google_cloud_cpp_SOURCE"] = "SYSTEM"
         tc.variables["ARROW_GCS"] = bool(self.options.get_safe("with_gcs", 
False))
@@ -537,7 +537,7 @@ class ArrowConan(ConanFile):
         tc.variables["AWSSDK_SOURCE"] = "SYSTEM"
         tc.variables["ARROW_BUILD_UTILITIES"] = bool(self.options.cli)
         tc.variables["ARROW_BUILD_INTEGRATION"] = False
-        tc.variables["ARROW_INSTALL_NAME_RPATH"] = False
+        tc.variables["ARROW_INSTALL_NAME_RPATH"] = True
         tc.variables["ARROW_BUILD_EXAMPLES"] = False
         tc.variables["ARROW_BUILD_TESTS"] = False
         tc.variables["ARROW_ENABLE_TIMING_TESTS"] = False
@@ -560,11 +560,10 @@ class ArrowConan(ConanFile):
 
     def _patch_sources(self):
         apply_conandata_patches(self)
-        if Version(self.version) >= "7.0.0" and Version(self.version) < 
"11.0.0":
+        if "7.0.0" <= Version(self.version) < "10.0.0":
             for filename in glob.glob(os.path.join(self.source_folder, "cpp", 
"cmake_modules", "Find*.cmake")):
                 if os.path.basename(filename) not in [
                     "FindArrow.cmake",
-                    "FindArrowAcero.cmake",
                     "FindArrowCUDA.cmake",
                     "FindArrowDataset.cmake",
                     "FindArrowFlight.cmake",
@@ -630,6 +629,8 @@ class ArrowConan(ConanFile):
             
self.cpp_info.components["libparquet"].names["cmake_find_package_multi"] = 
"parquet"
             self.cpp_info.components["libparquet"].names["pkg_config"] = 
"parquet"
             self.cpp_info.components["libparquet"].requires = ["libarrow"]
+            if not self.options.shared:
+                self.cpp_info.components["libparquet"].defines = 
["PARQUET_STATIC"]
 
         if self.options.get_safe("substrait", False):
             self.cpp_info.components["libarrow_substrait"].libs = 
[self._lib_name("arrow_substrait")]
@@ -651,6 +652,8 @@ class ArrowConan(ConanFile):
             
self.cpp_info.components["libgandiva"].names["cmake_find_package_multi"] = 
"gandiva"
             self.cpp_info.components["libgandiva"].names["pkg_config"] = 
"gandiva"
             self.cpp_info.components["libgandiva"].requires = ["libarrow"]
+            if not self.options.shared:
+                self.cpp_info.components["libgandiva"].defines = 
["GANDIVA_STATIC"]
 
         if self._with_flight_rpc():
             self.cpp_info.components["libarrow_flight"].libs = 
[self._lib_name("arrow_flight")]
@@ -697,7 +700,11 @@ class ArrowConan(ConanFile):
         if self.options.with_mimalloc:
             
self.cpp_info.components["libarrow"].requires.append("mimalloc::mimalloc")
         if self._with_re2():
-            self.cpp_info.components["libgandiva"].requires.append("re2::re2")
+            if self.options.gandiva:
+                
self.cpp_info.components["libgandiva"].requires.append("re2::re2")
+            if self._parquet():
+                
self.cpp_info.components["libparquet"].requires.append("re2::re2")
+            self.cpp_info.components["libarrow"].requires.append("re2::re2")
         if self._with_llvm():
             
self.cpp_info.components["libgandiva"].requires.append("llvm-core::llvm-core")
         if self._with_protobuf():
diff --git a/ci/conan/all/patches/1.0.0-0004-mallctl-takes-size_t.patch 
b/ci/conan/all/patches/1.0.0-0004-mallctl-takes-size_t.patch
deleted file mode 100644
index 61189a1d77..0000000000
--- a/ci/conan/all/patches/1.0.0-0004-mallctl-takes-size_t.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-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.
-
---- cpp/src/arrow/memory_pool.cc
-+++ cpp/src/arrow/CMakeLists.txt
-@@ -427,7 +427,7 @@
- 
- Status jemalloc_set_decay_ms(int ms) {
- #ifdef ARROW_JEMALLOC
--  ssize_t decay_time_ms = static_cast<ssize_t>(ms);
-+  size_t decay_time_ms = static_cast<size_t>(ms);
- 
-   int err = mallctl("arenas.dirty_decay_ms", nullptr, nullptr, &decay_time_ms,
-                     sizeof(decay_time_ms));
diff --git a/ci/conan/all/patches/10.0.0-0001-mallctl-takes-size_t.patch 
b/ci/conan/all/patches/10.0.0-0001-mallctl-takes-size_t.patch
deleted file mode 100644
index 3428797472..0000000000
--- a/ci/conan/all/patches/10.0.0-0001-mallctl-takes-size_t.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-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/src/arrow/memory_pool_jemalloc.cc 
b/cpp/src/arrow/memory_pool_jemalloc.cc
-index c7d73c8..34c7c63 100644
---- a/cpp/src/arrow/memory_pool_jemalloc.cc
-+++ b/cpp/src/arrow/memory_pool_jemalloc.cc
-@@ -140,7 +140,7 @@ void JemallocAllocator::ReleaseUnused() {
-   } while (0)
- 
- Status jemalloc_set_decay_ms(int ms) {
--  ssize_t decay_time_ms = static_cast<ssize_t>(ms);
-+  size_t decay_time_ms = static_cast<ssize_t>(ms);
- 
-   int err = mallctl("arenas.dirty_decay_ms", nullptr, nullptr, &decay_time_ms,
-                     sizeof(decay_time_ms));
diff --git a/ci/conan/all/patches/10.0.0-0002-fix-cmake.patch 
b/ci/conan/all/patches/10.0.0-0002-fix-cmake.patch
deleted file mode 100644
index 15d197836e..0000000000
--- a/ci/conan/all/patches/10.0.0-0002-fix-cmake.patch
+++ /dev/null
@@ -1,333 +0,0 @@
-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/CMakeLists.txt b/cpp/CMakeLists.txt
-index 029f13f..3518a23 100644
---- a/cpp/CMakeLists.txt
-+++ b/cpp/CMakeLists.txt
-@@ -659,7 +659,7 @@ endif()
- 
- if(ARROW_WITH_BROTLI)
-   # Order is important for static linking
--  set(ARROW_BROTLI_LIBS Brotli::brotlienc Brotli::brotlidec 
Brotli::brotlicommon)
-+  set(ARROW_BROTLI_LIBS brotli::brotlienc brotli::brotlidec 
brotli::brotlicommon)
-   list(APPEND ARROW_SHARED_LINK_LIBS ${ARROW_BROTLI_LIBS})
-   list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS})
-   if(Brotli_SOURCE STREQUAL "SYSTEM")
-@@ -675,14 +675,21 @@ if(ARROW_WITH_BZ2)
- endif()
- 
- if(ARROW_WITH_LZ4)
--  list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4)
-+if (TARGET LZ4::lz4_static)
-+  list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4_static)
-   if(lz4_SOURCE STREQUAL "SYSTEM")
--    list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4)
-+    list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4_static)
-   endif()
-+else()
-+  list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4_shared)
-+  if(lz4_SOURCE STREQUAL "SYSTEM")
-+    list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4_shared)
-+  endif()
-+endif()
- endif()
- 
- if(ARROW_WITH_SNAPPY)
--  list(APPEND ARROW_STATIC_LINK_LIBS ${Snappy_TARGET})
-+  list(APPEND ARROW_STATIC_LINK_LIBS Snappy::snappy)
-   if(Snappy_SOURCE STREQUAL "SYSTEM")
-     list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS ${Snappy_TARGET})
-   endif()
-diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
-index b7cd31f..78f3df3 100644
---- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
-+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
-@@ -1162,10 +1162,12 @@ endmacro()
- 
- if(ARROW_WITH_SNAPPY)
-   resolve_dependency(Snappy
--                     HAVE_ALT
-+                     USE_CONFIG
-                      TRUE
-                      PC_PACKAGE_NAMES
-                      snappy)
-+
-+  if(0)
-   if(${Snappy_SOURCE} STREQUAL "SYSTEM" AND NOT snappy_PC_FOUND)
-     get_target_property(SNAPPY_TYPE ${Snappy_TARGET} TYPE)
-     if(NOT SNAPPY_TYPE STREQUAL "INTERFACE_LIBRARY")
-@@ -1180,6 +1182,9 @@ if(ARROW_WITH_SNAPPY)
-       string(APPEND ARROW_PC_LIBS_PRIVATE " ${SNAPPY_LIB}")
-     endif()
-   endif()
-+  else()
-+  string(APPEND ARROW_PC_LIBS_PRIVATE " ${Snappy_LIBRARIES}")
-+  endif()
- endif()
- 
- # ----------------------------------------------------------------------
-@@ -1242,7 +1247,7 @@ macro(build_brotli)
- endmacro()
- 
- if(ARROW_WITH_BROTLI)
--  resolve_dependency(Brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc)
-+  resolve_dependency(brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc)
- endif()
- 
- if(PARQUET_REQUIRE_ENCRYPTION AND NOT ARROW_PARQUET)
-@@ -1256,7 +1261,7 @@ if(PARQUET_REQUIRE_ENCRYPTION
-    OR ARROW_GANDIVA)
-   set(OpenSSL_SOURCE "SYSTEM")
-   resolve_dependency(OpenSSL
--                     HAVE_ALT
-+                     USE_CONFIG
-                      TRUE
-                      REQUIRED_VERSION
-                      ${ARROW_OPENSSL_REQUIRED_VERSION})
-@@ -1399,22 +1404,14 @@ endmacro()
- if(ARROW_NEED_GFLAGS)
-   set(ARROW_GFLAGS_REQUIRED_VERSION "2.1.0")
-   resolve_dependency(gflags
--                     HAVE_ALT
-+                     USE_CONFIG
-                      TRUE
-                      REQUIRED_VERSION
-                      ${ARROW_GFLAGS_REQUIRED_VERSION}
-                      IS_RUNTIME_DEPENDENCY
-                      FALSE)
- 
--  if(NOT TARGET ${GFLAGS_LIBRARIES})
--    if(TARGET gflags::gflags_shared)
--      set(GFLAGS_LIBRARIES gflags::gflags_shared)
--    elseif(TARGET gflags-shared)
--      set(GFLAGS_LIBRARIES gflags-shared)
--    elseif(TARGET gflags_shared)
--      set(GFLAGS_LIBRARIES gflags_shared)
--    endif()
--  endif()
-+  set(GFLAGS_LIBRARIES gflags::gflags)
- endif()
- 
- # ----------------------------------------------------------------------
-@@ -1638,7 +1635,7 @@ if(ARROW_WITH_PROTOBUF)
-     set(ARROW_PROTOBUF_REQUIRED_VERSION "2.6.1")
-   endif()
-   resolve_dependency(Protobuf
--                     HAVE_ALT
-+                     USE_CONFIG
-                      TRUE
-                      REQUIRED_VERSION
-                      ${ARROW_PROTOBUF_REQUIRED_VERSION}
-@@ -1770,7 +1767,7 @@ macro(build_substrait)
- 
-   add_custom_target(substrait_gen ALL DEPENDS ${SUBSTRAIT_PROTO_GEN_ALL})
- 
--  set(SUBSTRAIT_INCLUDES ${SUBSTRAIT_CPP_DIR} ${PROTOBUF_INCLUDE_DIR})
-+  set(SUBSTRAIT_INCLUDES ${SUBSTRAIT_CPP_DIR} ${protobuf_INCLUDE_DIR})
- 
-   add_library(substrait STATIC ${SUBSTRAIT_SOURCES})
-   set_target_properties(substrait PROPERTIES POSITION_INDEPENDENT_CODE ON)
-@@ -1781,6 +1778,8 @@ macro(build_substrait)
-   list(APPEND ARROW_BUNDLED_STATIC_LIBS substrait)
- endmacro()
- 
-+set(CMAKE_VERBOSE_MAKEFILE ON)
-+
- if(ARROW_SUBSTRAIT)
-   # Currently, we can only build Substrait from source.
-   set(Substrait_SOURCE "BUNDLED")
-@@ -1866,7 +1865,10 @@ macro(build_jemalloc)
- endmacro()
- 
- if(ARROW_JEMALLOC)
--  resolve_dependency(jemalloc)
-+  #resolve_dependency(jemalloc)
-+  find_package(jemalloc REQUIRED CONFIG)
-+  include_directories(SYSTEM "${jemalloc_INCLUDE_DIR}")
-+  list(APPEND ARROW_BUNDLED_STATIC_LIBS  ${jemalloc_LIBRARIES_TARGETS})
- endif()
- 
- # ----------------------------------------------------------------------
-@@ -2186,7 +2188,7 @@ endmacro()
- if(ARROW_WITH_RAPIDJSON)
-   set(ARROW_RAPIDJSON_REQUIRED_VERSION "1.1.0")
-   resolve_dependency(RapidJSON
--                     HAVE_ALT
-+                     USE_CONFIG
-                      TRUE
-                      REQUIRED_VERSION
-                      ${ARROW_RAPIDJSON_REQUIRED_VERSION}
-@@ -2334,19 +2336,29 @@ macro(build_lz4)
-                       BUILD_BYPRODUCTS ${LZ4_STATIC_LIB})
- 
-   file(MAKE_DIRECTORY "${LZ4_PREFIX}/include")
--  add_library(LZ4::lz4 STATIC IMPORTED)
--  set_target_properties(LZ4::lz4
--                        PROPERTIES IMPORTED_LOCATION "${LZ4_STATIC_LIB}"
--                                   INTERFACE_INCLUDE_DIRECTORIES 
"${LZ4_PREFIX}/include")
--  add_dependencies(toolchain lz4_ep)
--  add_dependencies(LZ4::lz4 lz4_ep)
--
--  list(APPEND ARROW_BUNDLED_STATIC_LIBS LZ4::lz4)
-+  if (TARGET LZ4::lz4_static)
-+    add_library(LZ4::lz4_static STATIC IMPORTED)
-+    set_target_properties(LZ4::lz4_static
-+                          PROPERTIES IMPORTED_LOCATION "${LZ4_STATIC_LIB}"
-+                                     INTERFACE_INCLUDE_DIRECTORIES 
"${LZ4_PREFIX}/include")
-+    add_dependencies(toolchain lz4_ep)
-+    add_dependencies(LZ4::lz4_static lz4_ep)
-+    list(APPEND ARROW_BUNDLED_STATIC_LIBS LZ4::lz4_static)
-+  else()
-+    add_library(LZ4::lz4_shared STATIC IMPORTED)
-+    set_target_properties(LZ4::lz4_shared
-+                          PROPERTIES IMPORTED_LOCATION "${LZ4_SHARED_LIB}"
-+                                     INTERFACE_INCLUDE_DIRECTORIES 
"${LZ4_PREFIX}/include")
-+    add_dependencies(toolchain lz4_ep)
-+    add_dependencies(LZ4::lz4_shared lz4_ep)
-+    list(APPEND ARROW_BUNDLED_STATIC_LIBS LZ4::lz4_shared)
-+  endif()
-+
- endmacro()
- 
- if(ARROW_WITH_LZ4)
-   resolve_dependency(lz4
--                     HAVE_ALT
-+                     USE_CONFIG
-                      TRUE
-                      PC_PACKAGE_NAMES
-                      liblz4)
-@@ -2415,7 +2427,7 @@ endmacro()
- if(ARROW_WITH_ZSTD)
-   # ARROW-13384: ZSTD_minCLevel was added in v1.4.0, required by ARROW-13091
-   resolve_dependency(zstd
--                     HAVE_ALT
-+                     USE_CONFIG
-                      TRUE
-                      PC_PACKAGE_NAMES
-                      libzstd
-@@ -2477,7 +2489,7 @@ if(ARROW_WITH_RE2)
-   # Don't specify "PC_PACKAGE_NAMES re2" here because re2.pc may
-   # include -std=c++11. It's not compatible with C source and C++
-   # source not uses C++ 11.
--  resolve_dependency(re2 HAVE_ALT TRUE)
-+  resolve_dependency(re2 USE_CONFIG TRUE)
-   if(${re2_SOURCE} STREQUAL "SYSTEM")
-     get_target_property(RE2_TYPE re2::re2 TYPE)
-     if(NOT RE2_TYPE STREQUAL "INTERFACE_LIBRARY")
-@@ -3922,7 +3934,7 @@ if(ARROW_WITH_GRPC)
-     set(gRPC_SOURCE "${Protobuf_SOURCE}")
-   endif()
-   resolve_dependency(gRPC
--                     HAVE_ALT
-+                     USE_CONFIG
-                      TRUE
-                      REQUIRED_VERSION
-                      ${ARROW_GRPC_REQUIRED_VERSION}
-@@ -3939,9 +3951,9 @@ if(ARROW_WITH_GRPC)
-     get_target_property(GRPC_INCLUDE_DIR gRPC::grpc++ 
INTERFACE_INCLUDE_DIRECTORIES)
-     if(GRPC_INCLUDE_DIR MATCHES "^\\$<"
-        OR # generator expression
--          EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h")
-+          EXISTS ${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h)
-       set(GRPCPP_PP_INCLUDE TRUE)
--    elseif(EXISTS "${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h")
-+    elseif(EXISTS ${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h)
-       set(GRPCPP_PP_INCLUDE FALSE)
-     else()
-       message(FATAL_ERROR "Cannot find grpc++ headers in ${GRPC_INCLUDE_DIR}")
-@@ -4282,8 +4294,11 @@ macro(build_orc)
-   get_target_property(ORC_SNAPPY_INCLUDE_DIR ${Snappy_TARGET}
-                       INTERFACE_INCLUDE_DIRECTORIES)
-   get_filename_component(ORC_SNAPPY_ROOT "${ORC_SNAPPY_INCLUDE_DIR}" 
DIRECTORY)
--
--  get_target_property(ORC_LZ4_ROOT LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES)
-+  if (TARGET LZ4::lz4_static)
-+    get_target_property(ORC_LZ4_ROOT LZ4::lz4_static 
INTERFACE_INCLUDE_DIRECTORIES)
-+  else()
-+    get_target_property(ORC_LZ4_ROOT LZ4::lz4_shared 
INTERFACE_INCLUDE_DIRECTORIES)
-+  endif()
-   get_filename_component(ORC_LZ4_ROOT "${ORC_LZ4_ROOT}" DIRECTORY)
- 
-   get_target_property(ORC_ZSTD_ROOT ${ARROW_ZSTD_LIBZSTD} 
INTERFACE_INCLUDE_DIRECTORIES)
-@@ -4321,16 +4336,29 @@ macro(build_orc)
-   # Work around CMake bug
-   file(MAKE_DIRECTORY ${ORC_INCLUDE_DIR})
- 
--  externalproject_add(orc_ep
--                      URL ${ORC_SOURCE_URL}
--                      URL_HASH "SHA256=${ARROW_ORC_BUILD_SHA256_CHECKSUM}"
--                      BUILD_BYPRODUCTS ${ORC_STATIC_LIB}
--                      CMAKE_ARGS ${ORC_CMAKE_ARGS} ${EP_LOG_OPTIONS}
--                      DEPENDS ${ARROW_PROTOBUF_LIBPROTOBUF}
--                              ${ARROW_ZSTD_LIBZSTD}
--                              ${Snappy_TARGET}
--                              LZ4::lz4
--                              ZLIB::ZLIB)
-+  if (TARGET LZ4::lz4_static)
-+    externalproject_add(orc_ep
-+                        URL ${ORC_SOURCE_URL}
-+                        URL_HASH "SHA256=${ARROW_ORC_BUILD_SHA256_CHECKSUM}"
-+                        BUILD_BYPRODUCTS ${ORC_STATIC_LIB}
-+                        CMAKE_ARGS ${ORC_CMAKE_ARGS} ${EP_LOG_OPTIONS}
-+                        DEPENDS ${ARROW_PROTOBUF_LIBPROTOBUF}
-+                                ${ARROW_ZSTD_LIBZSTD}
-+                                ${Snappy_TARGET}
-+                                LZ4::lz4_static
-+                                ZLIB::ZLIB)
-+  else()
-+    externalproject_add(orc_ep
-+                        URL ${ORC_SOURCE_URL}
-+                        URL_HASH "SHA256=${ARROW_ORC_BUILD_SHA256_CHECKSUM}"
-+                        BUILD_BYPRODUCTS ${ORC_STATIC_LIB}
-+                        CMAKE_ARGS ${ORC_CMAKE_ARGS} ${EP_LOG_OPTIONS}
-+                        DEPENDS ${ARROW_PROTOBUF_LIBPROTOBUF}
-+                                ${ARROW_ZSTD_LIBZSTD}
-+                                ${Snappy_TARGET}
-+                                LZ4::lz4_shared
-+                                ZLIB::ZLIB)
-+  endif()
- 
-   set(ORC_VENDORED 1)
- 
-@@ -4338,7 +4366,11 @@ macro(build_orc)
-   set_target_properties(orc::liborc
-                         PROPERTIES IMPORTED_LOCATION "${ORC_STATIC_LIB}"
-                                    INTERFACE_INCLUDE_DIRECTORIES 
"${ORC_INCLUDE_DIR}")
--  set(ORC_LINK_LIBRARIES LZ4::lz4 ZLIB::ZLIB ${ARROW_ZSTD_LIBZSTD} 
${Snappy_TARGET})
-+  if (TARGET LZ4::lz4_static)
-+    set(ORC_LINK_LIBRARIES LZ4::lz4_static ZLIB::ZLIB ${ARROW_ZSTD_LIBZSTD} 
${Snappy_TARGET})
-+  else()
-+    set(ORC_LINK_LIBRARIES LZ4::lz4_shared ZLIB::ZLIB ${ARROW_ZSTD_LIBZSTD} 
${Snappy_TARGET})
-+  endif()
-   if(NOT MSVC)
-     if(NOT APPLE)
-       list(APPEND ORC_LINK_LIBRARIES Threads::Threads)
-@@ -4765,7 +4797,7 @@ macro(build_awssdk)
- endmacro()
- 
- if(ARROW_S3)
--  resolve_dependency(AWSSDK HAVE_ALT TRUE)
-+  resolve_dependency(AWSSDK USE_CONFIG TRUE)
- 
-   message(STATUS "Found AWS SDK headers: ${AWSSDK_INCLUDE_DIR}")
-   message(STATUS "Found AWS SDK libraries: ${AWSSDK_LINK_LIBRARIES}")
diff --git a/ci/conan/all/patches/7.0.0-0003-mallctl-takes-size_t.patch 
b/ci/conan/all/patches/7.0.0-0003-mallctl-takes-size_t.patch
deleted file mode 100644
index 1e233589c4..0000000000
--- a/ci/conan/all/patches/7.0.0-0003-mallctl-takes-size_t.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-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/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc
-index cf8bf64..2dcfb01 100644
---- a/cpp/src/arrow/memory_pool.cc
-+++ b/cpp/src/arrow/memory_pool.cc
-@@ -563,7 +563,7 @@ MemoryPool* default_memory_pool() {
-
- Status jemalloc_set_decay_ms(int ms) {
- #ifdef ARROW_JEMALLOC
--  ssize_t decay_time_ms = static_cast<ssize_t>(ms);
-+  size_t decay_time_ms = static_cast<size_t>(ms);
-
-   int err = mallctl("arenas.dirty_decay_ms", nullptr, nullptr, &decay_time_ms,
-                     sizeof(decay_time_ms));
diff --git a/ci/conan/all/patches/8.0.0-0003-mallctl-takes-size_t.patch 
b/ci/conan/all/patches/8.0.0-0003-mallctl-takes-size_t.patch
deleted file mode 100644
index d9f2189041..0000000000
--- a/ci/conan/all/patches/8.0.0-0003-mallctl-takes-size_t.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-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/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc
-index 1f8f896..37a89da 100644
---- a/cpp/src/arrow/memory_pool.cc
-+++ b/cpp/src/arrow/memory_pool.cc
-@@ -767,7 +767,7 @@ MemoryPool* default_memory_pool() {
- 
- Status jemalloc_set_decay_ms(int ms) {
- #ifdef ARROW_JEMALLOC
--  ssize_t decay_time_ms = static_cast<ssize_t>(ms);
-+  size_t decay_time_ms = static_cast<ssize_t>(ms);
- 
-   int err = mallctl("arenas.dirty_decay_ms", nullptr, nullptr, &decay_time_ms,
-                     sizeof(decay_time_ms));
diff --git a/ci/conan/config.yml b/ci/conan/config.yml
index 4e0975bc59..be333447f3 100644
--- a/ci/conan/config.yml
+++ b/ci/conan/config.yml
@@ -21,6 +21,8 @@
 # SOFTWARE.
 
 versions:
+  "10.0.1":
+    folder: all
   "10.0.0":
     folder: all
   "8.0.1":
diff --git a/ci/conan/merge_status.sh b/ci/conan/merge_status.sh
index 862d27ee3c..bd99c22def 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=5c8f8538e32edd0911fd70710ce2d188bcd409f2
+UPSTREAM_REVISION=681a40adca5f83c80581814fe92316d6298ed96f

Reply via email to