diff options
author | mark.yang <mark.yang@lge.com> | 2025-04-07 16:28:33 +0900 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-04-07 07:39:10 -0700 |
commit | 5cf1a1040501f467d9cd228c1a57a28f0e7ea926 (patch) | |
tree | 27c4d7de2b8fee5b822f919cb67cf1803e7c6e97 | |
parent | 1c848d99c9c50aa945930ac0928c5ea40c46bdb5 (diff) | |
download | meta-openembedded-5cf1a1040501f467d9cd228c1a57a28f0e7ea926.tar.gz |
rocksdb: fix build with gcc-13
* From gcc 13, cstdint header must be explicitly included for uint_X data types.
* See also: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
Signed-off-by: mark.yang <mark.yang@lge.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 108 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-Fix-build-error-with-gcc-13-by-adding-cstdint-header.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-Fix-build-error-with-gcc-13-by-adding-cstdint-header.patch new file mode 100644 index 0000000000..168bd76ac7 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-Fix-build-error-with-gcc-13-by-adding-cstdint-header.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From 90eba5458cb4ac2f83cac8aa550927876e6a9a09 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= <lnicola@dend.ro> | ||
3 | Date: Wed, 5 Mar 2025 15:42:46 +0200 | ||
4 | Subject: [PATCH] Add missing include (#13365) | ||
5 | |||
6 | * see more details: http://errors.yoctoproject.org/Errors/Details/851177/ | ||
7 | In file included from TOPDIR/tmp/work/core2-64-oe-linux/rocksdb/9.10.0/git/db/blob/blob_file_meta.cc:6: | ||
8 | TOPDIR/tmp/work/core2-64-oe-linux/rocksdb/9.10.0/git/db/blob/blob_file_meta.h:28:7: error: 'uint64_t' has not been declared | ||
9 | 28 | uint64_t blob_file_number, uint64_t total_blob_count, | ||
10 | | ^~~~~~~~ | ||
11 | TOPDIR/tmp/work/core2-64-oe-linux/rocksdb/9.10.0/git/db/blob/blob_file_meta.h:15:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' | ||
12 | 14 | #include "rocksdb/rocksdb_namespace.h" | ||
13 | +++ |+#include <cstdint> | ||
14 | 15 | | ||
15 | TOPDIR/tmp/work/core2-64-oe-linux/rocksdb/9.10.0/git/db/blob/blob_file_meta.h:28:34: error: 'uint64_t' has not been declared | ||
16 | 28 | uint64_t blob_file_number, uint64_t total_blob_count, | ||
17 | | ^~~~~~~~ | ||
18 | ... | ||
19 | |||
20 | * See also: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes | ||
21 | |||
22 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/13437] | ||
23 | Signed-off-by: mark.yang <mark.yang@lge.com> | ||
24 | --- | ||
25 | db/blob/blob_file_meta.h | 1 + | ||
26 | include/rocksdb/trace_record.h | 1 + | ||
27 | include/rocksdb/write_batch_base.h | 1 + | ||
28 | 3 files changed, 3 insertions(+) | ||
29 | |||
30 | diff --git a/db/blob/blob_file_meta.h b/db/blob/blob_file_meta.h | ||
31 | index d7c8a1243..2e47726f8 100644 | ||
32 | --- a/db/blob/blob_file_meta.h | ||
33 | +++ b/db/blob/blob_file_meta.h | ||
34 | @@ -6,6 +6,7 @@ | ||
35 | #pragma once | ||
36 | |||
37 | #include <cassert> | ||
38 | +#include <cstdint> | ||
39 | #include <iosfwd> | ||
40 | #include <memory> | ||
41 | #include <string> | ||
42 | diff --git a/include/rocksdb/trace_record.h b/include/rocksdb/trace_record.h | ||
43 | index 8f9c3ee2f..d321f5387 100644 | ||
44 | --- a/include/rocksdb/trace_record.h | ||
45 | +++ b/include/rocksdb/trace_record.h | ||
46 | @@ -5,6 +5,7 @@ | ||
47 | |||
48 | #pragma once | ||
49 | |||
50 | +#include <cstdint> | ||
51 | #include <memory> | ||
52 | #include <string> | ||
53 | #include <vector> | ||
54 | diff --git a/include/rocksdb/write_batch_base.h b/include/rocksdb/write_batch_base.h | ||
55 | index 3334a1292..43b186029 100644 | ||
56 | --- a/include/rocksdb/write_batch_base.h | ||
57 | +++ b/include/rocksdb/write_batch_base.h | ||
58 | @@ -9,6 +9,7 @@ | ||
59 | #pragma once | ||
60 | |||
61 | #include <cstddef> | ||
62 | +#include <cstdint> | ||
63 | |||
64 | #include "rocksdb/attribute_groups.h" | ||
65 | #include "rocksdb/rocksdb_namespace.h" | ||
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-checkpoint.h-Add-missing-includes-cstdint.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-checkpoint.h-Add-missing-includes-cstdint.patch new file mode 100644 index 0000000000..a872be5b54 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-checkpoint.h-Add-missing-includes-cstdint.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 31012cdfa435d9203da3c3de8127b66bf018692a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 24 Jan 2023 21:40:43 -0800 | ||
4 | Subject: [PATCH] checkpoint.h: Add missing includes <cstdint> | ||
5 | |||
6 | It uses uint64_t and it comes from <cstdint> | ||
7 | This is needed with GCC 13 and newer [1] | ||
8 | |||
9 | [1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | |||
13 | * build error: | ||
14 | FAILED: CMakeFiles/checkpoint_test.dir/utilities/checkpoint/checkpoint_test.cc.o | ||
15 | In file included from rocksdb/9.10.0/git/utilities/checkpoint/checkpoint_test.cc:11: | ||
16 | rocksdb/9.10.0/git/include/rocksdb/utilities/checkpoint.h:49:35: error: 'uint64_t' has not been declared | ||
17 | 49 | uint64_t log_size_for_flush = 0, | ||
18 | | ^~~~~~~~ | ||
19 | rocksdb/9.10.0/git/include/rocksdb/utilities/checkpoint.h:14:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' | ||
20 | 13 | #include "rocksdb/status.h" | ||
21 | +++ |+#include <cstdint> | ||
22 | 14 | | ||
23 | |||
24 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/11137] | ||
25 | Signed-off-by: mark.yang <mark.yang@lge.com> | ||
26 | --- | ||
27 | include/rocksdb/utilities/checkpoint.h | 1 + | ||
28 | 1 file changed, 1 insertion(+) | ||
29 | |||
30 | Index: git/include/rocksdb/utilities/checkpoint.h | ||
31 | =================================================================== | ||
32 | --- git.orig/include/rocksdb/utilities/checkpoint.h | ||
33 | +++ git/include/rocksdb/utilities/checkpoint.h | ||
34 | @@ -7,6 +7,7 @@ | ||
35 | |||
36 | #pragma once | ||
37 | |||
38 | +#include <cstdint> | ||
39 | #include <string> | ||
40 | #include <vector> | ||
41 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_9.10.0.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.10.0.bb index 1e36d1fc4f..fefb6df8aa 100644 --- a/meta-oe/recipes-dbs/rocksdb/rocksdb_9.10.0.bb +++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.10.0.bb | |||
@@ -20,6 +20,8 @@ SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH};protocol=htt | |||
20 | file://static_library_as_option.patch \ | 20 | file://static_library_as_option.patch \ |
21 | file://0001-CMakeLists.txt-Make-the-test-discovery-occur-on-targ.patch \ | 21 | file://0001-CMakeLists.txt-Make-the-test-discovery-occur-on-targ.patch \ |
22 | file://run-ptest \ | 22 | file://run-ptest \ |
23 | file://0001-Fix-build-error-with-gcc-13-by-adding-cstdint-header.patch \ | ||
24 | file://0001-checkpoint.h-Add-missing-includes-cstdint.patch \ | ||
23 | " | 25 | " |
24 | 26 | ||
25 | SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" | 27 | SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" |