summarylogtreecommitdiffstats
path: root/ceph-15.2.14-gcc12.patch
blob: 86c02f1f26729546d9f8c2bb4cbb719e67580860 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
From 963d756ded40f5adf2efef53893c917bec1845c1 Mon Sep 17 00:00:00 2001
From: Radoslaw Zarzynski <rzarzyns@redhat.com>
Date: Wed, 19 Jan 2022 15:24:11 +0000
Subject: [PATCH] common: fix FTBFS due to dout & need_dynamic on GCC-12

For details see:
https://gist.github.com/rzarzynski/d6d2df6888923bef6a3e764f4856853f.

Special thanks to Kaleb Keithley who reported the issue
and tested the fix!

Fixes: https://tracker.ceph.com/issues/53896
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
---
 src/common/dout.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/common/dout.h b/src/common/dout.h
index 421222d535f8d..a1375fbb91026 100644
--- a/src/common/dout.h
+++ b/src/common/dout.h
@@ -99,11 +99,12 @@ namespace ceph::dout {
 template<typename T>
 struct dynamic_marker_t {
   T value;
-  operator T() const { return value; }
+  // constexpr ctor isn't needed as it's an aggregate type
+  constexpr operator T() const { return value; }
 };
 
 template<typename T>
-dynamic_marker_t<T> need_dynamic(T&& t) {
+constexpr dynamic_marker_t<T> need_dynamic(T&& t) {
   return dynamic_marker_t<T>{ std::forward<T>(t) };
 }
 

From 7c381ba985bd1398ef7d145cc00fae9d0db510e3 Mon Sep 17 00:00:00 2001
From: Kefu Chai <tchaikov@gmail.com>
Date: Mon, 28 Feb 2022 21:46:39 +0800
Subject: [PATCH] include/buffer: include <memory>

to address following FTBFS:

/usr/bin/ccache /usr/bin/clang++-13 -DBOOST_ALL_NO_LIB -DBOOST_ASIO_DISABLE_CONCEPTS -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_T$
In file included from /var/ssd/ceph/src/crimson/os/seastore/seastore_types.cc:4:
In file included from /var/ssd/ceph/src/crimson/os/seastore/seastore_types.h:14:
In file included from /var/ssd/ceph/src/include/denc.h:47:
/var/ssd/ceph/src/include/buffer.h:98:37: error: no template named 'unique_ptr' in namespace 'std'; did you mean 'boost::movelib::unique_ptr'?
struct unique_leakable_ptr : public std::unique_ptr<T, ceph::nop_delete<T>> {
                                    ^~~~~~~~~~~~~~~
                                    boost::movelib::unique_ptr
/opt/ceph/include/boost/move/unique_ptr.hpp:354:7: note: 'boost::movelib::unique_ptr' declared here
class unique_ptr
      ^

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
---
 src/include/buffer.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/include/buffer.h b/src/include/buffer.h
index 0c89367dd3b2c..8a28d846d9d46 100644
--- a/src/include/buffer.h
+++ b/src/include/buffer.h
@@ -41,6 +41,7 @@
 #include <iosfwd>
 #include <iomanip>
 #include <list>
+#include <memory>
 #include <vector>
 #include <string>
 #if __cplusplus >= 201703L