diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2022-05-22 21:46:55 -0700 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2022-05-25 11:39:13 -0400 |
commit | d9189db0aa971fbd4a11608965f4bac534f0cd92 (patch) | |
tree | a9c97bfead2c0fdf80ec667f51eb37942310b4da | |
parent | fb0a7b97db4f419b82309f98a4944ae3330d1e2e (diff) | |
download | meta-virtualization-d9189db0aa971fbd4a11608965f4bac534f0cd92.tar.gz |
ceph: fix gcc-12 compile failure
Add two patches to fix gcc-12 compile failure.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
3 files changed, 74 insertions, 0 deletions
diff --git a/recipes-extended/ceph/ceph/0001-buffer.h-add-missing-header-file-due-to-gcc-upgrade.patch b/recipes-extended/ceph/ceph/0001-buffer.h-add-missing-header-file-due-to-gcc-upgrade.patch new file mode 100644 index 00000000..70d3eb94 --- /dev/null +++ b/recipes-extended/ceph/ceph/0001-buffer.h-add-missing-header-file-due-to-gcc-upgrade.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 496465d9238109a93612e28682273e5bf576823b Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Sun, 22 May 2022 19:40:59 -0700 | ||
4 | Subject: [PATCH 1/2] buffer.h: add missing header file due to gcc upgrade | ||
5 | |||
6 | The header file <memory> have been changed to be no longer included by other | ||
7 | heades, thus requiring explicit include. See https://gcc.gnu.org/gcc-12/porting_to.html | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
12 | --- | ||
13 | src/include/buffer.h | 1 + | ||
14 | 1 file changed, 1 insertion(+) | ||
15 | |||
16 | diff --git a/src/include/buffer.h b/src/include/buffer.h | ||
17 | index 5c8b427d..88845ee6 100644 | ||
18 | --- a/src/include/buffer.h | ||
19 | +++ b/src/include/buffer.h | ||
20 | @@ -43,6 +43,7 @@ | ||
21 | #include <list> | ||
22 | #include <vector> | ||
23 | #include <string> | ||
24 | +#include <memory> | ||
25 | #if __cplusplus >= 201703L | ||
26 | #include <string_view> | ||
27 | #endif // __cplusplus >= 201703L | ||
28 | -- | ||
29 | 2.36.0 | ||
30 | |||
diff --git a/recipes-extended/ceph/ceph/0002-common-fix-FTBFS-due-to-dout-need_dynamic-on-GCC-12.patch b/recipes-extended/ceph/ceph/0002-common-fix-FTBFS-due-to-dout-need_dynamic-on-GCC-12.patch new file mode 100644 index 00000000..d119bf1b --- /dev/null +++ b/recipes-extended/ceph/ceph/0002-common-fix-FTBFS-due-to-dout-need_dynamic-on-GCC-12.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 841806de212226921eeaeb3eea054bda8ccce616 Mon Sep 17 00:00:00 2001 | ||
2 | From: Radoslaw Zarzynski <rzarzyns@redhat.com> | ||
3 | Date: Wed, 19 Jan 2022 15:24:11 +0000 | ||
4 | Subject: [PATCH 2/2] common: fix FTBFS due to dout & need_dynamic on GCC-12 | ||
5 | |||
6 | For details see: | ||
7 | https://gist.github.com/rzarzynski/d6d2df6888923bef6a3e764f4856853f. | ||
8 | |||
9 | Special thanks to Kaleb Keithley who reported the issue | ||
10 | and tested the fix! | ||
11 | |||
12 | Fixes: https://tracker.ceph.com/issues/53896 | ||
13 | Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com> | ||
14 | |||
15 | Upstream-Status: Backport [963d756ded40f5adf2efef53893c917bec1845c1] | ||
16 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
17 | --- | ||
18 | src/common/dout.h | 5 +++-- | ||
19 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/src/common/dout.h b/src/common/dout.h | ||
22 | index c7c08182..42f49915 100644 | ||
23 | --- a/src/common/dout.h | ||
24 | +++ b/src/common/dout.h | ||
25 | @@ -99,11 +99,12 @@ namespace ceph::dout { | ||
26 | template<typename T> | ||
27 | struct dynamic_marker_t { | ||
28 | T value; | ||
29 | - operator T() const { return value; } | ||
30 | + // constexpr ctor isn't needed as it's an aggregate type | ||
31 | + constexpr operator T() const { return value; } | ||
32 | }; | ||
33 | |||
34 | template<typename T> | ||
35 | -dynamic_marker_t<T> need_dynamic(T&& t) { | ||
36 | +constexpr dynamic_marker_t<T> need_dynamic(T&& t) { | ||
37 | return dynamic_marker_t<T>{ std::forward<T>(t) }; | ||
38 | } | ||
39 | |||
40 | -- | ||
41 | 2.36.0 | ||
42 | |||
diff --git a/recipes-extended/ceph/ceph_15.2.15.bb b/recipes-extended/ceph/ceph_15.2.15.bb index 17dbcf35..0fb32b26 100644 --- a/recipes-extended/ceph/ceph_15.2.15.bb +++ b/recipes-extended/ceph/ceph_15.2.15.bb | |||
@@ -14,6 +14,8 @@ SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \ | |||
14 | file://ceph.conf \ | 14 | file://ceph.conf \ |
15 | file://0001-cmake-add-support-for-python3.10.patch \ | 15 | file://0001-cmake-add-support-for-python3.10.patch \ |
16 | file://0001-SnappyCompressor.h-fix-snappy-compiler-error.patch \ | 16 | file://0001-SnappyCompressor.h-fix-snappy-compiler-error.patch \ |
17 | file://0001-buffer.h-add-missing-header-file-due-to-gcc-upgrade.patch \ | ||
18 | file://0002-common-fix-FTBFS-due-to-dout-need_dynamic-on-GCC-12.patch \ | ||
17 | " | 19 | " |
18 | 20 | ||
19 | SRC_URI[sha256sum] = "5dccdaff2ebe18d435b32bfc06f8b5f474bf6ac0432a6a07d144b7c56700d0bf" | 21 | SRC_URI[sha256sum] = "5dccdaff2ebe18d435b32bfc06f8b5f474bf6ac0432a6a07d144b7c56700d0bf" |