Skip to contentSkip to conversation

apitrace: Fix build with gcc-15

PATCH In review thond2009 2 participants 2 messages Mar 28, 2025

lore
Share & tools
lore

thond2009

author
#0 lore raw

PATCH 1/1 apitrace: Fix build with gcc-15

From: "tho3.nguyen" <[email protected]>

To fix errors:
In file included from TOPDIR/tmp/work/core2-64-oe-linux/apitrace/11.1+11.1+git/git/frametrim/ft_matrixstate.hpp:30,

                 from TOPDIR/tmp/work/core2-64-oe-linux/apitrace/11.1+11.1+git/git/frametrim/ft_matrixstate.cpp:28:

TOPDIR/tmp/work/core2-64-oe-linux/apitrace/11.1+11.1+git/git/frametrim/ft_dependecyobject.hpp:187:44: error: 'uint64_t' was not declared in this scope
187 | std::unordered_map<unsigned, std::pair<uint64_t, uint64_t>> m_buffer_mappings;
| ^~~~~~~~
...
TOPDIR/tmp/work/core2-64-oe-linux/apitrace/11.1+11.1+git/git/retrace/metric_writer.cpp:50:70: error: 'uint64_t' does not name a type
50 | case CNT_NUM_UINT64: std::cout << "\t" << *(reinterpret_cast<uint64_t*>(data)); break;
...

---
 .../0001-Explicit-header-stdint.patch         | 42 +++++++++++++++++++
 .../apitrace/apitrace_11.1.bb                 |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/apitrace/apitrace/0001-Explicit-header-stdint.patch
