summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwangjiezhe <wangjiezhe@gmail.com>2024-01-21 16:07:44 +0800
committerJason Zaman <perfinion@gentoo.org>2024-02-03 11:33:04 -0800
commit77b20ee55bb5699ecd496e3a68e27fb4d5399f03 (patch)
tree7b3d386f567f395e78f8395f8cd8b3c43b7268c8 /sci-libs/tensorflow
parentdev-build/bazel: add 6.4.0 (diff)
downloadgentoo-77b20ee55bb5699ecd496e3a68e27fb4d5399f03.tar.gz
gentoo-77b20ee55bb5699ecd496e3a68e27fb4d5399f03.tar.bz2
gentoo-77b20ee55bb5699ecd496e3a68e27fb4d5399f03.zip
sci-libs/tensorflow: fixing build issue with gcc-13
Tested on tensorflow-2.12/2.13/2.14/2.15 with USE="mpi python xla -cuda" and gcc-13. Bug: https://bugs.gentoo.org/905673 Signed-off-by: wangjiezhe <wangjiezhe@gmail.com> Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'sci-libs/tensorflow')
-rw-r--r--sci-libs/tensorflow/files/tensorflow-2.13.0-0013-Fixing-build-issue-with-Clang-16-and-GCC-13.patch39
-rw-r--r--sci-libs/tensorflow/files/tensorflow-2.14.1-0014-Fixing-build-issue-with-Clang-16.patch25
-rw-r--r--sci-libs/tensorflow/tensorflow-2.11.0.ebuild1
-rw-r--r--sci-libs/tensorflow/tensorflow-2.12.0.ebuild1
-rw-r--r--sci-libs/tensorflow/tensorflow-2.13.1.ebuild1
-rw-r--r--sci-libs/tensorflow/tensorflow-2.14.1.ebuild1
6 files changed, 68 insertions, 0 deletions
diff --git a/sci-libs/tensorflow/files/tensorflow-2.13.0-0013-Fixing-build-issue-with-Clang-16-and-GCC-13.patch b/sci-libs/tensorflow/files/tensorflow-2.13.0-0013-Fixing-build-issue-with-Clang-16-and-GCC-13.patch
new file mode 100644
index 000000000000..9961d94cd48c
--- /dev/null
+++ b/sci-libs/tensorflow/files/tensorflow-2.13.0-0013-Fixing-build-issue-with-Clang-16-and-GCC-13.patch
@@ -0,0 +1,39 @@
+From 9081d1ccadb7fcd3e2dd01106e85003af2fb7975 Mon Sep 17 00:00:00 2001
+From: wangjiezhe <wangjiezhe@gmail.com>
+Date: Sun, 21 Jan 2024 00:26:21 +0800
+Subject: [PATCH 13/13] Fixing build issue with Clang 16 and GCC 13
+
+---
+ tensorflow/lite/kernels/internal/spectrogram.cc | 2 ++
+ tensorflow/tsl/lib/io/cache.h | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/tensorflow/lite/kernels/internal/spectrogram.cc b/tensorflow/lite/kernels/internal/spectrogram.cc
+index a832962a38d..9b1f86ba717 100644
+--- a/tensorflow/lite/kernels/internal/spectrogram.cc
++++ b/tensorflow/lite/kernels/internal/spectrogram.cc
+@@ -18,6 +18,8 @@ limitations under the License.
+ #include <assert.h>
+ #include <math.h>
+
++#include <cstdint>
++
+ #include "third_party/fft2d/fft.h"
+
+ namespace tflite {
+diff --git a/tensorflow/tsl/lib/io/cache.h b/tensorflow/tsl/lib/io/cache.h
+index f894c5916d5..e49d09b7450 100644
+--- a/tensorflow/tsl/lib/io/cache.h
++++ b/tensorflow/tsl/lib/io/cache.h
+@@ -16,6 +16,8 @@ limitations under the License.
+ #ifndef TENSORFLOW_TSL_LIB_IO_CACHE_H_
+ #define TENSORFLOW_TSL_LIB_IO_CACHE_H_
+
++#include <cstdint>
++
+ #include "tensorflow/tsl/platform/stringpiece.h"
+
+ // A Cache is an interface that maps keys to values. It has internal
+--
+2.43.0
+
diff --git a/sci-libs/tensorflow/files/tensorflow-2.14.1-0014-Fixing-build-issue-with-Clang-16.patch b/sci-libs/tensorflow/files/tensorflow-2.14.1-0014-Fixing-build-issue-with-Clang-16.patch
new file mode 100644
index 000000000000..379aa7385df1
--- /dev/null
+++ b/sci-libs/tensorflow/files/tensorflow-2.14.1-0014-Fixing-build-issue-with-Clang-16.patch
@@ -0,0 +1,25 @@
+From 9db05c2eb25372b3be4badb15aa67d19298aeaf4 Mon Sep 17 00:00:00 2001
+From: Ben Olson <matthew.olson@intel.com>
+Date: Tue, 8 Aug 2023 17:15:50 -0500
+Subject: [PATCH 14/14] Fixing build issue with Clang 16
+
+---
+ tensorflow/tsl/lib/io/cache.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tensorflow/tsl/lib/io/cache.h b/tensorflow/tsl/lib/io/cache.h
+index f894c5916d5..e49d09b7450 100644
+--- a/tensorflow/tsl/lib/io/cache.h
++++ b/tensorflow/tsl/lib/io/cache.h
+@@ -16,6 +16,8 @@ limitations under the License.
+ #ifndef TENSORFLOW_TSL_LIB_IO_CACHE_H_
+ #define TENSORFLOW_TSL_LIB_IO_CACHE_H_
+
++#include <cstdint>
++
+ #include "tensorflow/tsl/platform/stringpiece.h"
+
+ // A Cache is an interface that maps keys to values. It has internal
+--
+2.43.0
+
diff --git a/sci-libs/tensorflow/tensorflow-2.11.0.ebuild b/sci-libs/tensorflow/tensorflow-2.11.0.ebuild
index 5a44042dcde2..7307e3bc3c8d 100644
--- a/sci-libs/tensorflow/tensorflow-2.11.0.ebuild
+++ b/sci-libs/tensorflow/tensorflow-2.11.0.ebuild
@@ -198,6 +198,7 @@ src_prepare() {
bazel_setup_bazelrc
eapply "${WORKDIR}"/patches/*.patch
+ eapply "${FILESDIR}/tensorflow-2.13.0-0013-Fixing-build-issue-with-Clang-16-and-GCC-13.patch"
# Relax version checks in setup.py
sed -i "/^ '/s/==/>=/g" tensorflow/tools/pip_package/setup.py || die
diff --git a/sci-libs/tensorflow/tensorflow-2.12.0.ebuild b/sci-libs/tensorflow/tensorflow-2.12.0.ebuild
index b2050fa13bff..adc648f45814 100644
--- a/sci-libs/tensorflow/tensorflow-2.12.0.ebuild
+++ b/sci-libs/tensorflow/tensorflow-2.12.0.ebuild
@@ -200,6 +200,7 @@ src_prepare() {
bazel_setup_bazelrc
eapply "${WORKDIR}"/patches/*.patch
+ eapply "${FILESDIR}/tensorflow-2.13.0-0013-Fixing-build-issue-with-Clang-16-and-GCC-13.patch"
# Relax version checks in setup.py
sed -i "/^ '/s/==/>=/g" tensorflow/tools/pip_package/setup.py || die
diff --git a/sci-libs/tensorflow/tensorflow-2.13.1.ebuild b/sci-libs/tensorflow/tensorflow-2.13.1.ebuild
index 646b0571695d..fb1e328f6e07 100644
--- a/sci-libs/tensorflow/tensorflow-2.13.1.ebuild
+++ b/sci-libs/tensorflow/tensorflow-2.13.1.ebuild
@@ -191,6 +191,7 @@ PATCHES=(
"${FILESDIR}/tensorflow-2.13.0-0010-systemlibs-update-targets-for-absl.patch"
"${FILESDIR}/tensorflow-2.13.0-0011-systemlibs-update-targets-for-google_cloud_cpp.patch"
"${FILESDIR}/tensorflow-2.13.0-0012-bump-cudnn-frontend-to-v0.9.patch"
+ "${FILESDIR}/tensorflow-2.13.0-0013-Fixing-build-issue-with-Clang-16-and-GCC-13.patch"
)
get-cpu-flags() {
diff --git a/sci-libs/tensorflow/tensorflow-2.14.1.ebuild b/sci-libs/tensorflow/tensorflow-2.14.1.ebuild
index 5e4117a37653..83e63834a518 100644
--- a/sci-libs/tensorflow/tensorflow-2.14.1.ebuild
+++ b/sci-libs/tensorflow/tensorflow-2.14.1.ebuild
@@ -185,6 +185,7 @@ PATCHES=(
"${FILESDIR}/${P}-0011-systemlib-fix-missing-LICENSE-in-flatbuffers.patch"
"${FILESDIR}/${P}-0012-build-use-non-hermetic-python.patch"
"${FILESDIR}/${P}-0013-installation-remove-cp_local_config_python.patch"
+ "${FILESDIR}/${P}-0014-Fixing-build-issue-with-Clang-16.patch"
)
get-cpu-flags() {