commit: 7b14029c29900821f3907abcb12b2a0031e06b90 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Sat Feb 14 13:33:22 2026 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Thu Feb 19 00:24:00 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b14029c
sys-cluster/ceph: Fix build w/ boost-1.89 and boost-1.90 Cleanup system-boost conditional hacks. Closes: https://bugs.gentoo.org/969039 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> sys-cluster/ceph/ceph-20.1.1-r1.ebuild | 18 +- .../ceph/files/ceph-20.1.1-boost-1.89-1.patch | 187 +++++++++++ .../ceph/files/ceph-20.1.1-boost-1.89-2.patch | 82 +++++ .../ceph/files/ceph-20.1.1-boost-1.89-3.patch | 344 +++++++++++++++++++++ 4 files changed, 619 insertions(+), 12 deletions(-) diff --git a/sys-cluster/ceph/ceph-20.1.1-r1.ebuild b/sys-cluster/ceph/ceph-20.1.1-r1.ebuild index 3f93d81916df..ed1de5c8541d 100644 --- a/sys-cluster/ceph/ceph-20.1.1-r1.ebuild +++ b/sys-cluster/ceph/ceph-20.1.1-r1.ebuild @@ -3,6 +3,7 @@ EAPI=8 +CMAKE_REMOVE_MODULES_LIST=( FindBoost ) CMAKE_WARN_UNUSED_CLI=no # false positives unless all USE flags are on PYTHON_COMPAT=( python3_{10..13} ) LUA_COMPAT=( lua5-{3..4} ) @@ -228,6 +229,8 @@ PATCHES=( "${FILESDIR}/ceph-19.2.2-silent-unused-variable-warning.patch" "${FILESDIR}/ceph-19.2.2-src-mgr-make-enum-statically-castable.patch" "${FILESDIR}/ceph-20.1.0-nvmeof.patch" + # https://bugs.gentoo.org/969039 + "${FILESDIR}"/ceph-20.1.1-boost-1.89-{1,2,3}.patch ) check-reqs_export_vars() { @@ -255,21 +258,12 @@ pkg_setup() { } src_prepare() { - cmake_src_prepare - if use system-boost; then - if has_version '>=dev-libs/boost-1.88'; then - eapply "${FILESDIR}/ceph-19.2.2-boost188.patch" - eapply "${FILESDIR}/ceph-19.2.2-boost-linking.patch" - fi - find "${S}" -name '*.cmake' -or -name 'CMakeLists.txt' -print0 \ - | xargs --null sed -r \ - -e 's|Boost::|boost_|g' \ - -e 's|Boost_|boost_|g' \ - -e 's|[Bb]oost_boost|boost_system|g' \ - -i || die + rm -r src/boost || die # ensure use system boost, reduce QA spam fi + cmake_src_prepare + if ! use systemd; then find "${S}"/src/ceph-volume/ceph_volume -name '*.py' -print0 \ | xargs --null sed \ diff --git a/sys-cluster/ceph/files/ceph-20.1.1-boost-1.89-1.patch b/sys-cluster/ceph/files/ceph-20.1.1-boost-1.89-1.patch new file mode 100644 index 000000000000..bf7b1ec81212 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-20.1.1-boost-1.89-1.patch @@ -0,0 +1,187 @@ +From 2940938b8c059f683109ef8aa3bb098ac6f998b8 Mon Sep 17 00:00:00 2001 +From: Kefu Chai <[email protected]> +Date: Wed, 24 Dec 2025 11:35:18 +0800 +Subject: [PATCH] cmake: remove Boost::system linkage for boost 1.89+ + +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 <[email protected]> +--- + CMakeLists.txt | 2 +- + src/CMakeLists.txt | 1 - + src/test/common/CMakeLists.txt | 24 ++++++++++++------------ + src/test/lazy-omap-stats/CMakeLists.txt | 2 +- + src/test/mon/CMakeLists.txt | 2 +- + src/test/neorados/CMakeLists.txt | 2 +- + 6 files changed, 16 insertions(+), 17 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index abb0e725ff881..0e0cb08a27a94 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -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) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 7a4a8acc5df0d..871d0aee18c77 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -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 +diff --git a/src/test/common/CMakeLists.txt b/src/test/common/CMakeLists.txt +index 50ebf9166c123..c2190d7e9813e 100644 +--- a/src/test/common/CMakeLists.txt ++++ b/src/test/common/CMakeLists.txt +@@ -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) +diff --git a/src/test/lazy-omap-stats/CMakeLists.txt b/src/test/lazy-omap-stats/CMakeLists.txt +index 2143a092f27e8..93ddc03a248cd 100644 +--- a/src/test/lazy-omap-stats/CMakeLists.txt ++++ b/src/test/lazy-omap-stats/CMakeLists.txt +@@ -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}) +diff --git a/src/test/mon/CMakeLists.txt b/src/test/mon/CMakeLists.txt +index 8c271407e9828..5601ca4b890fe 100644 +--- a/src/test/mon/CMakeLists.txt ++++ b/src/test/mon/CMakeLists.txt +@@ -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 "") +diff --git a/src/test/neorados/CMakeLists.txt b/src/test/neorados/CMakeLists.txt +index 968ef609cdca7..f5f63e18b1c6a 100644 +--- a/src/test/neorados/CMakeLists.txt ++++ b/src/test/neorados/CMakeLists.txt +@@ -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) diff --git a/sys-cluster/ceph/files/ceph-20.1.1-boost-1.89-2.patch b/sys-cluster/ceph/files/ceph-20.1.1-boost-1.89-2.patch new file mode 100644 index 000000000000..fdbc3a33b366 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-20.1.1-boost-1.89-2.patch @@ -0,0 +1,82 @@ +From cbdd9c4b1f69d05e9b7fca903a5844b89bd44123 Mon Sep 17 00:00:00 2001 +From: Kefu Chai <[email protected]> +Date: Tue, 23 Dec 2025 22:44:10 +0800 +Subject: [PATCH] common: fix TrackedOp intrusive_ptr compatibility with boost + 1.89+ + +Boost 1.89+ includes a new header sp_cxx20_constexpr.hpp (Copyright 2025) +that defines BOOST_SP_CXX20_CONSTEXPR macro. When building with C++20/23 +mode and a compiler supporting constexpr dynamic allocation, this macro +expands to 'constexpr', making intrusive_ptr constructors and destructors +constexpr. + +This change breaks builds that previously worked with boost 1.87 because: + +In boost 1.87, the copy constructor was NOT constexpr: + intrusive_ptr(intrusive_ptr const & rhs): px( rhs.px ) + { + if( px != 0 ) intrusive_ptr_add_ref( px ); + } + +In boost 1.89+ with C++20/23, it becomes constexpr: + BOOST_SP_CXX20_CONSTEXPR intrusive_ptr(intrusive_ptr const & rhs): px( rhs.px ) + { + if( px != 0 ) intrusive_ptr_add_ref( px ); + } + +With constexpr, name lookup for intrusive_ptr_add_ref happens at compile +time during template instantiation, not at runtime. This changes the +lookup behavior significantly. + +The issue is the "hidden friend" pattern: friend functions defined inside +a class are in the enclosing (global) namespace, but per C++ standard +[basic.lookup.argdep], they are ONLY visible via ADL (Argument-Dependent +Lookup), not via ordinary unqualified lookup. + +When boost::intrusive_ptr's constexpr constructor tries to call +intrusive_ptr_add_ref(px) during template instantiation: +1. Ordinary unqualified lookup finds ceph::common::intrusive_ptr_add_ref +2. Since ordinary lookup succeeded, ADL is not performed [basic.lookup.argdep]/1 +3. The friend functions in TrackedOp are never considered +4. Compilation fails due to signature mismatch (TrackedOp* vs RefCountedObject*) + +In boost 1.87 (non-constexpr), ADL worked normally at runtime and found +the hidden friend functions. With constexpr in 1.89+, compile-time lookup +finds the wrong function before ADL can trigger. + +The fix adds forward declarations before boost::intrusive_ptr<TrackedOp> +is first used. This makes the functions visible to ordinary lookup (not +just ADL), allowing the compiler to find them instead of the ceph::common +versions. The friend functions provide the actual definitions. + +Note: Friend functions defined inside a class are already implicitly +inline per the C++ standard, so no explicit inline specifier is needed +on the friend function definitions. + +This issue manifests when building with: +- Boost 1.89+ (which introduced sp_cxx20_constexpr.hpp) +- C++23 standard mode +- Compiler with constexpr dynamic allocation support + +Fixes build errors like: + error: 'intrusive_ptr_add_ref' was not declared in this scope + +Signed-off-by: Kefu Chai <[email protected]> +--- + src/common/TrackedOp.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/common/TrackedOp.h b/src/common/TrackedOp.h +index a38d4d294d451..25eedf46dfbb0 100644 +--- a/src/common/TrackedOp.h ++++ b/src/common/TrackedOp.h +@@ -33,6 +33,9 @@ + + struct pow2_hist_t; + class TrackedOp; ++// Declare intrusive_ptr functions in global namespace for boost ADL ++inline void intrusive_ptr_add_ref(TrackedOp *o); ++inline void intrusive_ptr_release(TrackedOp *o); + class OpHistory; + + typedef boost::intrusive_ptr<TrackedOp> TrackedOpRef; diff --git a/sys-cluster/ceph/files/ceph-20.1.1-boost-1.89-3.patch b/sys-cluster/ceph/files/ceph-20.1.1-boost-1.89-3.patch new file mode 100644 index 000000000000..dbeb94a660a6 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-20.1.1-boost-1.89-3.patch @@ -0,0 +1,344 @@ +From eeed5bc3cd4224b995209f30c33d3afbb0e34364 Mon Sep 17 00:00:00 2001 +From: "Adam C. Emerson" <[email protected]> +Date: Wed, 14 Jan 2026 19:53:15 -0500 +Subject: [PATCH 1/5] dmclock: Integrate fully into Ceph project + +Setting the policy to allow it to use `BOOST_ROOT` causes a build +failure in make check on github, so just have it be part of the Ceph +project. + +* asturm 2026-02-14: Resolve simple conflict w/ 20.1.1 having lower minimum + required CMake version pre-469d82a1f387f342797636fdfff84f570b22f928 + +Signed-off-by: Adam C. Emerson <[email protected]> +--- + src/dmclock/CMakeLists.txt | 22 ---------------------- + src/dmclock/src/CMakeLists.txt | 4 ++-- + 2 files changed, 2 insertions(+), 24 deletions(-) + +diff --git a/src/dmclock/CMakeLists.txt b/src/dmclock/CMakeLists.txt +index 52742e846f8af..206e9e691fbc8 100644 +--- a/src/dmclock/CMakeLists.txt ++++ b/src/dmclock/CMakeLists.txt +@@ -1,30 +1,8 @@ +-cmake_minimum_required(VERSION 3.5.1) +- +-project(dmclock CXX) +- +-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules") +- +-if (NOT(BOOST_FOUND)) +- find_package(Boost REQUIRED) +-endif() +- +-find_package(Threads) +- +-if(CMAKE_CXX_STANDARD OR CMAKE_CXX_FLAGS MATCHES "-std=(c|gnu)\\+\\+") +- # use existing settings if available +-else() +- set(CMAKE_CXX_STANDARD 11) +- set(CMAKE_CXX_STANDARD_REQUIRED ON) +-endif() +- + add_subdirectory(src) + + # Determine if dmclock is built as a subproject (using add_subdirectory) + # or if it is the master project. + set(MASTER_PROJECT FALSE) +-if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) +- set(MASTER_PROJECT TRUE) +-endif() + + option(dmclock_TEST "Generate test targets" ${MASTER_PROJECT}) + if(dmclock_TEST) +diff --git a/src/dmclock/src/CMakeLists.txt b/src/dmclock/src/CMakeLists.txt +index d13229e402845..4d490ced0d782 100644 +--- a/src/dmclock/src/CMakeLists.txt ++++ b/src/dmclock/src/CMakeLists.txt +@@ -6,8 +6,8 @@ add_library(dmclock::dmclock ALIAS dmclock) + target_compile_options(dmclock PRIVATE + "-Wno-write-strings" "-Wall") + target_include_directories(dmclock PUBLIC +- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src> +- $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/support/src>) ++ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/dmclock/src> ++ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/dmclock/support/src>) + + target_link_libraries(dmclock + PUBLIC Boost::boost + +From 1dfe804c8410caf288e22b96e4e99c73869f21a0 Mon Sep 17 00:00:00 2001 +From: "Adam C. Emerson" <[email protected]> +Date: Wed, 14 Jan 2026 19:58:15 -0500 +Subject: [PATCH 2/5] build: Disable `FindBoost` for Boost's included cmake + config + +Boost has included this since 1.70 and CMake has deprecated the +non-config version since 3.30. + +See also +https://cmake.org/cmake/help/latest/policy/CMP0167.html#policy:CMP0167 + +We enable CMP0167 (The `FindBoost` module is removed.) to force cmake +to use the installed Boost configuration files rather than its own +detection. + +We also enable CMP0144 (`find_package()` uses upper-case +`<PACKAGENAME>_ROOT` variables.) to ensue that the `BOOST_ROOT` +parameter continues to function in the config-style `find_package`. + +`BuildBoost.cmake` is updated to add the `Boost::headers` interface +target to match configured system boost (retaining the Boost::boost +alias). + +* asturm 2026-02-14: Drop huge file removal to be done manually in ebuild: + cmake/modules/FindBoost.cmake | 2648 -------------------------------- + delete mode 100644 cmake/modules/FindBoost.cmake + +Signed-off-by: Adam C. Emerson <[email protected]> +--- + CMakeLists.txt | 6 +- + cmake/modules/BuildBoost.cmake | 16 +- + 3 files changed, 17 insertions(+), 2653 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0e0cb08a27a94..402b1d8cbb49b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,7 +4,11 @@ project(ceph + VERSION 20.0.0 + LANGUAGES CXX C ASM) + +-foreach(policy CMP0127 CMP0135 CMP0175) ++foreach(policy CMP0127 CMP0135 ++ CMP0144 # Ensure taking `BOOST_ROOT` keeps working. Otherwise, ++ # config-based `find_package` will take `Boost_ROOT`. ++ CMP0167 # Use Boost's own CMake config files instead of FindBoost module. ++ CMP0175) + if(POLICY ${policy}) + cmake_policy(SET ${policy} NEW) + endif() +diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake +index 470dd20a36fa0..4b80296f9dff8 100644 +--- a/cmake/modules/BuildBoost.cmake ++++ b/cmake/modules/BuildBoost.cmake +@@ -223,6 +223,9 @@ macro(build_boost version) + endif() + endforeach() + set(Boost_BUILD_COMPONENTS ${components}) ++ # Remove the `headers` from the list of components to build as ++ # `headers` is an interface only target we add later. ++ list(REMOVE_ITEM Boost_BUILD_COMPONENTS headers) + unset(components) + + foreach(c ${Boost_BUILD_COMPONENTS}) +@@ -278,13 +281,18 @@ macro(build_boost version) + endforeach() + + # for header-only libraries +- add_library(Boost::boost INTERFACE IMPORTED) +- set_target_properties(Boost::boost PROPERTIES ++ add_library(Boost::headers INTERFACE IMPORTED) ++ set_target_properties(Boost::headers PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}") +- add_dependencies(Boost::boost Boost) ++ add_dependencies(Boost::headers Boost) + find_package_handle_standard_args(Boost DEFAULT_MSG + Boost_INCLUDE_DIRS Boost_LIBRARIES) + mark_as_advanced(Boost_LIBRARIES BOOST_INCLUDE_DIRS) ++ ++ add_library(Boost::boost INTERFACE IMPORTED) ++ set_property(TARGET Boost::boost APPEND PROPERTY INTERFACE_LINK_LIBRARIES ++ Boost::headers) ++ + endmacro() + + function(maybe_add_boost_dep target) +@@ -298,7 +306,7 @@ function(maybe_add_boost_dep target) + get_filename_component(ext ${src} EXT) + # assuming all cxx source files include boost header(s) + if(ext MATCHES ".cc|.cpp|.cxx") +- add_dependencies(${target} Boost::boost) ++ add_dependencies(${target} Boost::headers) + return() + endif() + endforeach() + + From dce2c80dbd500deaaa3846e865e7ae75eb85a35a Mon Sep 17 00:00:00 2001 +From: "Adam C. Emerson" <[email protected]> +Date: Thu, 8 May 2025 14:34:54 -0400 +Subject: [PATCH 3/5] {test,rgw,tools}: Explicitly use Boost.Process v1 + +Boost 1.88 removed the default of using the v1 interface +automatically. See https://github.com/boostorg/process/issues/480 for +an example. + +https://www.boost.org/doc/libs/1_88_0/libs/process/doc/html/index.html#version_2 +describes the new, preferred version which we probably want to migrate +to eventually. + +In this change we simply include the v1 files and change the namespace +we alias. + +* asturm 2026-02-14: Fix conflict w/ nonexistent file in 20.1.1 (only introduced + in git master commit 119fe9149490701cca32a1f1d717d03b0f51d623) by dropping the + patch hunk: + src/tools/cephfs/ProgressTracker.cc | 12 ++++++++++-- + +Signed-off-by: Adam C. Emerson <[email protected]> +--- + src/rgw/driver/rados/rgw_sal_rados.cc | 1 - + src/rgw/rgw_lua.cc | 12 ++++++++---- + src/test/mon/test_mon_memory_target.cc | 6 ++++-- + 4 files changed, 22 insertions(+), 9 deletions(-) + +diff --git a/src/rgw/driver/rados/rgw_sal_rados.cc b/src/rgw/driver/rados/rgw_sal_rados.cc +index 34c9f2e4eecb1..481822bb1cc2b 100644 +--- a/src/rgw/driver/rados/rgw_sal_rados.cc ++++ b/src/rgw/driver/rados/rgw_sal_rados.cc +@@ -20,7 +20,6 @@ + #include <unistd.h> + + #include <boost/algorithm/string.hpp> +-#include <boost/process.hpp> + + #include <fmt/core.h> + +diff --git a/src/rgw/rgw_lua.cc b/src/rgw/rgw_lua.cc +index a0f04f81d49e3..aacec7c7fe075 100644 +--- a/src/rgw/rgw_lua.cc ++++ b/src/rgw/rgw_lua.cc +@@ -8,7 +8,13 @@ + #include "rgw_lua.h" + #ifdef WITH_RADOSGW_LUA_PACKAGES + #include <filesystem> +-#include <boost/process.hpp> ++#include <boost/process/v1/child.hpp> ++#include <boost/process/v1/env.hpp> ++#include <boost/process/v1/environment.hpp> ++#include <boost/process/v1/io.hpp> ++#include <boost/process/v1/pipe.hpp> ++#include <boost/process/v1/search_path.hpp> ++#include <boost/process/v1/start_dir.hpp> + #endif + + #define dout_subsys ceph_subsys_rgw +@@ -96,7 +102,7 @@ int delete_script(const DoutPrefixProvider *dpp, sal::LuaManager* manager, const + + #ifdef WITH_RADOSGW_LUA_PACKAGES + +-namespace bp = boost::process; ++namespace bp = boost::process::v1; + + int add_package(const DoutPrefixProvider* dpp, rgw::sal::Driver* driver, optional_yield y, const std::string& package_name, bool allow_compilation) + { +@@ -142,8 +148,6 @@ int remove_package(const DoutPrefixProvider *dpp, rgw::sal::Driver* driver, opti + return driver->get_lua_manager("")->remove_package(dpp, y, package_name); + } + +-namespace bp = boost::process; +- + int list_packages(const DoutPrefixProvider *dpp, rgw::sal::Driver* driver, optional_yield y, packages_t& packages) + { + return driver->get_lua_manager("")->list_packages(dpp, y, packages); +diff --git a/src/test/mon/test_mon_memory_target.cc b/src/test/mon/test_mon_memory_target.cc +index e8f975b47bb13..1c87dbbca425d 100644 +--- a/src/test/mon/test_mon_memory_target.cc ++++ b/src/test/mon/test_mon_memory_target.cc +@@ -6,10 +6,12 @@ + #include <regex> + #include <system_error> + +-#include <boost/process.hpp> ++#include <boost/process/v1/io.hpp> ++#include <boost/process/v1/child.hpp> ++#include <boost/process/v1/pipe.hpp> + #include <boost/tokenizer.hpp> + +-namespace bp = boost::process; ++namespace bp = boost::process::v1; + using namespace std; + + int main(int argc, char** argv) + +From 53a9c9d788bba96a346c19d989679a73a40df9ce Mon Sep 17 00:00:00 2001 +From: "Adam C. Emerson" <[email protected]> +Date: Sat, 10 Jan 2026 03:44:47 -0500 +Subject: [PATCH 4/5] {osdc,test}: Supply missing executors to a couple calls + in post + +Likely due to the `inline_executor` changes, a couple places we +weren't finding an executor were erroring. + +https://www.boost.org/doc/libs/latest/doc/html/boost_asio/history.html#boost_asio.history.asio_1_37_0 + +Signed-off-by: Adam C. Emerson <[email protected]> +--- + src/osdc/Objecter.h | 5 +++-- + src/test/common/test_blocked_completion.cc | 7 ++++--- + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h +index b98987d7e0ead..a40ba465fcc7a 100644 +--- a/src/osdc/Objecter.h ++++ b/src/osdc/Objecter.h +@@ -2789,7 +2789,7 @@ class Objecter : public md_config_obs_t, public Dispatcher { + std::unique_lock l(rwlock); + if (osdmap->get_epoch()) { + l.unlock(); +- boost::asio::post(std::move(handler)); ++ boost::asio::post(service.get_executor(), std::move(handler)); + } else { + auto e = boost::asio::get_associated_executor( + handler, service.get_executor()); +@@ -2898,7 +2898,8 @@ class Objecter : public md_config_obs_t, public Dispatcher { + return boost::asio::async_initiate<decltype(consigned), OpSignature>( + [epoch, this](auto handler) { + if (osdmap->get_epoch() >= epoch) { +- boost::asio::post(boost::asio::append( ++ boost::asio::post(service.get_executor(), ++ boost::asio::append( + std::move(handler), + boost::system::error_code{})); + } else { +diff --git a/src/test/common/test_blocked_completion.cc b/src/test/common/test_blocked_completion.cc +index 18f716e13e33b..d5f0cbf9518e6 100644 +--- a/src/test/common/test_blocked_completion.cc ++++ b/src/test/common/test_blocked_completion.cc +@@ -78,9 +78,10 @@ auto id(const Executor& executor, CompletionToken&& token, + Args&& ...args) + { + return asio::async_initiate<CompletionToken, void(Args...)>( +- []<typename ...Args2>(auto handler, Args2&& ...args2) mutable { +- asio::post(asio::append(std::move(handler), +- std::forward<Args2>(args2)...)); ++ [executor]<typename... Args2>(auto handler, Args2&&... args2) mutable { ++ asio::post(executor, ++ asio::append(std::move(handler), ++ std::forward<Args2>(args2)...)); + }, token, std::forward<Args>(args)...); + } + + +From 1bec1875c4d9fa05899b911eb2b70c17b64200f3 Mon Sep 17 00:00:00 2001 +From: "Adam C. Emerson" <[email protected]> +Date: Sat, 10 Jan 2026 03:47:19 -0500 +Subject: [PATCH 5/5] rgw/rgw_ssd_driver: Include `<asio/system_executor.hpp>` + +We were using it, but not including it. Boost.Asio 1.90 caused it to +break. + +Signed-off-by: Adam C. Emerson <[email protected]> +--- + src/rgw/rgw_ssd_driver.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/rgw/rgw_ssd_driver.cc b/src/rgw/rgw_ssd_driver.cc +index 7ec3d73ea3441..fc11f83021867 100644 +--- a/src/rgw/rgw_ssd_driver.cc ++++ b/src/rgw/rgw_ssd_driver.cc +@@ -1,3 +1,4 @@ ++#include <boost/asio/system_executor.hpp> + #include "common/async/completion.h" + #include "common/errno.h" + #include "common/async/blocked_completion.h"