meta-oe/recipes-devtools/apitrace/apitrace/0001-Explicit-header-stdint.patch new file +42 -0
new file mode 100644
index 0000000000..9ce6693061
@@ -0,0 +1,42 @@
+From 952bad1469ea747012bdc48c48993bd5f13eec04 Mon Sep 17 00:00:00 2001
+From: Nicolas PARLANT <[email protected]>
+Date: Fri, 21 Mar 2025 05:02:23 +0000
+Subject: [PATCH] Explicit header: stdint
+
+Fix building with GCC-15. It no longer includes it by default.
+
+Upstream-Status: Backport [https://github.com/apitrace/apitrace/commit/952bad1469ea747012bdc48c48993bd5f13eec04]
+
+Signed-off-by: Nicolas PARLANT <[email protected]>
+---
+ frametrim/ft_dependecyobject.hpp | 1 +
+ retrace/metric_writer.cpp        | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/frametrim/ft_dependecyobject.hpp b/frametrim/ft_dependecyobject.hpp
+index 2cd0b768..0f17b601 100644
+--- a/frametrim/ft_dependecyobject.hpp
++++ b/frametrim/ft_dependecyobject.hpp
+@@ -28,6 +28,7 @@
+ #pragma once
+ 
+ #include "ft_tracecall.hpp"
++#include <stdint.h>
+ 
+ namespace frametrim {
+ 
+diff --git a/retrace/metric_writer.cpp b/retrace/metric_writer.cpp
+index e923ed1d..4e4ce748 100644
+--- a/retrace/metric_writer.cpp
++++ b/retrace/metric_writer.cpp
+@@ -24,6 +24,7 @@
+  **************************************************************************/
+ 
+ #include <iostream>
++#include <stdint.h>
+ 
+ #include "metric_writer.hpp"
+ 
+-- 
+2.34.1
+
meta-oe/recipes-devtools/apitrace/apitrace_11.1.bb +1 -0
index d872c4dbb5..48ba7dbaea 100644
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=aeb969185a143c3c25130bc2c3ef9a50 \
 SRCREV = "9352fc02bba106fbbeef9e8452ef34643c0d0764"
 PV .= "+11.1+git"
 SRC_URI = "gitsm://github.com/${BPN}/${BPN}.git;branch=master;protocol=https \
+           file://0001-Explicit-header-stdint.patch \
           "
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 41 lines · Nguyen Dat Tho via lists.openembedded.org

From: "tho3.nguyen" <[email protected]>

To fix errors:
In file included from TOPDIR/tmp/work/core2-64-oe-linux/apitrace/11.1+11.1+git/git/frametrim/ft_matrixstate.hpp:30,

                 from TOPDIR/tmp/work/core2-64-oe-linux/apitrace/11.1+11.1+git/git/frametrim/ft_matrixstate.cpp:28:

TOPDIR/tmp/work/core2-64-oe-linux/apitrace/11.1+11.1+git/git/frametrim/ft_dependecyobject.hpp:187:44: error: 'uint64_t' was not declared in this scope
187 | std::unordered_map<unsigned, std::pair<uint64_t, uint64_t>> m_buffer_mappings;
| ^~~~~~~~
...
TOPDIR/tmp/work/core2-64-oe-linux/apitrace/11.1+11.1+git/git/retrace/metric_writer.cpp:50:70: error: 'uint64_t' does not name a type
50 | case CNT_NUM_UINT64: std::cout << "\t" << *(reinterpret_cast<uint64_t*>(data)); break;
...

---
 .../0001-Explicit-header-stdint.patch         | 42 +++++++++++++++++++
 .../apitrace/apitrace_11.1.bb                 |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/apitrace/apitrace/0001-Explicit-header-stdint.patch
meta-oe/recipes-devtools/apitrace/apitrace/0001-Explicit-header-stdint.patch new file +14 -0
new file mode 100644
index 0000000000..9ce6693061
@@ -0,0 +1,42 @@
+From 952bad1469ea747012bdc48c48993bd5f13eec04 Mon Sep 17 00:00:00 2001
+From: Nicolas PARLANT <[email protected]>
+Date: Fri, 21 Mar 2025 05:02:23 +0000
+Subject: [PATCH] Explicit header: stdint
+
+Fix building with GCC-15. It no longer includes it by default.
+
+Upstream-Status: Backport [https://github.com/apitrace/apitrace/commit/952bad1469ea747012bdc48c48993bd5f13eec04]
+
+Signed-off-by: Nicolas PARLANT <[email protected]>
+---
+ frametrim/ft_dependecyobject.hpp | 1 +
+ retrace/metric_writer.cpp        | 1 +
+ 2 files changed, 2 insertions(+)

meta-oe/recipes-devtools/apitrace/apitrace/0001-Explicit-header-stdint.patch line 24

Quoted 10 lines
meta-oe/recipes-devtools/apitrace/apitrace/0001-Explicit-header-stdint.patch new file +10 -0
+
+diff --git a/frametrim/ft_dependecyobject.hpp b/frametrim/ft_dependecyobject.hpp
+index 2cd0b768..0f17b601 100644
+--- a/frametrim/ft_dependecyobject.hpp
++++ b/frametrim/ft_dependecyobject.hpp
+@@ -28,6 +28,7 @@
+ #pragma once
+
+ #include "ft_tracecall.hpp"
++#include <stdint.h>

this should have been <cstdint> but since it's a backport, I won't complain here.

Quoted 42 lines
meta-oe/recipes-devtools/apitrace/apitrace/0001-Explicit-header-stdint.patch new file +18 -0
+
+ namespace frametrim {
+
+diff --git a/retrace/metric_writer.cpp b/retrace/metric_writer.cpp
+index e923ed1d..4e4ce748 100644
+--- a/retrace/metric_writer.cpp
++++ b/retrace/metric_writer.cpp
+@@ -24,6 +24,7 @@
+  **************************************************************************/
+
+ #include <iostream>
++#include <stdint.h>
+
+ #include "metric_writer.hpp"
+
+--
+2.34.1
+
meta-oe/recipes-devtools/apitrace/apitrace_11.1.bb +1 -1
index d872c4dbb5..48ba7dbaea 100644
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=aeb969185a143c3c25130bc2c3ef9a50 \
 SRCREV = "9352fc02bba106fbbeef9e8452ef34643c0d0764"
 PV .= "+11.1+git"
 SRC_URI = "gitsm://github.com/${BPN}/${BPN}.git;branch=master;protocol=https \
+           file://0001-Explicit-header-stdint.patch \
           "
 
 S = "${WORKDIR}/git"
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#116344): https://lists.openembedded.org/g/openembedded-devel/message/116344
Mute This Topic: https://lists.openembedded.org/mt/111950111/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-