diff mbox series

[meta-oe,1/6] vulkan-cts-sources: fix build with gcc-15

Message ID 20250422175742.786560-1-martin.jansa@gmail.com
State Under Review
Headers show
Series [meta-oe,1/6] vulkan-cts-sources: fix build with gcc-15 | expand

Commit Message

Martin Jansa April 22, 2025, 5:57 p.m. UTC
From: Martin Jansa <martin.jansa@gmail.com>

Fixes:
http://errors.yoctoproject.org/Errors/Details/852849/

In file included from TOPDIR/tmp/work/core2-64-oe-linux/vulkan-cts/1.4.1.0/git/external/amber/src/src/type.cc:15:
TOPDIR/tmp/work/core2-64-oe-linux/vulkan-cts/1.4.1.0/git/external/amber/src/src/type.h:56:39: error: 'uint32_t' has not been declared
   56 |   static bool IsInt8(FormatMode mode, uint32_t num_bits) {
      |                                       ^~~~~~~~

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
 ...clude-cstdint-causing-build-failures.patch | 47 +++++++++++++++++++
 .../vk-gl-cts/vulkan-cts-sources.inc          |  1 +
 2 files changed, 48 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/vk-gl-cts/files/0001-Fix-missing-include-cstdint-causing-build-failures.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-graphics/vk-gl-cts/files/0001-Fix-missing-include-cstdint-causing-build-failures.patch b/meta-oe/recipes-graphics/vk-gl-cts/files/0001-Fix-missing-include-cstdint-causing-build-failures.patch
new file mode 100644
index 0000000000..44632bc74f
--- /dev/null
+++ b/meta-oe/recipes-graphics/vk-gl-cts/files/0001-Fix-missing-include-cstdint-causing-build-failures.patch
@@ -0,0 +1,47 @@ 
+From 1d80b54aefd1f5f361990b1223c6fe308a8d3085 Mon Sep 17 00:00:00 2001
+From: Ricardo Garcia <rgarcia@igalia.com>
+Date: Mon, 21 Apr 2025 12:30:05 +0200
+Subject: [PATCH] Fix missing #include <cstdint> causing build failures
+
+Tested on Fedora 42 with clang.
+
+Upstream-Status: Submitted [https://github.com/google/amber/pull/1092]
+
+Fixes:
+http://errors.yoctoproject.org/Errors/Details/852849/
+
+In file included from TOPDIR/tmp/work/core2-64-oe-linux/vulkan-cts/1.4.1.0/git/external/amber/src/src/type.cc:15:
+TOPDIR/tmp/work/core2-64-oe-linux/vulkan-cts/1.4.1.0/git/external/amber/src/src/type.h:56:39: error: 'uint32_t' has not been declared
+   56 |   static bool IsInt8(FormatMode mode, uint32_t num_bits) {
+      |                                       ^~~~~~~~
+
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+---
+ src/tokenizer.h | 1 +
+ src/type.h      | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/tokenizer.h b/src/tokenizer.h
+index 53efec60..ea4f19df 100644
+--- a/src/tokenizer.h
++++ b/src/tokenizer.h
+@@ -16,6 +16,7 @@
+ #define SRC_TOKENIZER_H_
+ 
+ #include <cstdlib>
++#include <cstdint>
+ #include <memory>
+ #include <string>
+ 
+diff --git a/src/type.h b/src/type.h
+index c63779ba..97720f29 100644
+--- a/src/type.h
++++ b/src/type.h
+@@ -16,6 +16,7 @@
+ #define SRC_TYPE_H_
+ 
+ #include <cassert>
++#include <cstdint>
+ #include <memory>
+ #include <string>
+ #include <vector>
diff --git a/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts-sources.inc b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts-sources.inc
index 9c95aa4af7..8c2a495dc8 100644
--- a/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts-sources.inc
+++ b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts-sources.inc
@@ -22,4 +22,5 @@  SRC_URI += " \
     git://github.com/Igalia/vk_video_samples.git;protocol=https;nobranch=1;destsuffix=git/external/nvidia-video-samples/src;rev=45fe88b456c683120138f052ea81f0a958ff3ec4 \
     git://github.com/KhronosGroup/Vulkan-Video-Samples.git;protocol=https;nobranch=1;destsuffix=git/external/vulkan-video-samples/src;rev=0e87744edbb84c9c56c3fc8de9ea5150af5ee4ea \
     git://github.com/Igalia/video_generator.git;protocol=https;nobranch=1;destsuffix=git/external/video_generator/src;rev=426300e12a5cc5d4676807039a1be237a2b68187 \
+    file://0001-Fix-missing-include-cstdint-causing-build-failures.patch;patchdir=external/amber/src \
 "