From: Kefu Chai Date: Wed, 4 Mar 2026 07:37:17 +0000 (+0800) Subject: cmake/cephfs: link correct Boost libraries for cephfs tools X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1c898b6092ba8d95e6e4756c9a65d4341f7b99ef;p=ceph.git cmake/cephfs: link correct Boost libraries for cephfs tools The cephfs tools link uring::uring unconditionally, but the uring::uring CMake target only exists when WITH_LIBURING=ON. This breaks the build when WITH_LIBURING=OFF. These tools don't use Boost.Asio for file I/O, so they don't need io_uring support. Now that the previous commit scopes BOOST_ASIO_HAS_IO_URING to the Boost::asio target, fix each tool to link the correct libraries: - cephfs-journal-tool, cephfs-table-tool, cephfs-data-scan: replace uring::uring with Boost::boost. These tools use Boost.Asio and Boost.Process (header-only libraries) via ProgressTracker.cc, but do not need io_uring support, so Boost::boost is the correct target to express that dependency. They also link Boost::filesystem because Boost.Process v1 depends on Boost.Filesystem for path operations (e.g. search_path()). - cephfs-meta-injection: simply remove uring::uring. This tool does not use Boost.Asio or Boost.Process, so it needs neither uring::uring nor Boost::boost. Signed-off-by: Kefu Chai --- diff --git a/src/tools/cephfs/CMakeLists.txt b/src/tools/cephfs/CMakeLists.txt index 147fc8d11b8..ea36a1645ec 100644 --- a/src/tools/cephfs/CMakeLists.txt +++ b/src/tools/cephfs/CMakeLists.txt @@ -12,7 +12,7 @@ set(cephfs_journal_tool_srcs add_executable(cephfs-journal-tool ${cephfs_journal_tool_srcs}) target_link_libraries(cephfs-journal-tool legacy-option-headers - ceph-common librados mds osdc global uring::uring + ceph-common librados mds osdc global Boost::boost ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} Boost::filesystem) set(cephfs-meta-injection_srcs @@ -23,7 +23,7 @@ set(cephfs-meta-injection_srcs add_executable(cephfs-meta-injection ${cephfs-meta-injection_srcs}) target_link_libraries(cephfs-meta-injection legacy-option-headers - ceph-common librados mds osdc global uring::uring + ceph-common librados mds osdc global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}) set(cephfs_table_tool_srcs @@ -33,7 +33,7 @@ set(cephfs_table_tool_srcs RoleSelector.cc MDSUtility.cc) add_executable(cephfs-table-tool ${cephfs_table_tool_srcs}) -target_link_libraries(cephfs-table-tool ceph-common librados mds osdc global uring::uring +target_link_libraries(cephfs-table-tool ceph-common librados mds osdc global Boost::boost ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} Boost::filesystem) set(cephfs_data_scan_srcs @@ -44,7 +44,7 @@ set(cephfs_data_scan_srcs PgFiles.cc MDSUtility.cc) add_executable(cephfs-data-scan ${cephfs_data_scan_srcs}) -target_link_libraries(cephfs-data-scan ceph-common librados cephfs mds osdc global uring::uring +target_link_libraries(cephfs-data-scan ceph-common librados cephfs mds osdc global Boost::boost cls_cephfs_client ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} Boost::filesystem)