]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: Work around bug in Boost MPI/Python
authorAdam Emerson <aemerson@redhat.com>
Tue, 7 Jan 2025 02:01:49 +0000 (21:01 -0500)
committerAdam Emerson <aemerson@redhat.com>
Sun, 12 Jan 2025 17:01:35 +0000 (12:01 -0500)
Thanks to the maintainers of the Arch User Repository Ceph PKGBUILD
for this fix.

Signed-off-by: Adam Emerson <aemerson@redhat.com>
src/mgr/PyModule.cc

index cff63ef4a6b682b9ee0654cf2d1aba30b9f1f817..4f996489ba0827b127cca6fc3a5be394efe3b8ee 100644 (file)
@@ -38,6 +38,18 @@ std::string PyModule::mgr_store_prefix = "mgr/";
 #define BOOST_BIND_GLOBAL_PLACEHOLDERS
 // Boost apparently can't be bothered to fix its own usage of its own
 // deprecated features.
+
+// 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
+//
+// Thanks to the ceph-aur folks for the fix at:
+// https://github.com/bazaah/aur-ceph/commit/8c5cc7d8deec002f7596b6d0860859a0a718f12b 
+#undef BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
 #include <boost/python/extract.hpp>
 #include <boost/python/import.hpp>
 #include <boost/python/object.hpp>