From 69737ddb50c07b620369f76020fd5138ad4342a3 Mon Sep 17 00:00:00 2001 From: Mohamad Gebai Date: Tue, 2 Oct 2018 12:13:56 -0400 Subject: [PATCH] osd: add required cls_* libraries as dependencies of osd The libcls_*.so libraries are runtime dependencies of the OSD (and RGW). Building the vstart target doesn't build these libraries, rendering some functionalities unusable. This goes unnoticed when building the entire source tree. Signed-off-by: Mohamad Gebai --- src/osd/CMakeLists.txt | 13 +++++++++++++ src/rgw/CMakeLists.txt | 4 ---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/osd/CMakeLists.txt b/src/osd/CMakeLists.txt index a4dcd6bd4291c..13b63bdce6b67 100644 --- a/src/osd/CMakeLists.txt +++ b/src/osd/CMakeLists.txt @@ -57,3 +57,16 @@ endif() if(WITH_OSD_INSTRUMENT_FUNCTIONS) add_dependencies(osd cyg_profile_tp) endif() + +# libcls_* are runtime dependencies +add_dependencies(osd cls_journal cls_hello cls_lock cls_log cls_numops + cls_refcount cls_timeindex cls_user cls_version cls_cas) +if(WITH_CEPHFS) + add_dependencies(osd cls_cephfs) +endif() +if(WITH_RBD) + add_dependencies(osd cls_rbd) +endif() +if(WITH_RADOSGW) + add_dependencies(osd cls_otp cls_rgw) +endif() diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt index d4e6100b01034..9f163fe4cfa4f 100644 --- a/src/rgw/CMakeLists.txt +++ b/src/rgw/CMakeLists.txt @@ -205,10 +205,6 @@ target_link_libraries(radosgw radosgw_a librados global ${FCGI_LIBRARY} ${LIB_RESOLV} ${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${BLKID_LIBRARIES} ${ALLOC_LIBS}) -# radosgw depends on cls libraries at runtime, but not as link dependencies -add_dependencies(radosgw cls_rgw cls_lock cls_refcount - cls_log cls_timeindex - cls_version cls_user cls_otp) install(TARGETS radosgw DESTINATION bin) set(radosgw_admin_srcs -- 2.39.5