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 diff --git a/cpp/cmake/thirdparty/get_arrow.cmake b/cpp/cmake/thirdparty/get_arrow.cmake index 70283efbd79..e9d2f479088 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}