perfetto: fix error with gcc-15
PATCH 1/1 perfetto: fix error with gcc-15
From: "mark.yang" <[email protected]>
* Add missing cstdint include to fix build error with gcc-15
* To fix the error with gcc-15.
http://errors.yoctoproject.org/Errors/Details/851189/
../git/include/perfetto/ext/tracing/core/slice.h:47:46: error: 'uint8_t' was not declared in this scope
47 | static Slice TakeOwnership(std::unique_ptr<uint8_t[]> buf, size_t size) {
| ^~~~~~~
../git/include/perfetto/ext/tracing/core/slice.h:25:1: note: 'uint8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
24 | #include <string>
+++ |+#include <cstdint> * See also: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
Some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library.
Signed-off-by mark.yang <[email protected]>
--- meta-oe/recipes-devtools/perfetto/perfetto.bb | 1 + ...r-due-to-missing-cstdint-with-gcc-15.patch | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 meta-oe/recipes-devtools/perfetto/perfetto/0001-Fix-build-error-due-to-missing-cstdint-with-gcc-15.patch
meta-oe/recipes-devtools/perfetto/perfetto.bb +1 -0
@@ -28,6 +28,7 @@ SRC_URI:append = " \ \ file://0001-Remove-check_build_deps-build-steps.patch \ file://0002-traced-fix-missing-include.patch \ + file://0001-Fix-build-error-due-to-missing-cstdint-with-gcc-15.patch \ " SRCREV_bionic = "a0d0355105cb9d4a4b5384897448676133d7b8e2"
meta-oe/recipes-devtools/perfetto/perfetto/0001-Fix-build-error-due-to-missing-cstdint-with-gcc-15.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 2413c2f7d4a96d4f6b5a5155fc35979183ddf291 Mon Sep 17 00:00:00 2001 +From: markyang92 <[email protected]> +Date: Wed, 9 Apr 2025 18:25:09 +0900 +Subject: [PATCH] Fix build error due to missing cstdint with gcc-15 + + * Add missing cstdint include to fix build error with gcc-15 + + * To fix the error with gcc-15. + http://errors.yoctoproject.org/Errors/Details/851189/ + ../git/include/perfetto/ext/tracing/core/slice.h:47:46: error: 'uint8_t' was not declared in this scope + 47 | static Slice TakeOwnership(std::unique_ptr<uint8_t[]> buf, size_t size) { + | ^~~~~~~ + ../git/include/perfetto/ext/tracing/core/slice.h:25:1: note: 'uint8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' + 24 | #include <string> + +++ |+#include <cstdint> + + * See also: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes + Some C++ Standard Library headers have been changed to no longer include + other headers that were being used internally by the library. + +Upstream-Status: Submitted [https://github.com/google/perfetto/pull/1214] +Signed-off-by: mark.yang <[email protected]> +Signed-off-by: markyang92 <[email protected]> +--- + include/perfetto/ext/tracing/core/slice.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/perfetto/ext/tracing/core/slice.h b/include/perfetto/ext/tracing/core/slice.h +index cdabc39465..ebbc402d49 100644 +--- a/include/perfetto/ext/tracing/core/slice.h ++++ b/include/perfetto/ext/tracing/core/slice.h +@@ -24,6 +24,7 @@ + #include <memory> + #include <string> + #include <vector> ++#include <cstdint> + + #include "perfetto/base/logging.h" +