]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: remove Boost::system linkage for boost 1.89+ 66801/head
authorKefu Chai <tchaikov@gmail.com>
Wed, 24 Dec 2025 03:35:18 +0000 (11:35 +0800)
committerKefu Chai <k.chai@proxmox.com>
Tue, 13 Jan 2026 06:04:38 +0000 (14:04 +0800)
In boost 1.89, the stub compiled library for Boost.System was removed.
According to the boost 1.89 release notes: "The stub compiled library
has been removed; System has been header-only since release 1.69.",
See https://www.boost.org/releases/1.89.0/ .

This change removes or replaces Boost::system linkage throughout the
codebase:

1. Removed "system" from BOOST_COMPONENTS in the root CMakeLists.txt,
   as the library no longer exists in boost 1.89+.

2. Where Boost::system was the only linked boost library, replaced it
   with Boost::boost (the header-only meta-target) to maintain access
   to Boost.System's header-only functionality.

3. Where other boost libraries were already linked (e.g., Boost::thread,
   Boost::regex, Boost::filesystem), removed Boost::system entirely, as
   the header-only System library dependency is automatically satisfied
   by other boost components.

This is not a breaking change since the minimum required boost version
for this project is 1.87, where Boost.System was already header-only
(only the stub compiled library remained for compatibility).

Signed-off-by: Kefu Chai <kchai@redhat.com>
CMakeLists.txt
src/CMakeLists.txt
src/test/common/CMakeLists.txt
src/test/lazy-omap-stats/CMakeLists.txt
src/test/mon/CMakeLists.txt
src/test/neorados/CMakeLists.txt

index abb0e725ff8814f212681cb5b735d643cda284d5..0e0cb08a27a9480660ee35557ab99846a63b8ccd 100644 (file)
@@ -741,7 +741,7 @@ option(WITH_SYSTEM_BOOST "require and build with system Boost" OFF)
 
 # Boost::thread depends on Boost::atomic, so list it explicitly.
 set(BOOST_COMPONENTS
-  atomic chrono thread system regex random program_options date_time
+  atomic chrono headers thread regex random program_options date_time
   iostreams context coroutine url)
 set(BOOST_HEADER_COMPONENTS container)
 
index 7a4a8acc5df0d28aa323d665045c59cd86edba92..871d0aee18c77133383290ed32296d6c0cbe641b 100644 (file)
@@ -588,7 +588,6 @@ set(ceph_common_deps
   common_utf8 extblkdev arch crc32
   ${LIB_RESOLV}
   Boost::thread
-  Boost::system
   Boost::random
   Boost::program_options
   Boost::date_time
index 50ebf9166c123d062356b57f44639535bb84fa39..c2190d7e9813edf5ef39864d9a789acda4372669 100644 (file)
@@ -379,44 +379,44 @@ add_ceph_unittest(unittest_hobject)
 
 add_executable(unittest_async_completion test_async_completion.cc)
 add_ceph_unittest(unittest_async_completion)
-target_link_libraries(unittest_async_completion ceph-common Boost::system)
+target_link_libraries(unittest_async_completion ceph-common Boost::headers)
 
 
 add_executable(unittest_async_max_concurrent_for_each test_async_max_concurrent_for_each.cc)
 add_ceph_unittest(unittest_async_max_concurrent_for_each)
-target_link_libraries(unittest_async_max_concurrent_for_each ceph-common Boost::system Boost::context)
+target_link_libraries(unittest_async_max_concurrent_for_each ceph-common Boost::boost Boost::context)
 
 if(NOT WIN32)
 add_executable(unittest_async_co_spawn_group test_async_co_spawn_group.cc)
 add_ceph_unittest(unittest_async_co_spawn_group)
-target_link_libraries(unittest_async_co_spawn_group ceph-common Boost::system)
+target_link_libraries(unittest_async_co_spawn_group ceph-common Boost::boost)
 
 add_executable(unittest_async_co_throttle test_async_co_throttle.cc)
 add_ceph_unittest(unittest_async_co_throttle)
-target_link_libraries(unittest_async_co_throttle ceph-common Boost::system)
+target_link_libraries(unittest_async_co_throttle ceph-common Boost::boost)
 endif(NOT WIN32)
 
 add_executable(unittest_async_shared_mutex test_async_shared_mutex.cc)
 add_ceph_unittest(unittest_async_shared_mutex)
-target_link_libraries(unittest_async_shared_mutex ceph-common Boost::system)
+target_link_libraries(unittest_async_shared_mutex ceph-common Boost::boost)
 
 
 add_executable(unittest_async_spawn_throttle test_async_spawn_throttle.cc)
 add_ceph_unittest(unittest_async_spawn_throttle)
-target_link_libraries(unittest_async_spawn_throttle ceph-common Boost::system Boost::context)
+target_link_libraries(unittest_async_spawn_throttle ceph-common Boost::boost Boost::context)
 
 add_executable(unittest_async_yield_waiter test_async_yield_waiter.cc)
 add_ceph_unittest(unittest_async_yield_waiter)
-target_link_libraries(unittest_async_yield_waiter ceph-common Boost::system Boost::context)
+target_link_libraries(unittest_async_yield_waiter ceph-common Boost::boost Boost::context)
 
 
 add_executable(unittest_async_parallel_for_each test_async_parallel_for_each.cc)
 add_ceph_unittest(unittest_async_parallel_for_each)
-target_link_libraries(unittest_async_parallel_for_each ceph-common Boost::system)
+target_link_libraries(unittest_async_parallel_for_each ceph-common Boost::boost)
 
 add_executable(unittest_async_spawn_group test_async_spawn_group.cc)
 add_ceph_unittest(unittest_async_spawn_group)
-target_link_libraries(unittest_async_spawn_group ceph-common Boost::system)
+target_link_libraries(unittest_async_spawn_group ceph-common Boost::boost)
 
 add_executable(unittest_cdc test_cdc.cc
   $<TARGET_OBJECTS:unit-main>)
@@ -437,7 +437,7 @@ add_ceph_unittest(unittest_fault_injector)
 
 add_executable(unittest_blocked_completion test_blocked_completion.cc)
 add_ceph_unittest(unittest_blocked_completion)
-target_link_libraries(unittest_blocked_completion Boost::system GTest::GTest)
+target_link_libraries(unittest_blocked_completion Boost::boost GTest::GTest)
 
 add_executable(unittest_allocate_unique test_allocate_unique.cc)
 add_ceph_unittest(unittest_allocate_unique)
@@ -492,14 +492,14 @@ set_tests_properties(unittest_decode_start_v_checker_expect_failure
 endif(0)
 
 add_executable(unittest_async_call test_async_call.cc)
-target_link_libraries(unittest_async_call ceph-common Boost::system
+target_link_libraries(unittest_async_call ceph-common Boost::boost
   GTest::GTest)
 add_ceph_unittest(unittest_async_call)
 
 
 add_executable(unittest_librados_completion test_librados_completion.cc)
 target_link_libraries(unittest_librados_completion librados ceph-common
-  Boost::system GTest::GTest)
+  Boost::boost GTest::GTest)
 add_ceph_unittest(unittest_librados_completion)
 
 add_executable(unittest_async_cond test_async_cond.cc)
index 2143a092f27e82ddd9e732d8aeee7c3a8e8216dd..93ddc03a248cd10d50fdde599a8d1fbddfcff10e 100644 (file)
@@ -4,7 +4,7 @@ add_executable(ceph_test_lazy_omap_stats
   main.cc
   lazy_omap_stats_test.cc)
 target_link_libraries(ceph_test_lazy_omap_stats
-  librados Boost::system Boost::regex ceph-common ${UNITTEST_LIBS})
+  librados Boost::regex ceph-common ${UNITTEST_LIBS})
 install(TARGETS
   ceph_test_lazy_omap_stats
   DESTINATION ${CMAKE_INSTALL_BINDIR})
index 8c271407e9828e20d8ae78304e78bf4a22e6723b..5601ca4b890fefb34c96516f02eef6fb041679ed 100644 (file)
@@ -57,7 +57,7 @@ target_link_libraries(unittest_mon_montypes mon global)
 # ceph_test_mon_memory_target
 add_executable(ceph_test_mon_memory_target
   test_mon_memory_target.cc)
-target_link_libraries(ceph_test_mon_memory_target Boost::system Threads::Threads)
+target_link_libraries(ceph_test_mon_memory_target Boost::boost Threads::Threads)
 set_target_properties(ceph_test_mon_memory_target PROPERTIES
   SKIP_RPATH TRUE
   INSTALL_RPATH "")
index 968ef609cdca7d546ff9696c7b859a3b65698c76..f5f63e18b1c6a436ce415604cade396a492c9070 100644 (file)
@@ -11,7 +11,7 @@ target_link_libraries(ceph_test_neorados_start_stop global libneorados
   ${unittest_libs})
 
 add_executable(ceph_test_neorados_completions completions.cc)
-target_link_libraries(ceph_test_neorados_completions Boost::system pthread
+target_link_libraries(ceph_test_neorados_completions Boost::boost pthread
   ${unittest_libs})
 
 add_executable(ceph_test_neorados_op_speed op_speed.cc)