]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake/cephfs: link correct Boost libraries for cephfs tools 67619/head
authorKefu Chai <k.chai@proxmox.com>
Wed, 4 Mar 2026 07:37:17 +0000 (15:37 +0800)
committerKefu Chai <k.chai@proxmox.com>
Thu, 5 Mar 2026 06:33:54 +0000 (14:33 +0800)
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 <k.chai@proxmox.com>
src/tools/cephfs/CMakeLists.txt

index 147fc8d11b86771477928eb08f872f87f08e2371..ea36a1645eca23e10068d01ccb26b00575937271 100644 (file)
@@ -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)