From 8a3130e96e6f206c8c14f3cbeb831ba03f1b1b52 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Fri, 10 May 2024 10:47:39 -0400 Subject: [PATCH 1/3] Ensure that our static CI builds also use a static arrow --- ci/configure_cpp_static.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/configure_cpp_static.sh b/ci/configure_cpp_static.sh index d1f9e0d1399..11d5585d98f 100755 --- a/ci/configure_cpp_static.sh +++ b/ci/configure_cpp_static.sh @@ -18,4 +18,4 @@ rapids-dependency-file-generator \ python -m pip install -r "${REQUIREMENTS_FILE}" pyenv rehash -cmake -S cpp -B build_static -GNinja -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF +cmake -S cpp -B build_static -GNinja -DBUILD_SHARED_LIBS=OFF -DCUDF_USE_ARROW_STATIC=ON -DBUILD_TESTS=OFF From 124a9853103e9f3afb59bdc373d8d70a960a3bcd Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Fri, 10 May 2024 12:52:24 -0400 Subject: [PATCH 2/3] Ensure that arrow_static doesn't incorrectly export OBJECT dependencies --- cpp/cmake/thirdparty/get_arrow.cmake | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/cpp/cmake/thirdparty/get_arrow.cmake b/cpp/cmake/thirdparty/get_arrow.cmake index 70283efbd79..b88ed24eec4 100644 --- a/cpp/cmake/thirdparty/get_arrow.cmake +++ b/cpp/cmake/thirdparty/get_arrow.cmake @@ -303,7 +303,20 @@ function(find_and_configure_arrow VERSION BUILD_STATIC ENABLE_S3 ENABLE_ORC ENAB " ) endif() - + rapids_cmake_install_lib_dir(lib_dir) + if(TARGET arrow_static) + get_target_property(interface_libs arrow_static INTERFACE_LINK_LIBRARIES) + # The `arrow_static` library is leaking a dependency on the object libraries it was built with + # we need to remove this from the interface, since keeping them around would cause duplicate + # symbols and CMake export errors + if(interface_libs MATCHES "arrow_array" AND interface_libs MATCHES "arrow_compute") + string(REPLACE "BUILD_INTERFACE:" "BUILD_LOCAL_INTERFACE:" interface_libs + "${interface_libs}" + ) + set_target_properties(arrow_static PROPERTIES INTERFACE_LINK_LIBRARIES "${interface_libs}") + get_target_property(interface_libs arrow_static INTERFACE_LINK_LIBRARIES) + endif() + endif() rapids_export( BUILD Arrow VERSION ${VERSION} @@ -390,14 +403,11 @@ function(find_and_configure_arrow VERSION BUILD_STATIC ENABLE_S3 ENABLE_ORC ENAB BUILD Arrow [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-exports ) rapids_export_find_package_root( - BUILD Parquet [=[${CMAKE_CURRENT_LIST_DIR}]=] - EXPORT_SET cudf-exports - CONDITION ENABLE_PARQUET + BUILD Parquet [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-exports CONDITION ENABLE_PARQUET ) rapids_export_find_package_root( - BUILD ArrowDataset [=[${CMAKE_CURRENT_LIST_DIR}]=] - EXPORT_SET cudf-exports - CONDITION ENABLE_PARQUET + BUILD ArrowDataset [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-exports CONDITION + ENABLE_PARQUET ) set(ARROW_LIBRARIES From 4e475cce49cddddd5dae6a861acb61a9b7310473 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Fri, 10 May 2024 13:01:11 -0400 Subject: [PATCH 3/3] Correct issues found by style check --- cpp/cmake/thirdparty/get_arrow.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cpp/cmake/thirdparty/get_arrow.cmake b/cpp/cmake/thirdparty/get_arrow.cmake index b88ed24eec4..e9d2f479088 100644 --- a/cpp/cmake/thirdparty/get_arrow.cmake +++ b/cpp/cmake/thirdparty/get_arrow.cmake @@ -403,11 +403,14 @@ function(find_and_configure_arrow VERSION BUILD_STATIC ENABLE_S3 ENABLE_ORC ENAB BUILD Arrow [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-exports ) rapids_export_find_package_root( - BUILD Parquet [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-exports CONDITION ENABLE_PARQUET + BUILD Parquet [=[${CMAKE_CURRENT_LIST_DIR}]=] + EXPORT_SET cudf-exports + CONDITION ENABLE_PARQUET ) rapids_export_find_package_root( - BUILD ArrowDataset [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET cudf-exports CONDITION - ENABLE_PARQUET + BUILD ArrowDataset [=[${CMAKE_CURRENT_LIST_DIR}]=] + EXPORT_SET cudf-exports + CONDITION ENABLE_PARQUET ) set(ARROW_LIBRARIES