mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
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 <igor.fedotov@croit.io>
This commit is contained in:
parent
a67aa9b005
commit
679f93818a
@ -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)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user