ceph: add patches for GCC 14 and Boost 1.86 (#370304)
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
Backported from <https://github.com/ceph/ceph/commit/857eedbe6c9ed80ed0625bd0aa27b1a1e85f8d59>.
|
||||
|
||||
Original author: Adam Emerson <aemerson@redhat.com>
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index bbd63a6a006..bbd7c737feb 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -666,7 +666,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
|
||||
- iostreams context coroutine)
|
||||
+ iostreams context coroutine url)
|
||||
set(BOOST_HEADER_COMPONENTS container)
|
||||
|
||||
if(WITH_MGR)
|
||||
diff --git a/src/mds/BoostUrlImpl.cc b/src/mds/BoostUrlImpl.cc
|
||||
deleted file mode 100644
|
||||
index 479f4c6d75d..00000000000
|
||||
--- a/src/mds/BoostUrlImpl.cc
|
||||
+++ /dev/null
|
||||
@@ -1,8 +0,0 @@
|
||||
-/*
|
||||
- * https://www.boost.org/doc/libs/1_82_0/libs/url/doc/html/url/overview.html#url.overview.requirements
|
||||
- *
|
||||
- * To use the library as header-only; that is, to eliminate the requirement
|
||||
- * to link a program to a static or dynamic Boost.URL library,
|
||||
- * simply place the following line in exactly one source file in your project.
|
||||
- */
|
||||
-#include <boost/url/src.hpp>
|
||||
diff --git a/src/mds/CMakeLists.txt b/src/mds/CMakeLists.txt
|
||||
index 0c6c31a3c51..5c98db76e4d 100644
|
||||
--- a/src/mds/CMakeLists.txt
|
||||
+++ b/src/mds/CMakeLists.txt
|
||||
@@ -45,12 +45,12 @@ set(mds_srcs
|
||||
QuiesceDbManager.cc
|
||||
QuiesceAgent.cc
|
||||
MDSRankQuiesce.cc
|
||||
- BoostUrlImpl.cc
|
||||
${CMAKE_SOURCE_DIR}/src/common/TrackedOp.cc
|
||||
${CMAKE_SOURCE_DIR}/src/common/MemoryModel.cc
|
||||
${CMAKE_SOURCE_DIR}/src/osdc/Journaler.cc
|
||||
${CMAKE_SOURCE_DIR}/src/mgr/MDSPerfMetricTypes.cc)
|
||||
add_library(mds STATIC ${mds_srcs})
|
||||
target_link_libraries(mds PRIVATE
|
||||
+ Boost::url
|
||||
heap_profiler cpu_profiler osdc ${LUA_LIBRARIES})
|
||||
target_include_directories(mds PRIVATE "${LUA_INCLUDE_DIR}")
|
||||
diff --git a/src/test/mds/CMakeLists.txt b/src/test/mds/CMakeLists.txt
|
||||
index f80abe75083..18ebb648e68 100644
|
||||
--- a/src/test/mds/CMakeLists.txt
|
||||
+++ b/src/test/mds/CMakeLists.txt
|
||||
@@ -18,11 +18,10 @@ target_link_libraries(unittest_mds_sessionfilter mds osdc ceph-common global ${B
|
||||
add_executable(unittest_mds_quiesce_db
|
||||
TestQuiesceDb.cc
|
||||
../../../src/mds/QuiesceDbManager.cc
|
||||
- ../../../src/mds/BoostUrlImpl.cc
|
||||
$<TARGET_OBJECTS:unit-main>
|
||||
)
|
||||
add_ceph_unittest(unittest_mds_quiesce_db)
|
||||
-target_link_libraries(unittest_mds_quiesce_db ceph-common global)
|
||||
+target_link_libraries(unittest_mds_quiesce_db ceph-common global Boost::url)
|
||||
|
||||
# unittest_mds_quiesce_agent
|
||||
add_executable(unittest_mds_quiesce_agent
|
||||
--
|
||||
2.47.0
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
Excerpted from <https://aur.archlinux.org/cgit/aur.git/commit/?h=ceph&id=8c5cc7d8deec002f7596b6d0860859a0a718f12b>.
|
||||
|
||||
Original author: Bazaah <github@luxolus.com>
|
||||
|
||||
diff --git a/src/mgr/PyModule.cc b/src/mgr/PyModule.cc
|
||||
index 084cf3ffc1e..010a1177a88 100644
|
||||
--- a/src/mgr/PyModule.cc
|
||||
+++ b/src/mgr/PyModule.cc
|
||||
@@ -36,6 +36,11 @@ std::string PyModule::mgr_store_prefix = "mgr/";
|
||||
|
||||
// Courtesy of http://stackoverflow.com/questions/1418015/how-to-get-python-exception-text
|
||||
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
|
||||
+// Fix instances of "'BOOST_PP_ITERATION_02' was not declared in this scope; did you mean 'BOOST_PP_ITERATION_05'"
|
||||
+// and related macro error bullshit that spans 300 lines of errors
|
||||
+//
|
||||
+// Apparently you can't include boost/python stuff _and_ have this header defined
|
||||
+#undef BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
// Boost apparently can't be bothered to fix its own usage of its own
|
||||
// deprecated features.
|
||||
#include <boost/python/extract.hpp>
|
||||
@@ -26,7 +26,7 @@
|
||||
# Runtime dependencies
|
||||
arrow-cpp,
|
||||
babeltrace,
|
||||
boost182, # using the version installed by ceph's `install-deps.sh`
|
||||
boost,
|
||||
bzip2,
|
||||
cryptsetup,
|
||||
cunit,
|
||||
@@ -289,7 +289,7 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
boost = boost182.override {
|
||||
boost' = boost.override {
|
||||
enablePython = true;
|
||||
inherit python;
|
||||
};
|
||||
@@ -358,6 +358,26 @@ rec {
|
||||
stripLen = 1;
|
||||
extraPrefix = "src/s3select/";
|
||||
})
|
||||
|
||||
(fetchpatch2 {
|
||||
name = "ceph-gcc-14.patch";
|
||||
url = "https://github.com/ceph/ceph/commit/0eace4ea9ea42412d4d6a16d24a8660642e41173.patch?full_index=1";
|
||||
hash = "sha256-v+AExf/npe4NgmVl2j6o8860nwF9YuzC/vR0TWxTrIE=";
|
||||
})
|
||||
|
||||
./boost-1.85.patch
|
||||
|
||||
(fetchpatch2 {
|
||||
name = "ceph-boost-1.86-uuid.patch";
|
||||
url = "https://github.com/ceph/ceph/commit/01306208eac492ee0e67bff143fc32d0551a2a6f.patch?full_index=1";
|
||||
hash = "sha256-OnDrr72inzGXXYxPFQevsRZImSvI0uuqFHqtFU2dPQE=";
|
||||
})
|
||||
|
||||
# See:
|
||||
# * <https://github.com/boostorg/python/issues/394>
|
||||
# * <https://aur.archlinux.org/cgit/aur.git/commit/?h=ceph&id=8c5cc7d8deec002f7596b6d0860859a0a718f12b>
|
||||
# * <https://github.com/ceph/ceph/pull/60999>
|
||||
./boost-1.86-PyModule.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -385,7 +405,7 @@ rec {
|
||||
++ [
|
||||
arrow-cpp
|
||||
babeltrace
|
||||
boost
|
||||
boost'
|
||||
bzip2
|
||||
# Adding `ceph-python-env` here adds the env's `site-packages` to `PYTHONPATH` during the build.
|
||||
# This is important, otherwise the build system may not find the Python deps and then
|
||||
|
||||
Reference in New Issue
Block a user