Skip to contentSkip to conversation

bazel-native: fix build with gcc14

PATCH New Anuj Mittal 1 participant 1 message Jun 14, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bazel-native: fix build with gcc14

Backport patch to fix errors while building zlib. Fixes:

| external/bazel_tools/third_party/zlib/gzwrite.c: In function 'gz_comp':
| external/bazel_tools/third_party/zlib/gzwrite.c:89:20: error: implicit declaration of function 'write'; did you mean 'fwrite'? [-Wimplicit-function-declaration]
|    89 |             writ = write(state->fd, strm->next_in, put);
|       |                    ^~~~~
|       |                    fwrite
| external/bazel_tools/third_party/zlib/gzwrite.c: In function 'gzclose_w':
| external/bazel_tools/third_party/zlib/gzwrite.c:673:9: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration]
|   673 |     if (close(state->fd) == -1)
|       |         ^~~~~
|       |         pclose
---
 recipes-devtools/bazel/bazel-native_6.0.0.bb  |  1 +
 ...3ed4ac717b814d02a0d125f160ddabe78003.patch | 57 +++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 recipes-devtools/bazel/files/1f2b3ed4ac717b814d02a0d125f160ddabe78003.patch
recipes-devtools/bazel/bazel-native_6.0.0.bb +1 -0
index c930054..29abd0e 100644
@@ -11,6 +11,7 @@ SRC_URI = "https://github.com/bazelbuild/bazel/releases/download/${PV}/bazel-${P
            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 \
+           file://1f2b3ed4ac717b814d02a0d125f160ddabe78003.patch \
 "
 
 inherit python3native
recipes-devtools/bazel/files/1f2b3ed4ac717b814d02a0d125f160ddabe78003.patch new file +57 -0

57 lines not on this page · raw message