diff mbox series

[meta-tensorflow,kirkstone,1/3] bazel-native: fix compile failure on gcc 13

Message ID 20250204152428.3550416-1-martin.jansa@gmail.com
State New
Headers show
Series [meta-tensorflow,kirkstone,1/3] bazel-native: fix compile failure on gcc 13 | expand

Commit Message

Martin Jansa Feb. 4, 2025, 3:24 p.m. UTC
From: Hongxu Jia <hongxu.jia@windriver.com>

external/com_google_absl/absl/strings/internal/str_format/extension.h:34:33: error: found ':' in nested-name-specifier, expected '::'
   34 | enum class FormatConversionChar : uint8_t;

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 recipes-devtools/bazel/bazel-native_5.1.1.bb  |  1 +
 .../0001-fix-compile-failure-on-gcc-13.patch  | 71 +++++++++++++++++++
 2 files changed, 72 insertions(+)
 create mode 100644 recipes-devtools/bazel/files/0001-fix-compile-failure-on-gcc-13.patch
diff mbox series

Patch

diff --git a/recipes-devtools/bazel/bazel-native_5.1.1.bb b/recipes-devtools/bazel/bazel-native_5.1.1.bb
index aa42ba6..c7490fc 100644
--- a/recipes-devtools/bazel/bazel-native_5.1.1.bb
+++ b/recipes-devtools/bazel/bazel-native_5.1.1.bb
@@ -10,6 +10,7 @@  SRC_URI = "https://github.com/bazelbuild/bazel/releases/download/${PV}/bazel-${P
            file://0001-fix-unzip-command-not-found.patch \
            file://0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch \
            file://0001-cutsomize-native-toolchains-for-Yocto.patch \
+           file://0001-fix-compile-failure-on-gcc-13.patch \
 "
 
 inherit python3native
diff --git a/recipes-devtools/bazel/files/0001-fix-compile-failure-on-gcc-13.patch b/recipes-devtools/bazel/files/0001-fix-compile-failure-on-gcc-13.patch
new file mode 100644
index 0000000..2fce1dc
--- /dev/null
+++ b/recipes-devtools/bazel/files/0001-fix-compile-failure-on-gcc-13.patch
@@ -0,0 +1,71 @@ 
+From 02fcd86787da1ebb2afad1909cb70839cdac24dc Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 13 Sep 2023 10:56:02 +0800
+Subject: [PATCH] fix compile failure on gcc 13
+
+external/com_google_absl/absl/strings/internal/str_format/extension.h:34:33: error: found ':' in nested-name-specifier, expected '::'
+   34 | enum class FormatConversionChar : uint8_t;
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ distdir_deps.bzl                              |  4 +++
+ .../0001-fix-compile-failure-on-gcc-13.patch  | 30 +++++++++++++++++++
+ 2 files changed, 34 insertions(+)
+ create mode 100644 third_party/com_google_absl/0001-fix-compile-failure-on-gcc-13.patch
+
+diff --git a/distdir_deps.bzl b/distdir_deps.bzl
+index 2ca988e..c460025 100755
+--- a/distdir_deps.bzl
++++ b/distdir_deps.bzl
+@@ -163,6 +163,10 @@ DIST_DEPS = {
+     },
+     "com_google_absl": {
+         "archive": "20211102.0.tar.gz",
++        "patch_args": ["-p1"],
++        "patches": [
++            "//third_party:com_google_absl/0001-fix-compile-failure-on-gcc-13.patch",
++        ],
+         "sha256": "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4",
+         "urls": [
+             "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz",
+diff --git a/third_party/com_google_absl/0001-fix-compile-failure-on-gcc-13.patch b/third_party/com_google_absl/0001-fix-compile-failure-on-gcc-13.patch
+new file mode 100644
+index 0000000..257e887
+--- /dev/null
++++ b/third_party/com_google_absl/0001-fix-compile-failure-on-gcc-13.patch
+@@ -0,0 +1,30 @@
++From 4cb33b2e98fd0b2f201e765a5a0d9c1d4277041e Mon Sep 17 00:00:00 2001
++From: Hongxu Jia <hongxu.jia@windriver.com>
++Date: Wed, 13 Sep 2023 11:17:34 +0800
++Subject: [PATCH] fix compile failure on gcc 13
++
++external/com_google_absl/absl/strings/internal/str_format/extension.h:34:33: error: found ':' in nested-name-specifier, expected '::'
++   34 | enum class FormatConversionChar : uint8_t;
++
++Upstream-Status: Pending
++
++Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
++---
++ absl/strings/internal/str_format/extension.h | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/absl/strings/internal/str_format/extension.h b/absl/strings/internal/str_format/extension.h
++index 55cbb56..67d4cc8 100644
++--- a/absl/strings/internal/str_format/extension.h
+++++ b/absl/strings/internal/str_format/extension.h
++@@ -21,6 +21,7 @@
++ #include <cstddef>
++ #include <cstring>
++ #include <ostream>
+++#include <cstdint>
++ 
++ #include "absl/base/config.h"
++ #include "absl/base/port.h"
++-- 
++2.17.1
++
+-- 
+2.27.0
+