From: Igor Fedotov Date: Wed, 15 Apr 2026 21:35:13 +0000 (+0300) Subject: cmake/isal-l: explicitly configure libdir to avoid wrong libisal.a X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F68404%2Fhead;p=ceph.git cmake/isal-l: explicitly configure libdir to avoid wrong libisal.a location. This is to fix the following libec_isa.si build error : FAILED: lib/libec_isa.so : && /usr/bin/g++-14 -fPIC -O3 -DNDEBUG -Wl,--dependency-file=src/erasure-code/isa/CMakeFiles/ec_isa.dir/link.d -shared -Wl,-soname,libec_isa.so -o lib/libec_isa.so src/erasure-code/CMakeFiles/erasure_code_objs.dir/ErasureCode.cc.o src/erasure-code/isa/CMakeFiles/ec_isa.dir/ErasureCodeIsa.cc.o src/erasure-code/isa/CMakeFiles/ec_isa.dir/ErasureCodeIsaTableCache.cc.o src/erasure-code/isa/CMakeFiles/ec_isa.dir/ErasureCodePluginIsa.cc.o src/isa-l/install/lib/libisal.a -ldl /usr/lib64/librt.a -lresolv -Wl,--as-needed -latomic && : /usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: cannot find src/isa-l/install/lib/libisal.a: No such file or directory collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. It looks like [under some circumstances?] the building procedure puts resulting .a under src/isa-l/install/lib64 path which causes lookup error .so linkage. This patch enforces lib64 usage. Signed-off-by: Igor Fedotov --- diff --git a/cmake/modules/BuildISAL.cmake b/cmake/modules/BuildISAL.cmake index fa1476cabf89..a3c29db4f6b3 100644 --- a/cmake/modules/BuildISAL.cmake +++ b/cmake/modules/BuildISAL.cmake @@ -3,13 +3,14 @@ function(build_isal) set(isal_BINARY_DIR ${CMAKE_BINARY_DIR}/src/isa-l) set(isal_INSTALL_DIR ${isal_BINARY_DIR}/install) set(isal_INCLUDE_DIR "${isal_INSTALL_DIR}/include") - set(isal_LIBRARY "${isal_INSTALL_DIR}/lib/libisal.a") + set(isal_LIBRARY_DIR "${isal_INSTALL_DIR}/lib") + set(isal_LIBRARY "${isal_LIBRARY_DIR}/libisal.a") # this include directory won't exist until the install step, but the # imported targets need it early for INTERFACE_INCLUDE_DIRECTORIES file(MAKE_DIRECTORY "${isal_INCLUDE_DIR}") - set(configure_cmd env CC=${CMAKE_C_COMPILER} ./configure --prefix=${isal_INSTALL_DIR}) + set(configure_cmd env CC=${CMAKE_C_COMPILER} ./configure --prefix=${isal_INSTALL_DIR} --libdir=${isal_LIBRARY_DIR}) # build a static library with -fPIC that we can link into crypto/compressor plugins list(APPEND configure_cmd --with-pic --enable-static --disable-shared)