From 1e3d2b53cfeeff4bac2f384c6445b65eb9e8396f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 3 May 2022 12:22:05 +0800 Subject: [PATCH] cmake: link daemons against ${ALLOC_LIBS} to enable them to use the specified allocators Fixes: https://tracker.ceph.com/issues/55519 Signed-off-by: Kefu Chai --- src/CMakeLists.txt | 8 ++++++-- src/mgr/CMakeLists.txt | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 563f08513150e..61a8616d5a773 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -616,8 +616,10 @@ add_executable(ceph-mon ${ceph_mon_srcs} $) add_dependencies(ceph-mon erasure_code_plugins) target_link_libraries(ceph-mon mon os global-static ceph-common + ${ALLOC_LIBS} ${EXTRALIBS} - ${CMAKE_DL_LIBS} ${GSSAPI_LIBRARIES}) + ${CMAKE_DL_LIBS} + ${GSSAPI_LIBRARIES}) install(TARGETS ceph-mon DESTINATION bin) # OSD/ObjectStore @@ -645,6 +647,7 @@ set(ceph_osd_srcs add_executable(ceph-osd ${ceph_osd_srcs}) add_dependencies(ceph-osd erasure_code_plugins) target_link_libraries(ceph-osd osd os global-static common + ${ALLOC_LIBS} ${BLKID_LIBRARIES}) if(WITH_FUSE) target_link_libraries(ceph-osd FUSE::FUSE) @@ -662,7 +665,8 @@ if (WITH_CEPHFS) ceph_mds.cc) add_executable(ceph-mds ${ceph_mds_srcs}) target_link_libraries(ceph-mds mds ${CMAKE_DL_LIBS} global-static ceph-common - Boost::thread) + Boost::thread + ${ALLOC_LIBS}) install(TARGETS ceph-mds DESTINATION bin) endif() diff --git a/src/mgr/CMakeLists.txt b/src/mgr/CMakeLists.txt index b11c40c42bc92..f9ec04317f4be 100644 --- a/src/mgr/CMakeLists.txt +++ b/src/mgr/CMakeLists.txt @@ -44,7 +44,10 @@ if(WITH_MGR) osdc client heap_profiler global-static ceph-common Boost::python${MGR_PYTHON_VERSION_MAJOR}${MGR_PYTHON_VERSION_MINOR} - Python3::Python ${CMAKE_DL_LIBS} ${GSSAPI_LIBRARIES}) + Python3::Python + ${ALLOC_LIBS} + ${CMAKE_DL_LIBS} + ${GSSAPI_LIBRARIES}) set_target_properties(ceph-mgr PROPERTIES POSITION_INDEPENDENT_CODE ${EXE_LINKER_USE_PIE}) install(TARGETS ceph-mgr DESTINATION bin) -- 2.39.5