From cf73237985dacb301788b4eed61115aedaf0c958 Mon Sep 17 00:00:00 2001 From: Yibo Cai Date: Sun, 10 Apr 2022 20:12:59 +0800 Subject: [PATCH 1/4] ARROW-16183: [C++][FlightRPC] Support bundled UCX --- cpp/cmake_modules/FindUcx.cmake | 25 +++++ cpp/cmake_modules/ThirdpartyToolchain.cmake | 92 +++++++++++++++++++ .../arrow/flight/transport/ucx/CMakeLists.txt | 10 +- cpp/thirdparty/versions.txt | 3 + 4 files changed, 122 insertions(+), 8 deletions(-) create mode 100644 cpp/cmake_modules/FindUcx.cmake diff --git a/cpp/cmake_modules/FindUcx.cmake b/cpp/cmake_modules/FindUcx.cmake new file mode 100644 index 00000000000..242f61fc9bc --- /dev/null +++ b/cpp/cmake_modules/FindUcx.cmake @@ -0,0 +1,25 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +find_package(PkgConfig QUIET) +pkg_check_modules(Ucx IMPORTED_TARGET ucx) +if(Ucx_FOUND) + add_library(ucx::ucx INTERFACE IMPORTED) + set_property(TARGET ucx::ucx PROPERTY INTERFACE_INCLUDE_DIRECTORIES + "${Ucx_INCLUDE_DIRS}") + set_property(TARGET ucx::ucx PROPERTY INTERFACE_LINK_LIBRARIES PkgConfig::Ucx) +endif() diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 32669b2c072..bc3e2aac083 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -72,6 +72,7 @@ set(ARROW_THIRDPARTY_DEPENDENCIES Snappy Substrait Thrift + Ucx utf8proc xsimd ZLIB @@ -173,6 +174,8 @@ macro(build_dependency DEPENDENCY_NAME) build_substrait() elseif("${DEPENDENCY_NAME}" STREQUAL "Thrift") build_thrift() + elseif("${DEPENDENCY_NAME}" STREQUAL "Ucx") + build_ucx() elseif("${DEPENDENCY_NAME}" STREQUAL "utf8proc") build_utf8proc() elseif("${DEPENDENCY_NAME}" STREQUAL "xsimd") @@ -653,6 +656,13 @@ else() "${THIRDPARTY_MIRROR_URL}/thrift-${ARROW_THRIFT_BUILD_VERSION}.tar.gz") endif() +if(DEFINED ENV{ARROW_UCX_URL}) + set(ARROW_UCX_SOURCE_URL "$ENV{ARROW_UCX_URL}") +else() + set_urls(ARROW_UCX_SOURCE_URL + "https://github.com/openucx/ucx/archive/v${ARROW_UCX_BUILD_VERSION}.tar.gz") +endif() + if(DEFINED ENV{ARROW_UTF8PROC_URL}) set(ARROW_UTF8PROC_SOURCE_URL "$ENV{ARROW_UTF8PROC_URL}") else() @@ -4545,6 +4555,88 @@ if(ARROW_S3) endif() endif() +# ---------------------------------------------------------------------- +# ucx - communication framework for modern, high-bandwidth and low-latency networks + +macro(build_ucx) + message(STATUS "Building UCX from source") + + set(UCX_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/ucx_ep-install") + + # link with static ucx libraries leads to test failures, use shared libs instead + set(UCX_SHARED_LIB_UCP "${UCX_PREFIX}/lib/libucp${CMAKE_SHARED_LIBRARY_SUFFIX}") + set(UCX_SHARED_LIB_UCT "${UCX_PREFIX}/lib/libuct${CMAKE_SHARED_LIBRARY_SUFFIX}") + set(UCX_SHARED_LIB_UCS "${UCX_PREFIX}/lib/libucs${CMAKE_SHARED_LIBRARY_SUFFIX}") + set(UCX_SHARED_LIB_UCM "${UCX_PREFIX}/lib/libucm${CMAKE_SHARED_LIBRARY_SUFFIX}") + + set(UCX_CONFIGURE_COMMAND ./autogen.sh COMMAND ./configure) + list(APPEND + UCX_CONFIGURE_COMMAND + "CC=${CMAKE_C_COMPILER}" + "CXX=${CMAKE_CXX_COMPILER}" + "CFLAGS=${EP_C_FLAGS}" + "CXXFLAGS=${EP_CXX_FLAGS}" + "--prefix=${UCX_PREFIX}" + "--enable-mt" + "--enable-shared") + if(${UPPERCASE_BUILD_TYPE} STREQUAL "DEBUG") + list(APPEND + UCX_CONFIGURE_COMMAND + "--enable-profiling" + "--enable-frame-pointer" + "--enable-stats" + "--enable-fault-injection" + "--enable-debug-data") + else() + list(APPEND + UCX_CONFIGURE_COMMAND + "--disable-logging" + "--disable-debug" + "--disable-assertions" + "--disable-params-check") + endif() + set(UCX_BUILD_COMMAND ${MAKE} ${MAKE_BUILD_ARGS}) + externalproject_add(ucx_ep + ${EP_LOG_OPTIONS} + URL ${ARROW_UCX_SOURCE_URL} + URL_HASH "SHA256=${ARROW_UCX_BUILD_SHA256_CHECKSUM}" + CONFIGURE_COMMAND ${UCX_CONFIGURE_COMMAND} + BUILD_IN_SOURCE 1 + BUILD_COMMAND ${UCX_BUILD_COMMAND} + BUILD_BYPRODUCTS "${UCX_SHARED_LIB_UCP}" "${UCX_SHARED_LIB_UCT}" + "${UCX_SHARED_LIB_UCS}" "${UCX_SHARED_LIB_UCM}" + INSTALL_COMMAND ${MAKE} install) + + add_library(ucx::ucp SHARED IMPORTED) + set_target_properties(ucx::ucp PROPERTIES IMPORTED_LOCATION "${UCX_SHARED_LIB_UCP}") + add_library(ucx::uct SHARED IMPORTED) + set_target_properties(ucx::uct PROPERTIES IMPORTED_LOCATION "${UCX_SHARED_LIB_UCT}") + add_library(ucx::ucs SHARED IMPORTED) + set_target_properties(ucx::ucs PROPERTIES IMPORTED_LOCATION "${UCX_SHARED_LIB_UCS}") + add_library(ucx::ucm SHARED IMPORTED) + set_target_properties(ucx::ucm PROPERTIES IMPORTED_LOCATION "${UCX_SHARED_LIB_UCM}") + + add_dependencies(toolchain ucx_ep) + add_dependencies(ucx::ucp ucx_ep) + add_dependencies(ucx::uct ucx_ep) + add_dependencies(ucx::ucs ucx_ep) + add_dependencies(ucx::ucm ucx_ep) + + add_library(ucx::ucx INTERFACE IMPORTED) + set_property(TARGET ucx::ucx PROPERTY INTERFACE_INCLUDE_DIRECTORIES + "${UCX_PREFIX}/include") + set_property(TARGET ucx::ucx + PROPERTY INTERFACE_LINK_LIBRARIES + ucx::ucp + ucx::uct + ucx::ucs + ucx::ucm) +endmacro() + +if(ARROW_WITH_UCX) + resolve_dependency(Ucx PC_PACKAGE_NAMES ucx) +endif() + message(STATUS "All bundled static libraries: ${ARROW_BUNDLED_STATIC_LIBS}") # Write out the package configurations. diff --git a/cpp/src/arrow/flight/transport/ucx/CMakeLists.txt b/cpp/src/arrow/flight/transport/ucx/CMakeLists.txt index 8e28c105b4f..71392ec0af4 100644 --- a/cpp/src/arrow/flight/transport/ucx/CMakeLists.txt +++ b/cpp/src/arrow/flight/transport/ucx/CMakeLists.txt @@ -18,18 +18,12 @@ add_custom_target(arrow_flight_transport_ucx) arrow_install_all_headers("arrow/flight/transport/ucx") -find_package(PkgConfig REQUIRED) -pkg_check_modules(UCX REQUIRED IMPORTED_TARGET ucx) - set(ARROW_FLIGHT_TRANSPORT_UCX_SRCS ucx_client.cc ucx_server.cc ucx.cc ucx_internal.cc util_internal.cc) -set(ARROW_FLIGHT_TRANSPORT_UCX_LINK_LIBS) - -list(APPEND ARROW_FLIGHT_TRANSPORT_UCX_LINK_LIBS PkgConfig::UCX) add_arrow_lib(arrow_flight_transport_ucx # CMAKE_PACKAGE_NAME @@ -46,11 +40,11 @@ add_arrow_lib(arrow_flight_transport_ucx SHARED_LINK_LIBS arrow_shared arrow_flight_shared - ${ARROW_FLIGHT_TRANSPORT_UCX_LINK_LIBS} + ucx::ucx STATIC_LINK_LIBS arrow_static arrow_flight_static - ${ARROW_FLIGHT_TRANSPORT_UCX_LINK_LIBS}) + ucx::ucx) if(ARROW_BUILD_TESTS) if(ARROW_FLIGHT_TEST_LINKAGE STREQUAL "static") diff --git a/cpp/thirdparty/versions.txt b/cpp/thirdparty/versions.txt index 7acecd1a530..3aa3ebe90ff 100644 --- a/cpp/thirdparty/versions.txt +++ b/cpp/thirdparty/versions.txt @@ -91,6 +91,8 @@ ARROW_SUBSTRAIT_BUILD_VERSION=e1b4c04a ARROW_SUBSTRAIT_BUILD_SHA256_CHECKSUM=65f83e5f5d979ede5fc8ac9f8bbaf793e0c72d9c415f1a162ba522f6d0bb5bbe ARROW_THRIFT_BUILD_VERSION=0.13.0 ARROW_THRIFT_BUILD_SHA256_CHECKSUM=7ad348b88033af46ce49148097afe354d513c1fca7c607b59c33ebb6064b5179 +ARROW_UCX_BUILD_VERSION=1.12.1 +ARROW_UCX_BUILD_SHA256_CHECKSUM=9bef31aed0e28bf1973d28d74d9ac4f8926c43ca3b7010bd22a084e164e31b71 ARROW_UTF8PROC_BUILD_VERSION=v2.7.0 ARROW_UTF8PROC_BUILD_SHA256_CHECKSUM=4bb121e297293c0fd55f08f83afab6d35d48f0af4ecc07523ad8ec99aa2b12a1 ARROW_XSIMD_BUILD_VERSION=7d1778c3b38d63db7cec7145d939f40bc5d859d1 @@ -134,6 +136,7 @@ DEPENDENCIES=( "ARROW_RE2_URL re2-${ARROW_RE2_BUILD_VERSION}.tar.gz https://github.com/google/re2/archive/${ARROW_RE2_BUILD_VERSION}.tar.gz" "ARROW_SNAPPY_URL snappy-${ARROW_SNAPPY_BUILD_VERSION}.tar.gz https://github.com/google/snappy/archive/${ARROW_SNAPPY_BUILD_VERSION}.tar.gz" "ARROW_THRIFT_URL thrift-${ARROW_THRIFT_BUILD_VERSION}.tar.gz https://archive.apache.org/dist/thrift/${ARROW_THRIFT_BUILD_VERSION}/thrift-${ARROW_THRIFT_BUILD_VERSION}.tar.gz" + "ARROW_UCX_URL ucx-${ARROW_UCX_BUILD_VERSION}.tar.gz https://github.com/openucx/ucx/archive/v${ARROW_UCX_BUILD_VERSION}.tar.gz" "ARROW_UTF8PROC_URL utf8proc-${ARROW_UTF8PROC_BUILD_VERSION}.tar.gz https://github.com/JuliaStrings/utf8proc/archive/${ARROW_UTF8PROC_BUILD_VERSION}.tar.gz" "ARROW_XSIMD_URL xsimd-${ARROW_XSIMD_BUILD_VERSION}.tar.gz https://github.com/xtensor-stack/xsimd/archive/${ARROW_XSIMD_BUILD_VERSION}.tar.gz" "ARROW_ZLIB_URL zlib-${ARROW_ZLIB_BUILD_VERSION}.tar.gz https://zlib.net/fossils/zlib-${ARROW_ZLIB_BUILD_VERSION}.tar.gz" From 5f24aa25b105e2b55dfe467c6bbc845a3176526d Mon Sep 17 00:00:00 2001 From: Yibo Cai Date: Mon, 18 Apr 2022 03:01:55 +0000 Subject: [PATCH 2/4] address review comments --- LICENSE.txt | 43 +++++++++++++++++++++ cpp/cmake_modules/FindUcx.cmake | 25 ------------ cpp/cmake_modules/ThirdpartyToolchain.cmake | 27 ++++++------- 3 files changed, 54 insertions(+), 41 deletions(-) delete mode 100644 cpp/cmake_modules/FindUcx.cmake diff --git a/LICENSE.txt b/LICENSE.txt index ec00d3a7293..dd3cec0d5d9 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -2280,3 +2280,46 @@ 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. + +-------------------------------------------------------------------------------- + +3rdparty dependency UCX is redistributed as a dynamically linked shared +library in certain binary distributions. UCX has the following license: + +Copyright (c) 2014-2015 UT-Battelle, LLC. All rights reserved. +Copyright (C) 2014-2020 Mellanox Technologies Ltd. All rights reserved. +Copyright (C) 2014-2015 The University of Houston System. All rights reserved. +Copyright (C) 2015 The University of Tennessee and The University + of Tennessee Research Foundation. All rights reserved. +Copyright (C) 2016-2020 ARM Ltd. All rights reserved. +Copyright (c) 2016 Los Alamos National Security, LLC. All rights reserved. +Copyright (C) 2016-2020 Advanced Micro Devices, Inc. All rights reserved. +Copyright (C) 2019 UChicago Argonne, LLC. All rights reserved. +Copyright (c) 2018-2020 NVIDIA CORPORATION. All rights reserved. +Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. +Copyright (C) 2016-2020 Stony Brook University. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/cpp/cmake_modules/FindUcx.cmake b/cpp/cmake_modules/FindUcx.cmake deleted file mode 100644 index 242f61fc9bc..00000000000 --- a/cpp/cmake_modules/FindUcx.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -find_package(PkgConfig QUIET) -pkg_check_modules(Ucx IMPORTED_TARGET ucx) -if(Ucx_FOUND) - add_library(ucx::ucx INTERFACE IMPORTED) - set_property(TARGET ucx::ucx PROPERTY INTERFACE_INCLUDE_DIRECTORIES - "${Ucx_INCLUDE_DIRS}") - set_property(TARGET ucx::ucx PROPERTY INTERFACE_LINK_LIBRARIES PkgConfig::Ucx) -endif() diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index bc3e2aac083..f09c26ce9c1 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -72,7 +72,7 @@ set(ARROW_THIRDPARTY_DEPENDENCIES Snappy Substrait Thrift - Ucx + ucx utf8proc xsimd ZLIB @@ -174,7 +174,7 @@ macro(build_dependency DEPENDENCY_NAME) build_substrait() elseif("${DEPENDENCY_NAME}" STREQUAL "Thrift") build_thrift() - elseif("${DEPENDENCY_NAME}" STREQUAL "Ucx") + elseif("${DEPENDENCY_NAME}" STREQUAL "ucx") build_ucx() elseif("${DEPENDENCY_NAME}" STREQUAL "utf8proc") build_utf8proc() @@ -4607,34 +4607,29 @@ macro(build_ucx) "${UCX_SHARED_LIB_UCS}" "${UCX_SHARED_LIB_UCM}" INSTALL_COMMAND ${MAKE} install) + # ucx cmake module sets UCX_INCLUDE_DIRS + set(UCX_INCLUDE_DIRS "${UCX_PREFIX}/include") + add_library(ucx::ucp SHARED IMPORTED) set_target_properties(ucx::ucp PROPERTIES IMPORTED_LOCATION "${UCX_SHARED_LIB_UCP}") add_library(ucx::uct SHARED IMPORTED) set_target_properties(ucx::uct PROPERTIES IMPORTED_LOCATION "${UCX_SHARED_LIB_UCT}") add_library(ucx::ucs SHARED IMPORTED) set_target_properties(ucx::ucs PROPERTIES IMPORTED_LOCATION "${UCX_SHARED_LIB_UCS}") - add_library(ucx::ucm SHARED IMPORTED) - set_target_properties(ucx::ucm PROPERTIES IMPORTED_LOCATION "${UCX_SHARED_LIB_UCM}") add_dependencies(toolchain ucx_ep) add_dependencies(ucx::ucp ucx_ep) add_dependencies(ucx::uct ucx_ep) add_dependencies(ucx::ucs ucx_ep) - add_dependencies(ucx::ucm ucx_ep) - - add_library(ucx::ucx INTERFACE IMPORTED) - set_property(TARGET ucx::ucx PROPERTY INTERFACE_INCLUDE_DIRECTORIES - "${UCX_PREFIX}/include") - set_property(TARGET ucx::ucx - PROPERTY INTERFACE_LINK_LIBRARIES - ucx::ucp - ucx::uct - ucx::ucs - ucx::ucm) endmacro() if(ARROW_WITH_UCX) - resolve_dependency(Ucx PC_PACKAGE_NAMES ucx) + resolve_dependency(ucx PC_PACKAGE_NAMES ucx) + add_library(ucx::ucx INTERFACE IMPORTED) + set_property(TARGET ucx::ucx PROPERTY INTERFACE_INCLUDE_DIRECTORIES + "${UCX_INCLUDE_DIRS}") + set_property(TARGET ucx::ucx PROPERTY INTERFACE_LINK_LIBRARIES ucx::ucp ucx::uct + ucx::ucs) endif() message(STATUS "All bundled static libraries: ${ARROW_BUNDLED_STATIC_LIBS}") From 27444060384a7d8a5189b609e352d19c753aae10 Mon Sep 17 00:00:00 2001 From: Yibo Cai Date: Mon, 18 Apr 2022 06:58:52 +0000 Subject: [PATCH 3/4] use target_include_directories, target_link_libraries --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index f09c26ce9c1..8bd4fc473f7 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -4626,10 +4626,8 @@ endmacro() if(ARROW_WITH_UCX) resolve_dependency(ucx PC_PACKAGE_NAMES ucx) add_library(ucx::ucx INTERFACE IMPORTED) - set_property(TARGET ucx::ucx PROPERTY INTERFACE_INCLUDE_DIRECTORIES - "${UCX_INCLUDE_DIRS}") - set_property(TARGET ucx::ucx PROPERTY INTERFACE_LINK_LIBRARIES ucx::ucp ucx::uct - ucx::ucs) + target_include_directories(ucx::ucx INTERFACE "${UCX_INCLUDE_DIRS}") + target_link_libraries(ucx::ucx INTERFACE ucx::ucp ucx::uct ucx::ucs) endif() message(STATUS "All bundled static libraries: ${ARROW_BUNDLED_STATIC_LIBS}") From edf43c418740e8428953a17d208e5ca9977bb9f2 Mon Sep 17 00:00:00 2001 From: Yibo Cai Date: Thu, 12 May 2022 02:31:14 +0000 Subject: [PATCH 4/4] rebase to master --- cpp/CMakeLists.txt | 5 +++++ cpp/cmake_modules/ThirdpartyToolchain.cmake | 1 + 2 files changed, 6 insertions(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 23e0ba311f3..eb97f3ad9d7 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -827,6 +827,11 @@ if(ARROW_USE_XSIMD) list(APPEND ARROW_STATIC_LINK_LIBS xsimd) endif() +if(ARROW_WITH_UCX) + list(APPEND ARROW_LINK_LIBS ucx::ucx) + list(APPEND ARROW_STATIC_LINK_LIBS ucx::ucx) +endif() + add_custom_target(arrow_dependencies) add_custom_target(arrow_benchmark_dependencies) add_custom_target(arrow_test_dependencies) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 8bd4fc473f7..e8fcf337522 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -4609,6 +4609,7 @@ macro(build_ucx) # ucx cmake module sets UCX_INCLUDE_DIRS set(UCX_INCLUDE_DIRS "${UCX_PREFIX}/include") + file(MAKE_DIRECTORY "${UCX_INCLUDE_DIRS}") add_library(ucx::ucp SHARED IMPORTED) set_target_properties(ucx::ucp PROPERTIES IMPORTED_LOCATION "${UCX_SHARED_LIB_UCP}")