From 5331c2ed102f18ee2c5fc9b9adee29243e340418 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Sat, 30 Aug 2025 00:40:24 -0700 Subject: [PATCH] cmake/modules/Builduadk.cmake: fix build DESTDIR should not be set when building. Fixes: https://tracker.ceph.com/issues/72722 Signed-off-by: Dan Mick (cherry picked from commit 1c14d3cd5319f219d72c05a5e6ff745a564b7235) (cherry picked from commit 0bf12fa387c8fbc7730fbc33fd031d1dae3f2d78) --- cmake/modules/Builduadk.cmake | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cmake/modules/Builduadk.cmake b/cmake/modules/Builduadk.cmake index bab18e7a0902f..0a8a85026d222 100644 --- a/cmake/modules/Builduadk.cmake +++ b/cmake/modules/Builduadk.cmake @@ -8,6 +8,13 @@ function(build_uadk) set(configure_cmd env ./configure --prefix=${UADK_INSTALL_DIR}) list(APPEND configure_cmd --with-pic --enable-static --disable-shared --with-static_drv) + # command prefix to unset DESTDIR; otherwise debhelper and + # CMake fight about installation directories, and since + # everything here stays in the source tree, packaging + # is not necessary + + set(UNSET_DESTDIR /usr/bin/env --unset=DESTDIR) + include(ExternalProject) ExternalProject_Add(uadk_ext UPDATE_COMMAND "" # this disables rebuild on each run @@ -17,10 +24,10 @@ function(build_uadk) SOURCE_DIR "${PROJECT_SOURCE_DIR}/src/uadk" BUILD_IN_SOURCE 1 CMAKE_ARGS -DCMAKE_CXX_COMPILER=which g++ - CONFIGURE_COMMAND ./autogen.sh COMMAND ${configure_cmd} - BUILD_COMMAND make + CONFIGURE_COMMAND ${UNSET_DESTDIR} ./autogen.sh COMMAND ${configure_cmd} + BUILD_COMMAND ${UNSET_DESTDIR} make BUILD_BYPRODUCTS ${UADK_WD_LIBRARY} ${UADK_WD_COMP_LIBRARY} ${UADK_WD_ZIP_LIBRARY} - INSTALL_COMMAND make install + INSTALL_COMMAND ${UNSET_DESTDIR} make install LOG_CONFIGURE ON LOG_BUILD ON LOG_INSTALL ON -- 2.39.5