From 49f40d2e14ebc4d790aef6be46c8ff9e514d5243 Mon Sep 17 00:00:00 2001 From: Tero Kauppinen Date: Thu, 15 May 2025 13:47:48 +0300 Subject: [PATCH] There is an issue in building the bundled c-ares on certain distributions such as SLES. The cmake file for c-ares sets 'CARES_LIB' destination directory to '${CARES_SRC}/lib' but when the bundled c-ares is compiled it produces a binary which is placed in the '${CARES_SRC}/lib64' directory. This is due to the fact that the bundled c-ares expands ${CMAKE_INSTALL_LIBDIR} to 'lib64' and not to 'lib' which is expected by 'CARES_LIB'. The fix is to enforce the building process of the bundled c-ares to place the produced binary in 'lib'. Signed-off-by: Tero Kauppinen --- cmake/modules/cares.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/modules/cares.cmake b/cmake/modules/cares.cmake index ed4c0090..61b219ad 100644 --- a/cmake/modules/cares.cmake +++ b/cmake/modules/cares.cmake @@ -47,6 +47,7 @@ else() BUILD_IN_SOURCE 1 CMAKE_ARGS -DCMAKE_POLICY_DEFAULT_CMP0091:STRING=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=${CMAKE_MSVC_RUNTIME_LIBRARY} + -DCMAKE_INSTALL_LIBDIR=lib -DCARES_SHARED=${BUILD_SHARED_LIBS} -DCARES_STATIC=${CARES_STATIC_OPTION} -DCARES_STATIC_PIC=${ENABLE_PIC}