rocksdb: fix build with gcc-13
PATCH 1/1 rocksdb: fix build with gcc-13
From: "mark.yang" <[email protected]>
* 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 <[email protected]>
--- ...with-gcc-13-by-adding-cstdint-header.patch | 65 +++++++++++++++++++ ...point.h-Add-missing-includes-cstdint.patch | 41 ++++++++++++ meta-oe/recipes-dbs/rocksdb/rocksdb_9.10.0.bb | 2 + 3 files changed, 108 insertions(+) create mode 100644 meta-oe/recipes-dbs/rocksdb/files/0001-Fix-build-error-with-gcc-13-by-adding-cstdint-header.patch create mode 100644 meta-oe/recipes-dbs/rocksdb/files/0001-checkpoint.h-Add-missing-includes-cstdint.patch
meta-oe/recipes-dbs/rocksdb/files/0001-Fix-build-error-with-gcc-13-by-adding-cstdint-header.patch new file +65 -0
@@ -0,0 +1,65 @@ +From 90eba5458cb4ac2f83cac8aa550927876e6a9a09 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= <[email protected]> +Date: Wed, 5 Mar 2025 15:42:46 +0200 +Subject: [PATCH] Add missing include (#13365) + +* see more details: http://errors.yoctoproject.org/Errors/Details/851177/ +In file included from TOPDIR/tmp/work/core2-64-oe-linux/rocksdb/9.10.0/git/db/blob/blob_file_meta.cc:6: +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 + 28 | uint64_t blob_file_number, uint64_t total_blob_count, + | ^~~~~~~~ +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>' + 14 | #include "rocksdb/rocksdb_namespace.h" + +++ |+#include <cstdint> + 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 + 28 | uint64_t blob_file_number, uint64_t total_blob_count, + | ^~~~~~~~ +... + +* See also: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes + +Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/13437] +Signed-off-by: mark.yang <[email protected]> +--- + db/blob/blob_file_meta.h | 1 + + include/rocksdb/trace_record.h | 1 + + include/rocksdb/write_batch_base.h | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/db/blob/blob_file_meta.h b/db/blob/blob_file_meta.h +index d7c8a1243..2e47726f8 100644 +--- a/db/blob/blob_file_meta.h ++++ b/db/blob/blob_file_meta.h +@@ -6,6 +6,7 @@ + #pragma once + + #include <cassert> ++#include <cstdint> + #include <iosfwd> + #include <memory> + #include <string> +diff --git a/include/rocksdb/trace_record.h b/include/rocksdb/trace_record.h +index 8f9c3ee2f..d321f5387 100644 +--- a/include/rocksdb/trace_record.h ++++ b/include/rocksdb/trace_record.h +@@ -5,6 +5,7 @@ + + #pragma once + ++#include <cstdint> + #include <memory> + #include <string> + #include <vector> +diff --git a/include/rocksdb/write_batch_base.h b/include/rocksdb/write_batch_base.h +index 3334a1292..43b186029 100644 +--- a/include/rocksdb/write_batch_base.h ++++ b/include/rocksdb/write_batch_base.h +@@ -9,6 +9,7 @@ + #pragma once + + #include <cstddef> ++#include <cstdint> + + #include "rocksdb/attribute_groups.h" + #include "rocksdb/rocksdb_namespace.h"
meta-oe/recipes-dbs/rocksdb/files/0001-checkpoint.h-Add-missing-includes-cstdint.patch new file +41 -0
41 lines not on this page · raw message
meta-oe/recipes-dbs/rocksdb/rocksdb_9.10.0.bb +2 -0
@@ -20,6 +20,8 @@ SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH};protocol=htt file://static_library_as_option.patch \ file://0001-CMakeLists.txt-Make-the-test-discovery-occur-on-targ.patch \ file://run-ptest \ + file://0001-Fix-build-error-with-gcc-13-by-adding-cstdint-header.patch \ + file://0001-checkpoint.h-Add-missing-includes-cstdint.patch \ " SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch"