Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arrow: fix recipe when arrow/*:parquet=True #24044

Merged
merged 21 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 67 additions & 6 deletions recipes/arrow/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,85 @@
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"
patch_description: "use cci package"
patch_type: "conan"
"16.1.0":
- patch_file: "patches/16.0.0-0001-fix-cmake.patch"
patch_description: "use cci package"
patch_type: "conan"
"16.0.0":
- patch_file: "patches/16.0.0-0001-fix-cmake.patch"
patch_description: "use cci package"
patch_type: "conan"
"15.0.0":
- patch_file: "patches/11.0.0-0001-fix-cmake.patch"
patch_description: "use cci package"
patch_type: "conan"
"14.0.2":
- 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-0005-install-utils.patch"
- 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-0006-fix-cmake.patch"
- 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"

Check warning on line 107 in recipes/arrow/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. found arbitrary text in patch_type: backport ^ (line: 107)
patch_source: "https://github.com/apache/arrow/pull/13108"
"8.0.0":
- patch_file: "patches/8.0.0-0005-install-utils.patch"
- 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-0006-fix-cmake.patch"
- 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"

Check warning on line 121 in recipes/arrow/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. found arbitrary text in patch_type: backport ^ (line: 121)
patch_source: "https://github.com/apache/arrow/pull/13108"
"7.0.0":
- patch_file: "patches/7.0.0-0006-install-utils.patch"
- 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-0007-fix-cmake.patch"
- patch_file: "patches/7.0.0-0003-fix-cmake.patch"
patch_description: "use cci package"
patch_type: "conan"
18 changes: 11 additions & 7 deletions recipes/arrow/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ArrowConan(ConanFile):
"shared": False,
"fPIC": True,
"gandiva": False,
"parquet": False,
"parquet": True,
"skyhook": False,
"substrait": False,
"acero": False,
Expand All @@ -87,7 +87,7 @@ class ArrowConan(ConanFile):
"simd_level": "default",
"runtime_simd_level": "max",
"with_backtrace": False,
"with_boost": False,
"with_boost": True,
"with_brotli": False,
"with_bz2": False,
"with_csv": False,
Expand All @@ -101,7 +101,7 @@ class ArrowConan(ConanFile):
"with_glog": False,
"with_grpc": False,
"with_json": False,
"with_thrift": False,
"with_thrift": True,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a good reason to have this set to true? Is this just for testing the changes n the CI? We could then revert it now

Copy link
Contributor Author

@robomics robomics Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! with_thrift needs to be True in order to build Arrow with Parquet support (which is now enabled by default based on #24044 (comment)).

"with_llvm": False,
"with_openssl": False,
"with_opentelemetry": False,
Expand Down Expand Up @@ -162,7 +162,7 @@ def _requires_rapidjson(self):

def requirements(self):
if self.options.with_thrift:
self.requires("thrift/0.17.0")
self.requires("thrift/0.20.0")
if self.options.with_protobuf:
self.requires("protobuf/3.21.12")
if self.options.with_jemalloc:
Expand Down Expand Up @@ -202,12 +202,15 @@ def requirements(self):
if self.options.with_snappy:
self.requires("snappy/1.1.9")
if self.options.get_safe("simd_level") != None or \
self.options.get_safe("runtime_simd_level") != None:
self.requires("xsimd/9.0.1")
self.options.get_safe("runtime_simd_level") != None:
if Version(self.version) < 8:
self.requires("xsimd/9.0.1")
else:
self.requires("xsimd/13.0.0")
if self.options.with_zlib:
self.requires("zlib/[>=1.2.11 <2]")
if self.options.with_zstd:
self.requires("zstd/1.5.5")
self.requires("zstd/[>=1.5 <1.6]")
if self.options.with_re2:
self.requires("re2/20230301")
if self.options.with_utf8proc:
Expand Down Expand Up @@ -318,6 +321,7 @@ def generate(self):
tc.variables["GLOG_SOURCE"] = "SYSTEM"
tc.variables["ARROW_WITH_BACKTRACE"] = bool(self.options.with_backtrace)
tc.variables["ARROW_WITH_BROTLI"] = bool(self.options.with_brotli)
tc.variables["ARROW_WITH_RE2"] = bool(self.options.with_re2)
tc.variables["brotli_SOURCE"] = "SYSTEM"
if self.options.with_brotli:
tc.variables["ARROW_BROTLI_USE_SHARED"] = bool(self.dependencies["brotli"].options.shared)
Expand Down
42 changes: 42 additions & 0 deletions recipes/arrow/all/patches/11.0.0-0001-fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
diff --git a/cpp/cmake_modules/FindThriftAlt.cmake b/cpp/cmake_modules/FindThriftAlt.cmake
index f3e49021d..95177c2a6 100644
--- a/cpp/cmake_modules/FindThriftAlt.cmake
+++ b/cpp/cmake_modules/FindThriftAlt.cmake
@@ -45,22 +45,21 @@ endif()
# * https://github.com/apache/thrift/pull/2725
perseoGI marked this conversation as resolved.
Show resolved Hide resolved
# * 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)
62 changes: 62 additions & 0 deletions recipes/arrow/all/patches/16.0.0-0001-fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
diff --git a/cpp/cmake_modules/FindThriftAlt.cmake b/cpp/cmake_modules/FindThriftAlt.cmake
index f3e49021d..3e63f1edf 100644
--- a/cpp/cmake_modules/FindThriftAlt.cmake
+++ b/cpp/cmake_modules/FindThriftAlt.cmake
@@ -45,23 +45,23 @@ 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)
if(ThriftAlt_INCLUDE_DIR)
diff --git a/cpp/src/parquet/CMakeLists.txt b/cpp/src/parquet/CMakeLists.txt
index 93f2e72d8..e00f73f7d 100644
--- a/cpp/src/parquet/CMakeLists.txt
+++ b/cpp/src/parquet/CMakeLists.txt
@@ -262,11 +262,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)
robomics marked this conversation as resolved.
Show resolved Hide resolved

# 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()
17 changes: 17 additions & 0 deletions recipes/arrow/all/patches/7.0.0-0001-static-analyzers.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/cpp/src/arrow/ipc/CMakeLists.txt b/cpp/src/arrow/ipc/CMakeLists.txt
index 495018e..f6cee6f 100644
index 495018ec0..f6cee6fde 100644
--- a/cpp/src/arrow/ipc/CMakeLists.txt
+++ b/cpp/src/arrow/ipc/CMakeLists.txt
@@ -61,8 +61,12 @@ endif()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 2d7baf1..dff5b1a 100644
index 9e0d4c0b2..1189a2957 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -699,7 +699,7 @@ endif()
@@ -695,7 +695,7 @@ endif()

if(ARROW_WITH_BROTLI)
# Order is important for static linking
Expand All @@ -11,7 +11,7 @@ index 2d7baf1..dff5b1a 100644
list(APPEND ARROW_LINK_LIBS ${ARROW_BROTLI_LIBS})
list(APPEND ARROW_STATIC_LINK_LIBS ${ARROW_BROTLI_LIBS})
if(Brotli_SOURCE STREQUAL "SYSTEM")
@@ -715,10 +715,17 @@ if(ARROW_WITH_BZ2)
@@ -711,10 +711,17 @@ if(ARROW_WITH_BZ2)
endif()

if(ARROW_WITH_LZ4)
Expand All @@ -33,7 +33,7 @@ index 2d7baf1..dff5b1a 100644
endif()

if(ARROW_WITH_SNAPPY)
@@ -907,8 +914,13 @@ endif()
@@ -903,8 +910,13 @@ endif()

if(ARROW_MIMALLOC)
add_definitions(-DARROW_MIMALLOC)
Expand All @@ -50,7 +50,7 @@ index 2d7baf1..dff5b1a 100644

# ----------------------------------------------------------------------
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index bc38952..62bf314 100644
index bc389521b..62bf3144b 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -954,7 +954,7 @@ endif()
Expand Down Expand Up @@ -298,7 +298,7 @@ index bc38952..62bf314 100644
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 b984bc1..2c78cd9 100644
index b984bc104..2c78cd9ec 100644
--- a/cpp/src/arrow/CMakeLists.txt
+++ b/cpp/src/arrow/CMakeLists.txt
@@ -323,10 +323,14 @@ set(ARROW_TESTING_SRCS
Expand All @@ -319,7 +319,7 @@ index b984bc1..2c78cd9 100644

if(_allocator_dependencies)
diff --git a/cpp/src/arrow/flight/CMakeLists.txt b/cpp/src/arrow/flight/CMakeLists.txt
index 2cf8c99..90ebb9a 100644
index 2cf8c9913..90ebb9ac3 100644
--- a/cpp/src/arrow/flight/CMakeLists.txt
+++ b/cpp/src/arrow/flight/CMakeLists.txt
@@ -17,6 +17,9 @@
Expand All @@ -333,7 +333,7 @@ index 2cf8c99..90ebb9a 100644

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 2dcfb01..0394c01 100644
index cf8bf64b2..cf8966b22 100644
--- a/cpp/src/arrow/memory_pool.cc
+++ b/cpp/src/arrow/memory_pool.cc
@@ -48,7 +48,7 @@
Expand Down
17 changes: 17 additions & 0 deletions recipes/arrow/all/patches/8.0.0-0001-static-analyzers.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index aba18c8..bb463d0 100644
index 5eec4ea72..301f0074c 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -721,7 +721,7 @@ if(ARROW_WITH_BZ2)
@@ -717,7 +717,7 @@ if(ARROW_WITH_BZ2)
perseoGI marked this conversation as resolved.
Show resolved Hide resolved
endif()

if(ARROW_WITH_LZ4)
Expand All @@ -11,7 +11,7 @@ index aba18c8..bb463d0 100644
if(Lz4_SOURCE STREQUAL "SYSTEM")
list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4)
endif()
@@ -907,8 +907,8 @@ endif()
@@ -903,8 +903,8 @@ endif()
if(ARROW_JEMALLOC)
add_definitions(-DARROW_JEMALLOC)
add_definitions(-DARROW_JEMALLOC_INCLUDE_DIR=${JEMALLOC_INCLUDE_DIR})
Expand All @@ -23,7 +23,7 @@ index aba18c8..bb463d0 100644

if(ARROW_MIMALLOC)
diff --git a/cpp/src/arrow/ipc/CMakeLists.txt b/cpp/src/arrow/ipc/CMakeLists.txt
index 495018e..3dcb35d 100644
index 495018ec0..3dcb35d04 100644
--- a/cpp/src/arrow/ipc/CMakeLists.txt
+++ b/cpp/src/arrow/ipc/CMakeLists.txt
@@ -61,9 +61,13 @@ endif()
Expand Down
Loading
Loading