diff --git a/recipes/arrow/all/conandata.yml b/recipes/arrow/all/conandata.yml index dfb0971c17f1a..1062cf2f5c050 100644 --- a/recipes/arrow/all/conandata.yml +++ b/recipes/arrow/all/conandata.yml @@ -1,62 +1,29 @@ sources: + "18.0.0": + url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-18.0.0/apache-arrow-18.0.0.tar.gz?action=download" + sha256: "abcf1934cd0cdddd33664e9f2d9a251d6c55239d1122ad0ed223b13a583c82a9" "17.0.0": url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-17.0.0/apache-arrow-17.0.0.tar.gz?action=download" sha256: "9d280d8042e7cf526f8c28d170d93bfab65e50f94569f6a790982a878d8d898d" "16.1.0": url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-16.1.0/apache-arrow-16.1.0.tar.gz?action=download" sha256: "c9e60c7e87e59383d21b20dc874b17153729ee153264af6d21654b7dff2c60d7" - "16.0.0": - url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-16.0.0/apache-arrow-16.0.0.tar.gz?action=download" - sha256: "9f4051ae9473c97991d9af801e2f94ae3455067719ca7f90b8137f9e9a700b8d" "15.0.0": url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-15.0.0/apache-arrow-15.0.0.tar.gz?action=download" sha256: "01dd3f70e85d9b5b933ec92c0db8a4ef504a5105f78d2d8622e84279fb45c25d" "14.0.2": url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-14.0.2/apache-arrow-14.0.2.tar.gz?action=download" sha256: "1304dedb41896008b89fe0738c71a95d9b81752efc77fa70f264cb1da15d9bc2" - "14.0.1": - url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-14.0.1/apache-arrow-14.0.1.tar.gz?action=download" - sha256: "5c70eafb1011f9d124bafb328afe54f62cc5b9280b7080e1e3d668f78c0e407e" - "14.0.0": - url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-14.0.0/apache-arrow-14.0.0.tar.gz?action=download" - sha256: "4eb0da50ec071baf15fc163cb48058931e006f1c862c8def0e180fd07d531021" - "13.0.0": - url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-13.0.0/apache-arrow-13.0.0.tar.gz?action=download" - sha256: "35dfda191262a756be934eef8afee8d09762cad25021daa626eb249e251ac9e6" - "12.0.1": - url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-12.0.1/apache-arrow-12.0.1.tar.gz?action=download" - sha256: "3481c411393aa15c75e88d93cf8315faf7f43e180fe0790128d3840d417de858" - "12.0.0": - url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-12.0.0/apache-arrow-12.0.0.tar.gz?action=download" - sha256: "ddd8347882775e53af7d0965a1902b7d8fcd0a030fd14f783d4f85e821352d52" - "11.0.0": - url: "https://www.apache.org/dyn/closer.lua/arrow/arrow-11.0.0/apache-arrow-11.0.0.tar.gz?action=download" - sha256: "2dd8f0ea0848a58785628ee3a57675548d509e17213a2f5d72b0d900b43f5430" - "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://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://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://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://www.apache.org/dyn/closer.lua/arrow/arrow-7.0.0/apache-arrow-7.0.0.tar.gz?action=download" - sha256: "e8f49b149a15ecef4e40fcfab1b87c113c6b1ee186005c169e5cdf95d31a99de" patches: - "17.0.0": - - patch_file: "patches/16.0.0-0001-fix-cmake.patch" + "18.0.0": + - patch_file: "patches/18.0.0-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" - "16.1.0": + "17.0.0": - patch_file: "patches/16.0.0-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" - "16.0.0": + "16.1.0": - patch_file: "patches/16.0.0-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" @@ -68,65 +35,4 @@ patches: - patch_file: "patches/11.0.0-0001-fix-cmake.patch" patch_description: "use cci package" patch_type: "conan" - "14.0.1": - - patch_file: "patches/11.0.0-0001-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - "14.0.0": - - patch_file: "patches/11.0.0-0001-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - "13.0.0": - - patch_file: "patches/11.0.0-0001-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - "12.0.1": - - patch_file: "patches/11.0.0-0001-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - "12.0.0": - - patch_file: "patches/11.0.0-0001-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - "11.0.0": - - patch_file: "patches/11.0.0-0001-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - "8.0.1": - - patch_file: "patches/8.0.0-0001-static-analyzers.patch" - patch_description: "do not look for static analyzers" - patch_type: "conan" - - patch_file: "patches/8.0.0-0002-install-utils.patch" - patch_description: "enable utils installation" - patch_type: "conan" - - patch_file: "patches/8.0.0-0003-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - - patch_file: "patches/8.0.0-0004-fix-msvc-build.patch" - patch_description: "patch Arrow such that it can be built using MSVC" - patch_type: "backport" - patch_source: "https://github.com/apache/arrow/pull/13108" - "8.0.0": - - patch_file: "patches/8.0.0-0001-static-analyzers.patch" - patch_description: "do not look for static analyzers" - patch_type: "conan" - - patch_file: "patches/8.0.0-0002-install-utils.patch" - patch_description: "enable utils installation" - patch_type: "conan" - - patch_file: "patches/8.0.0-0003-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" - - patch_file: "patches/8.0.0-0004-fix-msvc-build.patch" - patch_description: "patch Arrow such that it can be built using MSVC" - patch_type: "backport" - patch_source: "https://github.com/apache/arrow/pull/13108" - "7.0.0": - - patch_file: "patches/7.0.0-0001-static-analyzers.patch" - patch_description: "do not look for static analyzers" - patch_type: "conan" - - patch_file: "patches/7.0.0-0002-install-utils.patch" - patch_description: "enable utils installation" - patch_type: "conan" - - patch_file: "patches/7.0.0-0003-fix-cmake.patch" - patch_description: "use cci package" - patch_type: "conan" + \ No newline at end of file diff --git a/recipes/arrow/all/conanfile.py b/recipes/arrow/all/conanfile.py index af57c69006e28..be8bacf5a73f6 100644 --- a/recipes/arrow/all/conanfile.py +++ b/recipes/arrow/all/conanfile.py @@ -2,15 +2,14 @@ from conan.errors import ConanInvalidConfiguration, ConanException from conan.tools.build import check_min_cppstd, cross_building from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save, replace_in_file +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.microsoft import is_msvc, is_msvc_static_runtime from conan.tools.scm import Version import os import glob -import textwrap -required_conan_version = ">=1.53.0" +required_conan_version = ">=2.1.0" class ArrowConan(ConanFile): name = "arrow" @@ -123,21 +122,6 @@ def _min_cppstd(self): # https://github.com/apache/arrow/pull/13991 return "11" if Version(self.version) < "10.0.0" else "17" - @property - def _compilers_minimum_version(self): - return { - "11": { - "clang": "3.9", - }, - "17": { - "gcc": "8", - "clang": "7", - "apple-clang": "10", - "Visual Studio": "15", - "msvc": "191", - }, - }.get(self._min_cppstd, {}) - def export_sources(self): export_conandata_patches(self) copy(self, "conan_cmake_project_include.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src")) @@ -247,10 +231,13 @@ def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: + if ( + Version(self.version) < "10.0.0" + and self.settings.compiler == "clang" + and Version(self.settings.compiler.version) < "3.9" + ): raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + f"{self.ref} requires C++11, which needs at least clang-3.9" ) if self.options.get_safe("skyhook", False): @@ -454,31 +441,10 @@ def package(self): if self.options.with_flight_rpc: alias_map[f"ArrowFlight::arrow_flight_sql_{cmake_suffix}"] = f"arrow::arrow_flight_sql_{cmake_suffix}" - - self._create_cmake_module_alias_targets( - os.path.join(self.package_folder, self._module_file_rel_path), alias_map - ) - - def _create_cmake_module_alias_targets(self, module_file, targets): - content = "" - for alias, aliased in targets.items(): - content += textwrap.dedent("""\ - if(TARGET {aliased} AND NOT TARGET {alias}) - add_library({alias} INTERFACE IMPORTED) - set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased}) - endif() - """.format(alias=alias, aliased=aliased)) - save(self, module_file, content) - @property def _module_subfolder(self): return os.path.join("lib", "cmake") - @property - def _module_file_rel_path(self): - return os.path.join(self._module_subfolder, - f"conan-official-{self.name}-targets.cmake") - def package_info(self): # FIXME: fix CMake targets of components @@ -534,6 +500,9 @@ def package_info(self): self.cpp_info.components["libarrow_flight"].set_property("cmake_target_name", f"ArrowFlight::arrow_flight_{cmake_suffix}") self.cpp_info.components["libarrow_flight"].libs = [f"arrow_flight{suffix}"] self.cpp_info.components["libarrow_flight"].requires = ["libarrow"] + # https://github.com/apache/arrow/pull/43137#pullrequestreview-2267476893 + if Version(self.version) >= "18.0.0" and self.options.with_openssl: + self.cpp_info.components["libarrow_flight"].requires.append("openssl::openssl") if self.options.get_safe("with_flight_sql"): self.cpp_info.components["libarrow_flight_sql"].set_property("pkg_config_name", "flight_sql") @@ -616,38 +585,3 @@ def package_info(self): self.cpp_info.components["libarrow"].requires.append("grpc::grpc") if self.options.with_flight_rpc: self.cpp_info.components["libarrow_flight"].requires.append("protobuf::protobuf") - - # TODO: to remove in conan v2 - self.cpp_info.filenames["cmake_find_package"] = "Arrow" - self.cpp_info.filenames["cmake_find_package_multi"] = "Arrow" - self.cpp_info.components["libarrow"].names["cmake_find_package"] = f"arrow_{cmake_suffix}" - self.cpp_info.components["libarrow"].names["cmake_find_package_multi"] = f"arrow_{cmake_suffix}" - self.cpp_info.components["libarrow"].build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.components["libarrow"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - if self.options.parquet: - self.cpp_info.components["libparquet"].names["cmake_find_package"] = f"parquet_{cmake_suffix}" - self.cpp_info.components["libparquet"].names["cmake_find_package_multi"] = f"parquet_{cmake_suffix}" - self.cpp_info.components["libparquet"].build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.components["libparquet"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - if self.options.get_safe("substrait"): - self.cpp_info.components["libarrow_substrait"].names["cmake_find_package"] = f"arrow_substrait_{cmake_suffix}" - self.cpp_info.components["libarrow_substrait"].names["cmake_find_package_multi"] = f"arrow_substrait_{cmake_suffix}" - self.cpp_info.components["libarrow_substrait"].build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.components["libarrow_substrait"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - if self.options.gandiva: - self.cpp_info.components["libgandiva"].names["cmake_find_package"] = "gandiva" - self.cpp_info.components["libgandiva"].names["cmake_find_package_multi"] = "gandiva" - self.cpp_info.components["libgandiva"].build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.components["libgandiva"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - if self.options.with_flight_rpc: - self.cpp_info.components["libarrow_flight"].names["cmake_find_package"] = "flight_rpc" - self.cpp_info.components["libarrow_flight"].names["cmake_find_package_multi"] = "flight_rpc" - self.cpp_info.components["libarrow_flight"].build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.components["libarrow_flight"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - if self.options.get_safe("with_flight_sql"): - self.cpp_info.components["libarrow_flight_sql"].names["cmake_find_package"] = "flight_sql" - self.cpp_info.components["libarrow_flight_sql"].names["cmake_find_package_multi"] = "flight_sql" - self.cpp_info.components["libarrow_flight_sql"].build_modules["cmake_find_package"] = [self._module_file_rel_path] - self.cpp_info.components["libarrow_flight_sql"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path] - if self.options.cli and (self.options.with_cuda or self.options.with_flight_rpc or self.options.parquet): - self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/arrow/all/patches/18.0.0-0001-fix-cmake.patch b/recipes/arrow/all/patches/18.0.0-0001-fix-cmake.patch new file mode 100644 index 0000000000000..1000d42f4af61 --- /dev/null +++ b/recipes/arrow/all/patches/18.0.0-0001-fix-cmake.patch @@ -0,0 +1,59 @@ +diff --git a/cpp/cmake_modules/FindThriftAlt.cmake b/cpp/cmake_modules/FindThriftAlt.cmake +index 98a706d..edf195e 100644 +--- a/cpp/cmake_modules/FindThriftAlt.cmake ++++ b/cpp/cmake_modules/FindThriftAlt.cmake +@@ -45,22 +45,20 @@ endif() + # * https://github.com/apache/thrift/pull/2725 + # * https://github.com/apache/thrift/pull/2726 + # * https://github.com/conda-forge/thrift-cpp-feedstock/issues/68 +-if(NOT WIN32) +- set(find_package_args "") +- if(ThriftAlt_FIND_VERSION) +- list(APPEND find_package_args ${ThriftAlt_FIND_VERSION}) +- endif() +- if(ThriftAlt_FIND_QUIETLY) +- list(APPEND find_package_args QUIET) +- endif() +- find_package(Thrift ${find_package_args}) +- if(Thrift_FOUND) +- set(ThriftAlt_FOUND TRUE) +- add_executable(thrift::compiler IMPORTED) +- set_target_properties(thrift::compiler PROPERTIES IMPORTED_LOCATION +- "${THRIFT_COMPILER}") +- return() +- endif() ++set(find_package_args "") ++if(ThriftAlt_FIND_VERSION) ++ list(APPEND find_package_args ${ThriftAlt_FIND_VERSION}) ++endif() ++if(ThriftAlt_FIND_QUIETLY) ++ list(APPEND find_package_args QUIET) ++endif() ++find_package(Thrift ${find_package_args}) ++if(Thrift_FOUND) ++ set(ThriftAlt_FOUND TRUE) ++ add_executable(thrift::compiler IMPORTED) ++ set_target_properties(thrift::compiler PROPERTIES IMPORTED_LOCATION ++ "${THRIFT_COMPILER}") ++ return() + endif() + + function(extract_thrift_version) +diff --git a/cpp/src/parquet/CMakeLists.txt b/cpp/src/parquet/CMakeLists.txt +index b984ef7..429fc6d 100644 +--- a/cpp/src/parquet/CMakeLists.txt ++++ b/cpp/src/parquet/CMakeLists.txt +@@ -263,11 +263,11 @@ if(NOT PARQUET_MINIMAL_DEPENDENCY) + + # These are libraries that we will link privately with parquet_shared (as they + # do not need to be linked transitively by other linkers) +- list(APPEND PARQUET_SHARED_PRIVATE_LINK_LIBS thrift::thrift) ++ list(APPEND PARQUET_SHARED_PRIVATE_LINK_LIBS Boost::headers thrift::thrift) + + # Link publicly with parquet_static (because internal users need to + # transitively link all dependencies) +- list(APPEND PARQUET_STATIC_LINK_LIBS thrift::thrift) ++ list(APPEND PARQUET_STATIC_LINK_LIBS Boost::headers thrift::thrift) + if(NOT THRIFT_VENDORED) + list(APPEND PARQUET_STATIC_INSTALL_INTERFACE_LIBS thrift::thrift) + endif() diff --git a/recipes/arrow/all/patches/7.0.0-0001-static-analyzers.patch b/recipes/arrow/all/patches/7.0.0-0001-static-analyzers.patch deleted file mode 100644 index b7c585c4cf3d8..0000000000000 --- a/recipes/arrow/all/patches/7.0.0-0001-static-analyzers.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index dff5b1a59..1189a2957 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -161,11 +161,7 @@ else() - set(MSVC_TOOLCHAIN FALSE) - endif() - --find_package(ClangTools) --find_package(InferTools) --if("$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "1" -- OR CLANG_TIDY_FOUND -- OR INFER_FOUND) -+if("$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "1") - # Generate a Clang compile_commands.json "compilation database" file for use - # with various development tools, such as Vim's YouCompleteMe plugin. - # See http://clang.llvm.org/docs/JSONCompilationDatabase.html diff --git a/recipes/arrow/all/patches/7.0.0-0002-install-utils.patch b/recipes/arrow/all/patches/7.0.0-0002-install-utils.patch deleted file mode 100644 index 4660146a84833..0000000000000 --- a/recipes/arrow/all/patches/7.0.0-0002-install-utils.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/cpp/src/arrow/ipc/CMakeLists.txt b/cpp/src/arrow/ipc/CMakeLists.txt -index 495018ec0..f6cee6fde 100644 ---- a/cpp/src/arrow/ipc/CMakeLists.txt -+++ b/cpp/src/arrow/ipc/CMakeLists.txt -@@ -61,8 +61,12 @@ endif() - if(ARROW_BUILD_UTILITIES OR ARROW_BUILD_INTEGRATION) - add_executable(arrow-file-to-stream file_to_stream.cc) - target_link_libraries(arrow-file-to-stream ${ARROW_UTIL_LIB}) -+ install(TARGETS arrow-file-to-stream ${INSTALL_IS_OPTIONAL} -+ DESTINATION ${CMAKE_INSTALL_BINDIR}) - add_executable(arrow-stream-to-file stream_to_file.cc) - target_link_libraries(arrow-stream-to-file ${ARROW_UTIL_LIB}) -+ install(TARGETS arrow-stream-to-file ${INSTALL_IS_OPTIONAL} -+ DESTINATION ${CMAKE_INSTALL_BINDIR}) - - if(ARROW_BUILD_INTEGRATION) - add_dependencies(arrow-integration arrow-file-to-stream) diff --git a/recipes/arrow/all/patches/7.0.0-0003-fix-cmake.patch b/recipes/arrow/all/patches/7.0.0-0003-fix-cmake.patch deleted file mode 100644 index 6667caacfd169..0000000000000 --- a/recipes/arrow/all/patches/7.0.0-0003-fix-cmake.patch +++ /dev/null @@ -1,347 +0,0 @@ -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index 9e0d4c0b2..1189a2957 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -695,7 +695,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_LINK_LIBS ${ARROW_BROTLI_LIBS}) - list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS}) - if(Brotli_SOURCE STREQUAL "SYSTEM") -@@ -711,10 +711,17 @@ if(ARROW_WITH_BZ2) - endif() - - if(ARROW_WITH_LZ4) -- list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4) -- if(Lz4_SOURCE STREQUAL "SYSTEM") -- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4) -- endif() -+ 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_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) -@@ -903,8 +910,13 @@ endif() - - if(ARROW_MIMALLOC) - add_definitions(-DARROW_MIMALLOC) -- list(APPEND ARROW_LINK_LIBS mimalloc::mimalloc) -- list(APPEND ARROW_STATIC_LINK_LIBS mimalloc::mimalloc) -+ if (TARGET mimalloc-static) -+ list(APPEND ARROW_LINK_LIBS mimalloc-static) -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc-static) -+ else() -+ list(APPEND ARROW_LINK_LIBS mimalloc) -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc) -+ endif() - endif() - - # ---------------------------------------------------------------------- -diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake -index bc389521b..62bf3144b 100644 ---- a/cpp/cmake_modules/ThirdpartyToolchain.cmake -+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake -@@ -954,7 +954,7 @@ endif() - - if(ARROW_BOOST_REQUIRED) - resolve_dependency(Boost -- HAVE_ALT -+ USE_CONFIG - TRUE - REQUIRED_VERSION - ${ARROW_BOOST_REQUIRED_VERSION} -@@ -965,7 +965,7 @@ if(ARROW_BOOST_REQUIRED) - if(TARGET Boost::system) - set(BOOST_SYSTEM_LIBRARY Boost::system) - set(BOOST_FILESYSTEM_LIBRARY Boost::filesystem) -- elseif(BoostAlt_FOUND) -+ elseif(Boost_FOUND) - set(BOOST_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY}) - set(BOOST_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY}) - else() -@@ -1108,9 +1108,9 @@ macro(build_brotli) - endmacro() - - if(ARROW_WITH_BROTLI) -- resolve_dependency(Brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc) -+ resolve_dependency(brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc) - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon -+ get_target_property(BROTLI_INCLUDE_DIR brotli::brotlicommon - INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${BROTLI_INCLUDE_DIR}) - endif() -@@ -1302,22 +1302,17 @@ 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) - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR}) -+ include_directories(SYSTEM ${gflags_INCLUDE_DIR}) - -- if(NOT TARGET ${GFLAGS_LIBRARIES}) -- if(TARGET gflags-shared) -- set(GFLAGS_LIBRARIES gflags-shared) -- elseif(TARGET gflags_shared) -- set(GFLAGS_LIBRARIES gflags_shared) -- endif() -- endif() -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${gflags_LIBRARIES_TARGETS}) -+ set(GFLAGS_LIBRARIES gflags::gflags) - endif() - - # ---------------------------------------------------------------------- -@@ -1411,9 +1406,9 @@ if(ARROW_WITH_THRIFT) - thrift) - endif() - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${THRIFT_INCLUDE_DIR}) -+ include_directories(SYSTEM ${Thrift_INCLUDE_DIR}) - -- string(REPLACE "." ";" VERSION_LIST ${THRIFT_VERSION}) -+ string(REPLACE "." ";" VERSION_LIST ${Thrift_VERSION}) - list(GET VERSION_LIST 0 THRIFT_VERSION_MAJOR) - list(GET VERSION_LIST 1 THRIFT_VERSION_MINOR) - list(GET VERSION_LIST 2 THRIFT_VERSION_PATCH) -@@ -1528,6 +1523,7 @@ if(ARROW_WITH_PROTOBUF) - set(ARROW_PROTOBUF_REQUIRED_VERSION "2.6.1") - endif() - resolve_dependency(Protobuf -+ USE_CONFIG - REQUIRED_VERSION - ${ARROW_PROTOBUF_REQUIRED_VERSION} - PC_PACKAGE_NAMES -@@ -1538,7 +1534,7 @@ if(ARROW_WITH_PROTOBUF) - endif() - - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${PROTOBUF_INCLUDE_DIR}) -+ include_directories(SYSTEM ${protobuf_INCLUDE_DIR}) - - if(TARGET arrow::protobuf::libprotobuf) - set(ARROW_PROTOBUF_LIBPROTOBUF arrow::protobuf::libprotobuf) -@@ -1547,9 +1543,9 @@ if(ARROW_WITH_PROTOBUF) - if(NOT TARGET protobuf::libprotobuf) - add_library(protobuf::libprotobuf UNKNOWN IMPORTED) - set_target_properties(protobuf::libprotobuf -- PROPERTIES IMPORTED_LOCATION "${PROTOBUF_LIBRARY}" -+ PROPERTIES IMPORTED_LOCATION "${Protobuf_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES -- "${PROTOBUF_INCLUDE_DIR}") -+ "${Protobuf_INCLUDE_DIR}") - endif() - set(ARROW_PROTOBUF_LIBPROTOBUF protobuf::libprotobuf) - endif() -@@ -1569,7 +1565,7 @@ if(ARROW_WITH_PROTOBUF) - set_target_properties(protobuf::libprotoc - PROPERTIES IMPORTED_LOCATION "${Protobuf_PROTOC_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES -- "${PROTOBUF_INCLUDE_DIR}") -+ "${Protobuf_INCLUDE_DIR}") - endif() - set(ARROW_PROTOBUF_LIBPROTOC protobuf::libprotoc) - endif() -@@ -1600,6 +1596,7 @@ endif() - # jemalloc - Unix-only high-performance allocator - - if(ARROW_JEMALLOC) -+if(0) - message(STATUS "Building (vendored) jemalloc from source") - # We only use a vendored jemalloc as we want to control its version. - # Also our build of jemalloc is specially prefixed so that it will not -@@ -1665,12 +1662,18 @@ if(ARROW_JEMALLOC) - add_dependencies(jemalloc::jemalloc jemalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS jemalloc::jemalloc) -+else() -+ find_package(jemalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${jemalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${jemalloc_LIBRARIES_TARGETS}) -+endif() - endif() - - # ---------------------------------------------------------------------- - # mimalloc - Cross-platform high-performance allocator, from Microsoft - - if(ARROW_MIMALLOC) -+if(0) - message(STATUS "Building (vendored) mimalloc from source") - # We only use a vendored mimalloc as we want to control its build options. - -@@ -1716,6 +1719,11 @@ if(ARROW_MIMALLOC) - add_dependencies(toolchain mimalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS mimalloc::mimalloc) -+else() -+ find_package(mimalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${mimalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${mimalloc_LIBRARIES_TARGETS} ) -+endif() - endif() - - # ---------------------------------------------------------------------- -@@ -2001,7 +2009,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} -@@ -2038,10 +2046,9 @@ endmacro() - - if((NOT ARROW_SIMD_LEVEL STREQUAL "NONE") OR (NOT ARROW_RUNTIME_SIMD_LEVEL STREQUAL "NONE" - )) -- set(xsimd_SOURCE "BUNDLED") - resolve_dependency(xsimd) - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${XSIMD_INCLUDE_DIR}) -+ include_directories(SYSTEM ${xsimd_INCLUDE_DIR}) - endif() - - macro(build_zlib) -@@ -2140,10 +2147,14 @@ macro(build_lz4) - endmacro() - - if(ARROW_WITH_LZ4) -- resolve_dependency(Lz4 PC_PACKAGE_NAMES liblz4) -+ resolve_dependency(lz4) - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES) -+ if (TARGET LZ4::lz4_static) -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_static INTERFACE_INCLUDE_DIRECTORIES) -+ else() -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_shared INTERFACE_INCLUDE_DIRECTORIES) -+ endif() - include_directories(SYSTEM ${LZ4_INCLUDE_DIR}) - endif() - -@@ -2274,7 +2285,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_LIB re2::re2 IMPORTED_LOCATION) - string(APPEND ARROW_PC_LIBS_PRIVATE " ${RE2_LIB}") -@@ -2337,7 +2348,7 @@ endmacro() - if(ARROW_WITH_BZ2) - resolve_dependency(BZip2) - if(${BZip2_SOURCE} STREQUAL "SYSTEM") -- string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZIP2_LIBRARIES}") -+ string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZip2_LIBRARIES}") - endif() - - if(NOT TARGET BZip2::BZip2) -@@ -2346,7 +2357,7 @@ if(ARROW_WITH_BZ2) - PROPERTIES IMPORTED_LOCATION "${BZIP2_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIR}") - endif() -- include_directories(SYSTEM "${BZIP2_INCLUDE_DIR}") -+ include_directories(SYSTEM "${BZip2_INCLUDE_DIR}") - endif() - - macro(build_utf8proc) -@@ -3555,7 +3566,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} -@@ -3573,9 +3584,9 @@ if(ARROW_WITH_GRPC) - else() - # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or ${GRPC_INCLUDE_DIR}/grpcpp - # depending on the gRPC version. -- if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h") -+ if(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 ${gPC_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}") -@@ -4097,9 +4108,9 @@ macro(build_opentelemetry) - endmacro() - - if(ARROW_WITH_OPENTELEMETRY) -- set(opentelemetry-cpp_SOURCE "AUTO") -+ set(opentelemetry-cpp_SOURCE "SYSTEM") - resolve_dependency(opentelemetry-cpp) -- get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::api -+ get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::opentelemetry_common - INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${OPENTELEMETRY_INCLUDE_DIR}) - message(STATUS "Found OpenTelemetry headers: ${OPENTELEMETRY_INCLUDE_DIR}") -diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt -index b984bc104..2c78cd9ec 100644 ---- a/cpp/src/arrow/CMakeLists.txt -+++ b/cpp/src/arrow/CMakeLists.txt -@@ -323,10 +323,14 @@ set(ARROW_TESTING_SRCS - - set(_allocator_dependencies "") # Empty list - if(ARROW_JEMALLOC) -- list(APPEND _allocator_dependencies jemalloc_ep) -+ list(APPEND _allocator_dependencies jemalloc::jemalloc) - endif() - if(ARROW_MIMALLOC) -- list(APPEND _allocator_dependencies mimalloc_ep) -+ if (TARGET mimalloc-static) -+ list(APPEND _allocator_dependencies mimalloc-static) -+ else() -+ list(APPEND _allocator_dependencies mimalloc) -+ endif() - endif() - - if(_allocator_dependencies) -diff --git a/cpp/src/arrow/flight/CMakeLists.txt b/cpp/src/arrow/flight/CMakeLists.txt -index 2cf8c9913..90ebb9ac3 100644 ---- a/cpp/src/arrow/flight/CMakeLists.txt -+++ b/cpp/src/arrow/flight/CMakeLists.txt -@@ -17,6 +17,9 @@ - - add_custom_target(arrow_flight) - -+# TODO: This is a temporary workaround. absl should be LINKED as TARGET. -+include_directories(SYSTEM ${absl_INCLUDE_DIR}) -+ - arrow_install_all_headers("arrow/flight") - - set(ARROW_FLIGHT_LINK_LIBS gRPC::grpc++ ${ARROW_PROTOBUF_LIBPROTOBUF}) -diff --git a/cpp/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc -index cf8bf64b2..cf8966b22 100644 ---- a/cpp/src/arrow/memory_pool.cc -+++ b/cpp/src/arrow/memory_pool.cc -@@ -48,7 +48,7 @@ - // Needed to support jemalloc 3 and 4 - #define JEMALLOC_MANGLE - // Explicitly link to our version of jemalloc --#include "jemalloc_ep/dist/include/jemalloc/jemalloc.h" -+#include "jemalloc/jemalloc.h" - #endif - - #ifdef ARROW_MIMALLOC diff --git a/recipes/arrow/all/patches/8.0.0-0001-static-analyzers.patch b/recipes/arrow/all/patches/8.0.0-0001-static-analyzers.patch deleted file mode 100644 index 236c60c859c27..0000000000000 --- a/recipes/arrow/all/patches/8.0.0-0001-static-analyzers.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index aba18c8d2..5eec4ea72 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -162,11 +162,7 @@ else() - set(MSVC_TOOLCHAIN FALSE) - endif() - --find_package(ClangTools) --find_package(InferTools) --if("$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "1" -- OR CLANG_TIDY_FOUND -- OR INFER_FOUND) -+if("$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "1") - # Generate a Clang compile_commands.json "compilation database" file for use - # with various development tools, such as Vim's YouCompleteMe plugin. - # See http://clang.llvm.org/docs/JSONCompilationDatabase.html diff --git a/recipes/arrow/all/patches/8.0.0-0002-install-utils.patch b/recipes/arrow/all/patches/8.0.0-0002-install-utils.patch deleted file mode 100644 index 16a21d2e1a272..0000000000000 --- a/recipes/arrow/all/patches/8.0.0-0002-install-utils.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index 5eec4ea72..301f0074c 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -717,7 +717,7 @@ if(ARROW_WITH_BZ2) - endif() - - if(ARROW_WITH_LZ4) -- list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4) -+ list(APPEND ARROW_STATIC_LINK_LIBS lz4::lz4) - if(Lz4_SOURCE STREQUAL "SYSTEM") - list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4) - endif() -@@ -903,8 +903,8 @@ endif() - if(ARROW_JEMALLOC) - add_definitions(-DARROW_JEMALLOC) - add_definitions(-DARROW_JEMALLOC_INCLUDE_DIR=${JEMALLOC_INCLUDE_DIR}) -- list(APPEND ARROW_LINK_LIBS jemalloc::jemalloc) -- list(APPEND ARROW_STATIC_LINK_LIBS jemalloc::jemalloc) -+ list(APPEND ARROW_LINK_LIBS jemalloc) -+ list(APPEND ARROW_STATIC_LINK_LIBS jemalloc) - endif() - - if(ARROW_MIMALLOC) -diff --git a/cpp/src/arrow/ipc/CMakeLists.txt b/cpp/src/arrow/ipc/CMakeLists.txt -index 495018ec0..3dcb35d04 100644 ---- a/cpp/src/arrow/ipc/CMakeLists.txt -+++ b/cpp/src/arrow/ipc/CMakeLists.txt -@@ -61,9 +61,13 @@ endif() - if(ARROW_BUILD_UTILITIES OR ARROW_BUILD_INTEGRATION) - add_executable(arrow-file-to-stream file_to_stream.cc) - target_link_libraries(arrow-file-to-stream ${ARROW_UTIL_LIB}) -+ install(TARGETS arrow-file-to-stream ${INSTALL_IS_OPTIONAL} -+ DESTINATION ${CMAKE_INSTALL_BINDIR}) - add_executable(arrow-stream-to-file stream_to_file.cc) - target_link_libraries(arrow-stream-to-file ${ARROW_UTIL_LIB}) -- -+ install(TARGETS arrow-stream-to-file ${INSTALL_IS_OPTIONAL} -+ DESTINATION ${CMAKE_INSTALL_BINDIR}) -+ - if(ARROW_BUILD_INTEGRATION) - add_dependencies(arrow-integration arrow-file-to-stream) - add_dependencies(arrow-integration arrow-stream-to-file) diff --git a/recipes/arrow/all/patches/8.0.0-0003-fix-cmake.patch b/recipes/arrow/all/patches/8.0.0-0003-fix-cmake.patch deleted file mode 100644 index 3440e2df0b601..0000000000000 --- a/recipes/arrow/all/patches/8.0.0-0003-fix-cmake.patch +++ /dev/null @@ -1,425 +0,0 @@ -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index 301f0074c..279d92685 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -701,7 +701,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_LINK_LIBS ${ARROW_BROTLI_LIBS}) - list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS}) - if(Brotli_SOURCE STREQUAL "SYSTEM") -@@ -717,11 +717,18 @@ if(ARROW_WITH_BZ2) - endif() - - if(ARROW_WITH_LZ4) -- list(APPEND ARROW_STATIC_LINK_LIBS lz4::lz4) -- if(Lz4_SOURCE STREQUAL "SYSTEM") -- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_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_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::snappy) -@@ -909,8 +916,13 @@ endif() - - if(ARROW_MIMALLOC) - add_definitions(-DARROW_MIMALLOC) -- list(APPEND ARROW_LINK_LIBS mimalloc::mimalloc) -- list(APPEND ARROW_STATIC_LINK_LIBS mimalloc::mimalloc) -+ if (TARGET mimalloc-static) -+ list(APPEND ARROW_LINK_LIBS mimalloc-static) -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc-static) -+ else() -+ list(APPEND ARROW_LINK_LIBS mimalloc) -+ list(APPEND ARROW_STATIC_LINK_LIBS mimalloc) -+ endif() - endif() - - # ---------------------------------------------------------------------- -diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake -index f070323e2..16faf73b6 100644 ---- a/cpp/cmake_modules/ThirdpartyToolchain.cmake -+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake -@@ -959,6 +959,7 @@ endif() - # - Tests need Boost at runtime. - # - S3FS and Flight benchmarks need Boost at runtime. - if(ARROW_BUILD_INTEGRATION -+ OR ARROW_BOOST_REQUIRED - OR ARROW_BUILD_TESTS - OR (ARROW_FLIGHT AND ARROW_BUILD_BENCHMARKS) - OR (ARROW_S3 AND ARROW_BUILD_BENCHMARKS)) -@@ -975,7 +976,7 @@ endif() - - if(ARROW_BOOST_REQUIRED) - resolve_dependency(Boost -- HAVE_ALT -+ USE_CONFIG - TRUE - REQUIRED_VERSION - ${ARROW_BOOST_REQUIRED_VERSION} -@@ -986,7 +987,7 @@ if(ARROW_BOOST_REQUIRED) - if(TARGET Boost::system) - set(BOOST_SYSTEM_LIBRARY Boost::system) - set(BOOST_FILESYSTEM_LIBRARY Boost::filesystem) -- elseif(BoostAlt_FOUND) -+ elseif(Boost_FOUND) - set(BOOST_SYSTEM_LIBRARY ${Boost_SYSTEM_LIBRARY}) - set(BOOST_FILESYSTEM_LIBRARY ${Boost_FILESYSTEM_LIBRARY}) - else() -@@ -1129,9 +1130,9 @@ macro(build_brotli) - endmacro() - - if(ARROW_WITH_BROTLI) -- resolve_dependency(Brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc) -+ resolve_dependency(brotli PC_PACKAGE_NAMES libbrotlidec libbrotlienc) - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon -+ get_target_property(BROTLI_INCLUDE_DIR brotli::brotlicommon - INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${BROTLI_INCLUDE_DIR}) - endif() -@@ -1323,22 +1324,16 @@ 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) - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR}) -- -- if(NOT TARGET ${GFLAGS_LIBRARIES}) -- if(TARGET gflags-shared) -- set(GFLAGS_LIBRARIES gflags-shared) -- elseif(TARGET gflags_shared) -- set(GFLAGS_LIBRARIES gflags_shared) -- endif() -- endif() -+ include_directories(SYSTEM ${gflags_INCLUDE_DIR}) -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${gflags_LIBRARIES_TARGETS}) -+ set(GFLAGS_LIBRARIES gflags::gflags) - endif() - - # ---------------------------------------------------------------------- -@@ -1432,9 +1427,9 @@ if(ARROW_WITH_THRIFT) - thrift) - endif() - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${THRIFT_INCLUDE_DIR}) -+ include_directories(SYSTEM ${Thrift_INCLUDE_DIR}) - -- string(REPLACE "." ";" VERSION_LIST ${THRIFT_VERSION}) -+ string(REPLACE "." ";" VERSION_LIST ${Thrift_VERSION}) - list(GET VERSION_LIST 0 THRIFT_VERSION_MAJOR) - list(GET VERSION_LIST 1 THRIFT_VERSION_MINOR) - list(GET VERSION_LIST 2 THRIFT_VERSION_PATCH) -@@ -1557,6 +1552,7 @@ if(ARROW_WITH_PROTOBUF) - set(ARROW_PROTOBUF_REQUIRED_VERSION "2.6.1") - endif() - resolve_dependency(Protobuf -+ USE_CONFIG - REQUIRED_VERSION - ${ARROW_PROTOBUF_REQUIRED_VERSION} - PC_PACKAGE_NAMES -@@ -1567,7 +1563,7 @@ if(ARROW_WITH_PROTOBUF) - endif() - - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${PROTOBUF_INCLUDE_DIR}) -+ include_directories(SYSTEM ${protobuf_INCLUDE_DIR}) - - if(TARGET arrow::protobuf::libprotobuf) - set(ARROW_PROTOBUF_LIBPROTOBUF arrow::protobuf::libprotobuf) -@@ -1576,9 +1572,9 @@ if(ARROW_WITH_PROTOBUF) - if(NOT TARGET protobuf::libprotobuf) - add_library(protobuf::libprotobuf UNKNOWN IMPORTED) - set_target_properties(protobuf::libprotobuf -- PROPERTIES IMPORTED_LOCATION "${PROTOBUF_LIBRARY}" -+ PROPERTIES IMPORTED_LOCATION "${Protobuf_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES -- "${PROTOBUF_INCLUDE_DIR}") -+ "${Protobuf_INCLUDE_DIR}") - endif() - set(ARROW_PROTOBUF_LIBPROTOBUF protobuf::libprotobuf) - endif() -@@ -1598,7 +1594,7 @@ if(ARROW_WITH_PROTOBUF) - set_target_properties(protobuf::libprotoc - PROPERTIES IMPORTED_LOCATION "${Protobuf_PROTOC_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES -- "${PROTOBUF_INCLUDE_DIR}") -+ "${Protobuf_INCLUDE_DIR}") - endif() - set(ARROW_PROTOBUF_LIBPROTOC protobuf::libprotoc) - endif() -@@ -1690,11 +1686,12 @@ 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) - target_include_directories(substrait PUBLIC ${SUBSTRAIT_INCLUDES}) -+ target_include_directories(substrait PUBLIC ${PROTOBUF_INCLUDE_DIR}) - target_link_libraries(substrait INTERFACE ${ARROW_PROTOBUF_LIBPROTOBUF}) - add_dependencies(substrait substrait_gen) - -@@ -1711,6 +1708,7 @@ endif() - # jemalloc - Unix-only high-performance allocator - - if(ARROW_JEMALLOC) -+if(0) - message(STATUS "Building (vendored) jemalloc from source") - # We only use a vendored jemalloc as we want to control its version. - # Also our build of jemalloc is specially prefixed so that it will not -@@ -1780,12 +1778,18 @@ if(ARROW_JEMALLOC) - add_dependencies(jemalloc::jemalloc jemalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS jemalloc::jemalloc) -+else() -+ find_package(jemalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${jemalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${jemalloc_LIBRARIES_TARGETS}) -+endif() - endif() - - # ---------------------------------------------------------------------- - # mimalloc - Cross-platform high-performance allocator, from Microsoft - - if(ARROW_MIMALLOC) -+if(0) - message(STATUS "Building (vendored) mimalloc from source") - # We only use a vendored mimalloc as we want to control its build options. - -@@ -1836,6 +1840,11 @@ if(ARROW_MIMALLOC) - add_dependencies(toolchain mimalloc_ep) - - list(APPEND ARROW_BUNDLED_STATIC_LIBS mimalloc::mimalloc) -+else() -+ find_package(mimalloc REQUIRED CONFIG) -+ include_directories(SYSTEM "${mimalloc_INCLUDE_DIR}") -+ list(APPEND ARROW_BUNDLED_STATIC_LIBS ${mimalloc_LIBRARIES_TARGETS} ) -+endif() - endif() - - # ---------------------------------------------------------------------- -@@ -2121,7 +2130,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} -@@ -2158,10 +2167,10 @@ endmacro() - - if((NOT ARROW_SIMD_LEVEL STREQUAL "NONE") OR (NOT ARROW_RUNTIME_SIMD_LEVEL STREQUAL "NONE" - )) -- set(xsimd_SOURCE "BUNDLED") -+ set(xsimd_SOURCE "SYSTEM") - resolve_dependency(xsimd) - # TODO: Don't use global includes but rather target_include_directories -- include_directories(SYSTEM ${XSIMD_INCLUDE_DIR}) -+ include_directories(SYSTEM ${xsimd_INCLUDE_DIR}) - endif() - - macro(build_zlib) -@@ -2260,10 +2269,14 @@ macro(build_lz4) - endmacro() - - if(ARROW_WITH_LZ4) -- resolve_dependency(Lz4 PC_PACKAGE_NAMES liblz4) -+ resolve_dependency(Lz4) - - # TODO: Don't use global includes but rather target_include_directories -- get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES) -+ if (TARGET LZ4::lz4_static) -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_static INTERFACE_INCLUDE_DIRECTORIES) -+ else() -+ get_target_property(LZ4_INCLUDE_DIR LZ4::lz4_shared INTERFACE_INCLUDE_DIRECTORIES) -+ endif() - include_directories(SYSTEM ${LZ4_INCLUDE_DIR}) - endif() - -@@ -2394,7 +2407,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_LIB re2::re2 IMPORTED_LOCATION_${UPPERCASE_BUILD_TYPE}) - if(NOT RE2_LIB) -@@ -2464,7 +2477,7 @@ endmacro() - if(ARROW_WITH_BZ2) - resolve_dependency(BZip2) - if(${BZip2_SOURCE} STREQUAL "SYSTEM") -- string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZIP2_LIBRARIES}") -+ string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZip2_LIBRARIES}") - endif() - - if(NOT TARGET BZip2::BZip2) -@@ -2473,7 +2486,7 @@ if(ARROW_WITH_BZ2) - PROPERTIES IMPORTED_LOCATION "${BZIP2_LIBRARIES}" - INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIR}") - endif() -- include_directories(SYSTEM "${BZIP2_INCLUDE_DIR}") -+ include_directories(SYSTEM "${BZip2_INCLUDE_DIR}") - endif() - - macro(build_utf8proc) -@@ -3709,7 +3722,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} -@@ -3727,9 +3740,9 @@ if(ARROW_WITH_GRPC) - else() - # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or ${GRPC_INCLUDE_DIR}/grpcpp - # depending on the gRPC version. -- if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h") -+ if(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}") -@@ -3937,7 +3950,7 @@ macro(build_google_cloud_cpp_storage) - endmacro() - - if(ARROW_WITH_GOOGLE_CLOUD_CPP) -- resolve_dependency(google_cloud_cpp_storage) -+ resolve_dependency(google_cloud_cpp) - get_target_property(google_cloud_cpp_storage_INCLUDE_DIR google-cloud-cpp::storage - INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${google_cloud_cpp_storage_INCLUDE_DIR}) -@@ -4264,9 +4277,9 @@ if(ARROW_WITH_OPENTELEMETRY) - # cURL is required whether we build from source or use an existing installation - # (OTel's cmake files do not call find_curl for you) - find_curl() -- set(opentelemetry-cpp_SOURCE "AUTO") -+ set(opentelemetry-cpp_SOURCE "SYSTEM") - resolve_dependency(opentelemetry-cpp) -- get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::api -+ get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::opentelemetry_common - INTERFACE_INCLUDE_DIRECTORIES) - include_directories(SYSTEM ${OPENTELEMETRY_INCLUDE_DIR}) - message(STATUS "Found OpenTelemetry headers: ${OPENTELEMETRY_INCLUDE_DIR}") -diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt -index 690c51a4a..752f3b903 100644 ---- a/cpp/src/arrow/CMakeLists.txt -+++ b/cpp/src/arrow/CMakeLists.txt -@@ -326,10 +326,14 @@ set(ARROW_TESTING_SRCS - - set(_allocator_dependencies "") # Empty list - if(ARROW_JEMALLOC) -- list(APPEND _allocator_dependencies jemalloc_ep) -+ list(APPEND _allocator_dependencies jemalloc::jemalloc) - endif() - if(ARROW_MIMALLOC) -- list(APPEND _allocator_dependencies mimalloc_ep) -+ if (TARGET mimalloc-static) -+ list(APPEND _allocator_dependencies mimalloc-static) -+ else() -+ list(APPEND _allocator_dependencies mimalloc) -+ endif() - endif() - - if(_allocator_dependencies) -diff --git a/cpp/src/arrow/flight/CMakeLists.txt b/cpp/src/arrow/flight/CMakeLists.txt -index f9d135654..c9bcf7933 100644 ---- a/cpp/src/arrow/flight/CMakeLists.txt -+++ b/cpp/src/arrow/flight/CMakeLists.txt -@@ -17,6 +17,9 @@ - - add_custom_target(arrow_flight) - -+# TODO: This is a temporary workaround. absl should be LINKED as TARGET. -+include_directories(SYSTEM ${absl_INCLUDE_DIR}) -+ - arrow_install_all_headers("arrow/flight") - - set(ARROW_FLIGHT_LINK_LIBS gRPC::grpc++ ${ARROW_PROTOBUF_LIBPROTOBUF}) -diff --git a/cpp/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc -index 2fab6f382..1f8f8964b 100644 ---- a/cpp/src/arrow/memory_pool.cc -+++ b/cpp/src/arrow/memory_pool.cc -@@ -52,7 +52,7 @@ - // Needed to support jemalloc 3 and 4 - #define JEMALLOC_MANGLE - // Explicitly link to our version of jemalloc --#include "jemalloc_ep/dist/include/jemalloc/jemalloc.h" -+#include "jemalloc/jemalloc.h" - #endif - - #ifdef ARROW_MIMALLOC -diff --git a/cpp/src/gandiva/CMakeLists.txt b/cpp/src/gandiva/CMakeLists.txt -index 71faf9a38..3aabea18b 100644 ---- a/cpp/src/gandiva/CMakeLists.txt -+++ b/cpp/src/gandiva/CMakeLists.txt -@@ -25,7 +25,7 @@ add_custom_target(gandiva-benchmarks) - - add_dependencies(gandiva-all gandiva gandiva-tests gandiva-benchmarks) - --find_package(LLVMAlt REQUIRED) -+find_package(LLVM REQUIRED) - - if(LLVM_VERSION_MAJOR LESS "10") - set(GANDIVA_CXX_STANDARD ${CMAKE_CXX_STANDARD}) -@@ -40,7 +40,7 @@ endif() - - add_definitions(-DGANDIVA_LLVM_VERSION=${LLVM_VERSION_MAJOR}) - --find_package(OpenSSLAlt REQUIRED) -+find_package(OpenSSL REQUIRED) - - # Set the path where the bitcode file generated, see precompiled/CMakeLists.txt - set(GANDIVA_PRECOMPILED_BC_PATH "${CMAKE_CURRENT_BINARY_DIR}/irhelpers.bc") -@@ -98,10 +98,11 @@ set(SRC_FILES - random_generator_holder.cc - ${GANDIVA_PRECOMPILED_CC_PATH}) - --set(GANDIVA_SHARED_PRIVATE_LINK_LIBS arrow_shared LLVM::LLVM_INTERFACE -- ${GANDIVA_OPENSSL_LIBS}) -+set(GANDIVA_SHARED_PRIVATE_LINK_LIBS arrow_shared llvm-core::llvm-core NTERFACE -+ ${GANDIVA_OPENSSL_LIBS}) -+ -+set(GANDIVA_STATIC_LINK_LIBS arrow_static llvm-core::llvm-core ${GANDIVA_OPENSSL_LIBS}) - --set(GANDIVA_STATIC_LINK_LIBS arrow_static LLVM::LLVM_INTERFACE ${GANDIVA_OPENSSL_LIBS}) - - if(ARROW_GANDIVA_STATIC_LIBSTDCPP AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX - )) -@@ -139,7 +140,7 @@ add_arrow_lib(gandiva - arrow_dependencies - precompiled - EXTRA_INCLUDES -- $ -+ $ - ${GANDIVA_OPENSSL_INCLUDE_DIR} - ${UTF8PROC_INCLUDE_DIR} - SHARED_LINK_FLAGS diff --git a/recipes/arrow/all/patches/8.0.0-0004-fix-msvc-build.patch b/recipes/arrow/all/patches/8.0.0-0004-fix-msvc-build.patch deleted file mode 100644 index 8a74b6c36b662..0000000000000 --- a/recipes/arrow/all/patches/8.0.0-0004-fix-msvc-build.patch +++ /dev/null @@ -1,395 +0,0 @@ -From 642d5f26f71e88976b4e10c4aa23084c927c2fa7 Mon Sep 17 00:00:00 2001 -From: Will Jones -Date: Mon, 13 Jun 2022 15:09:36 +0200 -Subject: [PATCH] ARROW-15415: [C++] Fixes for MSVC + vcpkg Debug build - (#13108) - -These are the changes needed for me to be able to compile Arrow in MSCV (from Visual Studio 2022) with the following CMakeUserPresets entry: - -```json -{ - "name": "user-cpp-debug-mscv", - "inherits": [ "ninja-debug"], - "cacheVariables": { - "ARROW_DEPENDENCY_SOURCE": "VCPKG", - "CMAKE_BUILD_TYPE": "Debug", - "VCPKG_TARGET_TRIPLET": "x64-windows", - "VCPKG_LIBRARY_LINKAGE": "dynamic", - "ARROW_DEPENDENCY_USE_SHARED": "ON", - "ARROW_BUILD_EXAMPLES": "ON" - } -} -``` - -Authored-by: Will Jones -Signed-off-by: David Li -(cherry picked from commit a53f2bda5dfa50f2d1dbfd9d7fbc98d8c9725564) ---- - cpp/cmake_modules/FindThrift.cmake | 12 +++- - cpp/src/arrow/compute/exec/exec_plan.cc | 6 +- - cpp/src/arrow/compute/exec/hash_join.cc | 1 + - cpp/src/arrow/compute/exec/hash_join.h | 2 +- - cpp/src/arrow/compute/exec/hash_join_node.cc | 1 + - cpp/src/arrow/compute/function.cc | 1 + - cpp/src/arrow/compute/light_array_test.cc | 1 + - cpp/src/arrow/util/tracing.cc | 18 +++-- - cpp/src/arrow/util/tracing.h | 44 +++--------- - cpp/src/arrow/util/tracing_internal.cc | 30 +++++++- - cpp/src/arrow/util/tracing_internal.h | 75 ++++++++++++-------- - 11 files changed, 107 insertions(+), 84 deletions(-) - -diff --git a/cpp/cmake_modules/FindThrift.cmake b/cpp/cmake_modules/FindThrift.cmake -index 750d8ce83..dd54fd10f 100644 ---- a/cpp/cmake_modules/FindThrift.cmake -+++ b/cpp/cmake_modules/FindThrift.cmake -@@ -46,9 +46,17 @@ endfunction(EXTRACT_THRIFT_VERSION) - if(MSVC_TOOLCHAIN AND NOT DEFINED THRIFT_MSVC_LIB_SUFFIX) - if(NOT ARROW_THRIFT_USE_SHARED) - if(ARROW_USE_STATIC_CRT) -- set(THRIFT_MSVC_LIB_SUFFIX "mt") -+ if("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") -+ set(THRIFT_MSVC_LIB_SUFFIX "mtd") -+ else() -+ set(THRIFT_MSVC_LIB_SUFFIX "mt") -+ endif() - else() -- set(THRIFT_MSVC_LIB_SUFFIX "md") -+ if("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG") -+ set(THRIFT_MSVC_LIB_SUFFIX "mdd") -+ else() -+ set(THRIFT_MSVC_LIB_SUFFIX "md") -+ endif() - endif() - endif() - endif() -diff --git a/cpp/src/arrow/compute/exec/exec_plan.cc b/cpp/src/arrow/compute/exec/exec_plan.cc -index b7a9c7e1b..e1f90084d 100644 ---- a/cpp/src/arrow/compute/exec/exec_plan.cc -+++ b/cpp/src/arrow/compute/exec/exec_plan.cc -@@ -85,9 +85,11 @@ struct ExecPlanImpl : public ExecPlan { - #ifdef ARROW_WITH_OPENTELEMETRY - if (HasMetadata()) { - auto pairs = metadata().get()->sorted_pairs(); -+ opentelemetry::nostd::shared_ptr span = -+ ::arrow::internal::tracing::UnwrapSpan(span_.details.get()); - std::for_each(std::begin(pairs), std::end(pairs), -- [this](std::pair const& pair) { -- span_.Get().span->SetAttribute(pair.first, pair.second); -+ [span](std::pair const& pair) { -+ span->SetAttribute(pair.first, pair.second); - }); - } - #endif -diff --git a/cpp/src/arrow/compute/exec/hash_join.cc b/cpp/src/arrow/compute/exec/hash_join.cc -index 3207bb969..4efe865b9 100644 ---- a/cpp/src/arrow/compute/exec/hash_join.cc -+++ b/cpp/src/arrow/compute/exec/hash_join.cc -@@ -28,6 +28,7 @@ - #include "arrow/compute/exec/hash_join_dict.h" - #include "arrow/compute/exec/task_util.h" - #include "arrow/compute/kernels/row_encoder.h" -+#include "arrow/util/tracing_internal.h" - - namespace arrow { - namespace compute { -diff --git a/cpp/src/arrow/compute/exec/hash_join.h b/cpp/src/arrow/compute/exec/hash_join.h -index 12455f0c6..10819fb9c 100644 ---- a/cpp/src/arrow/compute/exec/hash_join.h -+++ b/cpp/src/arrow/compute/exec/hash_join.h -@@ -27,7 +27,7 @@ - #include "arrow/result.h" - #include "arrow/status.h" - #include "arrow/type.h" --#include "arrow/util/tracing_internal.h" -+#include "arrow/util/tracing.h" - - namespace arrow { - namespace compute { -diff --git a/cpp/src/arrow/compute/exec/hash_join_node.cc b/cpp/src/arrow/compute/exec/hash_join_node.cc -index 0282e387c..c9e2c2929 100644 ---- a/cpp/src/arrow/compute/exec/hash_join_node.cc -+++ b/cpp/src/arrow/compute/exec/hash_join_node.cc -@@ -27,6 +27,7 @@ - #include "arrow/util/future.h" - #include "arrow/util/make_unique.h" - #include "arrow/util/thread_pool.h" -+#include "arrow/util/tracing_internal.h" - - namespace arrow { - -diff --git a/cpp/src/arrow/compute/function.cc b/cpp/src/arrow/compute/function.cc -index 1c18243f5..a4fd510d2 100644 ---- a/cpp/src/arrow/compute/function.cc -+++ b/cpp/src/arrow/compute/function.cc -@@ -215,6 +215,7 @@ Result Function::Execute(const std::vector& args, - } - - util::tracing::Span span; -+ - START_COMPUTE_SPAN(span, name(), - {{"function.name", name()}, - {"function.options", options ? options->ToString() : ""}, -diff --git a/cpp/src/arrow/compute/light_array_test.cc b/cpp/src/arrow/compute/light_array_test.cc -index 3f6d47803..dcc7841a0 100644 ---- a/cpp/src/arrow/compute/light_array_test.cc -+++ b/cpp/src/arrow/compute/light_array_test.cc -@@ -18,6 +18,7 @@ - #include "arrow/compute/light_array.h" - - #include -+#include - - #include "arrow/compute/exec/test_util.h" - #include "arrow/testing/generator.h" -diff --git a/cpp/src/arrow/util/tracing.cc b/cpp/src/arrow/util/tracing.cc -index b8bddcd50..8bf21f688 100644 ---- a/cpp/src/arrow/util/tracing.cc -+++ b/cpp/src/arrow/util/tracing.cc -@@ -16,30 +16,28 @@ - // under the License. - - #include "arrow/util/tracing.h" -+ -+#include "arrow/util/config.h" - #include "arrow/util/make_unique.h" - #include "arrow/util/tracing_internal.h" - - namespace arrow { -+ -+using internal::make_unique; - namespace util { - namespace tracing { - - #ifdef ARROW_WITH_OPENTELEMETRY - --Span::Impl& Span::Set(const Impl& impl) { -- inner_impl.reset(new Impl(impl)); -- return *inner_impl; --} -+Span::Span() noexcept { details = make_unique<::arrow::internal::tracing::SpanImpl>(); } - --Span::Impl& Span::Set(Impl&& impl) { -- inner_impl.reset(new Impl(std::move(impl))); -- return *inner_impl; -+#else -+ -+Span::Span() noexcept { /* details is left a nullptr */ - } - - #endif - --// Default destructor when impl type is complete. --Span::~Span() = default; -- - } // namespace tracing - } // namespace util - } // namespace arrow -diff --git a/cpp/src/arrow/util/tracing.h b/cpp/src/arrow/util/tracing.h -index 15f7fca1e..c6968219b 100644 ---- a/cpp/src/arrow/util/tracing.h -+++ b/cpp/src/arrow/util/tracing.h -@@ -19,49 +19,21 @@ - - #include - --#include "arrow/util/logging.h" -+#include "arrow/util/visibility.h" - - namespace arrow { -- --namespace internal { --namespace tracing { -- --// Forward declaration SpanImpl. --class SpanImpl; -- --} // namespace tracing --} // namespace internal -- - namespace util { - namespace tracing { - --class ARROW_EXPORT Span { -+class ARROW_EXPORT SpanDetails { - public: -- using Impl = arrow::internal::tracing::SpanImpl; -- -- Span() = default; // Default constructor. The inner_impl is a nullptr. -- ~Span(); // Destructor. Default destructor defined in tracing.cc where impl is a -- // complete type. -- -- Impl& Set(const Impl&); -- Impl& Set(Impl&&); -- -- const Impl& Get() const { -- ARROW_CHECK(inner_impl) -- << "Attempted to dereference a null pointer. Use Span::Set before " -- "dereferencing."; -- return *inner_impl; -- } -- -- Impl& Get() { -- ARROW_CHECK(inner_impl) -- << "Attempted to dereference a null pointer. Use Span::Set before " -- "dereferencing."; -- return *inner_impl; -- } -+ virtual ~SpanDetails() {} -+}; - -- private: -- std::unique_ptr inner_impl; -+class ARROW_EXPORT Span { -+ public: -+ Span() noexcept; -+ std::unique_ptr details; - }; - - } // namespace tracing -diff --git a/cpp/src/arrow/util/tracing_internal.cc b/cpp/src/arrow/util/tracing_internal.cc -index 904a1fd76..668a2aaba 100644 ---- a/cpp/src/arrow/util/tracing_internal.cc -+++ b/cpp/src/arrow/util/tracing_internal.cc -@@ -202,14 +202,38 @@ opentelemetry::trace::Tracer* GetTracer() { - return tracer.get(); - } - --#ifdef ARROW_WITH_OPENTELEMETRY -+opentelemetry::nostd::shared_ptr& UnwrapSpan( -+ ::arrow::util::tracing::SpanDetails* span) { -+ SpanImpl* span_impl = checked_cast(span); -+ ARROW_CHECK(span_impl->ot_span) -+ << "Attempted to dereference a null pointer. Use Span::Set before " -+ "dereferencing."; -+ return span_impl->ot_span; -+} -+ -+const opentelemetry::nostd::shared_ptr& UnwrapSpan( -+ const ::arrow::util::tracing::SpanDetails* span) { -+ const SpanImpl* span_impl = checked_cast(span); -+ ARROW_CHECK(span_impl->ot_span) -+ << "Attempted to dereference a null pointer. Use Span::Set before " -+ "dereferencing."; -+ return span_impl->ot_span; -+} -+ -+opentelemetry::nostd::shared_ptr& RewrapSpan( -+ ::arrow::util::tracing::SpanDetails* span, -+ opentelemetry::nostd::shared_ptr ot_span) { -+ SpanImpl* span_impl = checked_cast(span); -+ span_impl->ot_span = std::move(ot_span); -+ return span_impl->ot_span; -+} -+ - opentelemetry::trace::StartSpanOptions SpanOptionsWithParent( - const util::tracing::Span& parent_span) { - opentelemetry::trace::StartSpanOptions options; -- options.parent = parent_span.Get().span->GetContext(); -+ options.parent = UnwrapSpan(parent_span.details.get())->GetContext(); - return options; - } --#endif - - } // namespace tracing - } // namespace internal -diff --git a/cpp/src/arrow/util/tracing_internal.h b/cpp/src/arrow/util/tracing_internal.h -index d0d6062e6..2898fd245 100644 ---- a/cpp/src/arrow/util/tracing_internal.h -+++ b/cpp/src/arrow/util/tracing_internal.h -@@ -106,48 +106,63 @@ AsyncGenerator PropagateSpanThroughAsyncGenerator(AsyncGenerator wrapped) - return PropagateSpanThroughAsyncGenerator(std::move(wrapped), std::move(span)); - } - --class SpanImpl { -+class SpanImpl : public ::arrow::util::tracing::SpanDetails { - public: -- opentelemetry::nostd::shared_ptr span; -+ ~SpanImpl() override = default; -+ opentelemetry::nostd::shared_ptr ot_span; - }; - -+opentelemetry::nostd::shared_ptr& UnwrapSpan( -+ ::arrow::util::tracing::SpanDetails* span); -+ -+const opentelemetry::nostd::shared_ptr& UnwrapSpan( -+ const ::arrow::util::tracing::SpanDetails* span); -+ -+opentelemetry::nostd::shared_ptr& RewrapSpan( -+ ::arrow::util::tracing::SpanDetails* span, -+ opentelemetry::nostd::shared_ptr ot_span); -+ - opentelemetry::trace::StartSpanOptions SpanOptionsWithParent( - const util::tracing::Span& parent_span); - --#define START_SPAN(target_span, ...) \ -- auto opentelemetry_scope##__LINE__ = \ -- ::arrow::internal::tracing::GetTracer()->WithActiveSpan( \ -- target_span \ -- .Set(::arrow::util::tracing::Span::Impl{ \ -- ::arrow::internal::tracing::GetTracer()->StartSpan(__VA_ARGS__)}) \ -- .span) -- --#define START_SPAN_WITH_PARENT(target_span, parent_span, ...) \ -- auto opentelemetry_scope##__LINE__ = \ -- ::arrow::internal::tracing::GetTracer()->WithActiveSpan( \ -- target_span \ -- .Set(::arrow::util::tracing::Span::Impl{ \ -- ::arrow::internal::tracing::GetTracer()->StartSpan( \ -- __VA_ARGS__, \ -- ::arrow::internal::tracing::SpanOptionsWithParent(parent_span))}) \ -- .span) -- --#define START_COMPUTE_SPAN(target_span, ...) \ -- START_SPAN(target_span, __VA_ARGS__); \ -- target_span.Get().span->SetAttribute( \ -- "arrow.memory_pool_bytes", ::arrow::default_memory_pool()->bytes_allocated()) -+#define START_SPAN(target_span, ...) \ -+ auto opentelemetry_scope##__LINE__ = \ -+ ::arrow::internal::tracing::GetTracer()->WithActiveSpan( \ -+ ::arrow::internal::tracing::RewrapSpan( \ -+ target_span.details.get(), \ -+ ::arrow::internal::tracing::GetTracer()->StartSpan(__VA_ARGS__))) -+ -+#define START_SPAN_WITH_PARENT(target_span, parent_span, ...) \ -+ auto opentelemetry_scope##__LINE__ = \ -+ ::arrow::internal::tracing::GetTracer()->WithActiveSpan( \ -+ ::arrow::internal::tracing::RewrapSpan( \ -+ target_span.details.get(), \ -+ \ -+ ::arrow::internal::tracing::GetTracer()->StartSpan( \ -+ __VA_ARGS__, \ -+ ::arrow::internal::tracing::SpanOptionsWithParent(parent_span)))) -+ -+#define START_COMPUTE_SPAN(target_span, ...) \ -+ START_SPAN(target_span, __VA_ARGS__); \ -+ ::arrow::internal::tracing::UnwrapSpan(target_span.details.get()) \ -+ ->SetAttribute("arrow.memory_pool_bytes", \ -+ ::arrow::default_memory_pool()->bytes_allocated()) - - #define START_COMPUTE_SPAN_WITH_PARENT(target_span, parent_span, ...) \ - START_SPAN_WITH_PARENT(target_span, parent_span, __VA_ARGS__); \ -- target_span.Get().span->SetAttribute( \ -- "arrow.memory_pool_bytes", ::arrow::default_memory_pool()->bytes_allocated()) -+ ::arrow::internal::tracing::UnwrapSpan(target_span.details.get()) \ -+ ->SetAttribute("arrow.memory_pool_bytes", \ -+ ::arrow::default_memory_pool()->bytes_allocated()) - --#define EVENT(target_span, ...) target_span.Get().span->AddEvent(__VA_ARGS__) -+#define EVENT(target_span, ...) \ -+ ::arrow::internal::tracing::UnwrapSpan(target_span.details.get())->AddEvent(__VA_ARGS__) - --#define MARK_SPAN(target_span, status) \ -- ::arrow::internal::tracing::MarkSpan(status, target_span.Get().span.get()) -+#define MARK_SPAN(target_span, status) \ -+ ::arrow::internal::tracing::MarkSpan( \ -+ status, ::arrow::internal::tracing::UnwrapSpan(target_span.details.get()).get()) - --#define END_SPAN(target_span) target_span.Get().span->End() -+#define END_SPAN(target_span) \ -+ ::arrow::internal::tracing::UnwrapSpan(target_span.details.get())->End() - - #define END_SPAN_ON_FUTURE_COMPLETION(target_span, target_future, target_capture) \ - target_future = target_future.Then( \ --- -2.45.0 - diff --git a/recipes/arrow/all/test_v1_package/CMakeLists.txt b/recipes/arrow/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 2a9b48732268c..0000000000000 --- a/recipes/arrow/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -cmake_minimum_required(VERSION 3.1) - -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ - ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/arrow/all/test_v1_package/conanfile.py b/recipes/arrow/all/test_v1_package/conanfile.py deleted file mode 100644 index 5a05af3c2dfd2..0000000000000 --- a/recipes/arrow/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,18 +0,0 @@ -from conans import ConanFile, CMake -from conan.tools.build import cross_building -import os - - -class TestPackageV1Conan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) diff --git a/recipes/arrow/config.yml b/recipes/arrow/config.yml index 6d012719cd8e2..f6c89a526f319 100644 --- a/recipes/arrow/config.yml +++ b/recipes/arrow/config.yml @@ -1,33 +1,11 @@ versions: + "18.0.0": + folder: all "17.0.0": folder: all "16.1.0": folder: all - "16.0.0": - folder: all "15.0.0": folder: all "14.0.2": - folder: all - "14.0.1": - folder: all - "14.0.0": - folder: all - "13.0.0": - folder: all - "12.0.1": - folder: all - "12.0.0": - folder: all - "11.0.0": - folder: all - "10.0.1": - folder: all - "10.0.0": - folder: all - "8.0.1": - folder: all - "8.0.0": - folder: all - "7.0.0": - folder: all + folder: all \ No newline at end of file