[arch-commits] Commit in tensorflow/trunk (PKGBUILD fix-c++17-compat.patch)

Sven-Hendrik Haase svenstaro at archlinux.org
Sun Jun 13 11:47:04 UTC 2021


    Date: Sunday, June 13, 2021 @ 11:47:04
  Author: svenstaro
Revision: 963274

upgpkg: tensorflow 2.5.0-3: Make this compatible with C++14 and C++17 at the same time (FS#65953)

Added:
  tensorflow/trunk/fix-c++17-compat.patch
Modified:
  tensorflow/trunk/PKGBUILD

------------------------+
 PKGBUILD               |    7 ++++++-
 fix-c++17-compat.patch |   11 +++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-06-13 11:35:51 UTC (rev 963273)
+++ PKGBUILD	2021-06-13 11:47:04 UTC (rev 963274)
@@ -7,7 +7,7 @@
 pkgname=(tensorflow tensorflow-opt tensorflow-cuda tensorflow-opt-cuda python-tensorflow python-tensorflow-opt python-tensorflow-cuda python-tensorflow-opt-cuda)
 pkgver=2.5.0
 _pkgver=2.5.0
-pkgrel=2
+pkgrel=3
 pkgdesc="Library for computation using data flow graphs for scalable machine learning"
 url="https://www.tensorflow.org/"
 license=('APACHE')
@@ -20,9 +20,11 @@
 optdepends=('tensorboard: Tensorflow visualization toolkit')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz"
         https://patch-diff.githubusercontent.com/raw/tensorflow/tensorflow/pull/48935.patch
+        fix-c++17-compat.patch
         build-against-actual-mkl.patch)
 sha512sums=('637c63b1bed1c0eb7bb018f1ff7f29f7f0d78e75dac384df4ecb5dfb92bbcb28209e3d3d2204145abddf88e3247d8c31bbb4cea032a73b7122b2ef3eb0d2b947'
             '164a9213ffd8c7047a6a03022a3d768736ff3245871fcddb70e9bac8b57922f6dabf369a112d599465884e966ce5499040c6b041e216a7675f27c174e4f8c0ee'
+            'a39f4adff91a60b05c18c4c1ef99b65375887bbea5991610eb162a3c6e3562f8d4438f9f1e1910b672f6094235b5b70dea633578f7f6b5b931f221ca2805152a'
             'e51e3f3dced121db3a09fbdaefd33555536095584b72a5eb6f302fa6fa68ab56ea45e8a847ec90ff4ba076db312c06f91ff672e08e95263c658526582494ce08')
 
 # consolidate common dependencies to prevent mishaps
@@ -215,6 +217,9 @@
   ln -s libtensorflow_framework.so.${pkgver:0:1} "${pkgdir}"/usr/lib/libtensorflow_framework.so
   install -Dm644 tensorflow/c/c_api.h "${pkgdir}"/usr/include/tensorflow/tensorflow/c/c_api.h
   install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+
+  # Fix interoperability of C++14 and C++17. See https://bugs.archlinux.org/task/65953
+  patch -Np0 -i "${srcdir}"/fix-c++17-compat.patch -d "${pkgdir}"/usr/include/tensorflow/absl/base
 }
 
 _python_package() {

Added: fix-c++17-compat.patch
===================================================================
--- fix-c++17-compat.patch	                        (rev 0)
+++ fix-c++17-compat.patch	2021-06-13 11:47:04 UTC (rev 963274)
@@ -0,0 +1,11 @@
+--- config-old.h	2021-06-13 04:22:15.841839739 +0200
++++ config.h	2021-06-13 04:22:32.308939638 +0200
+@@ -533,7 +533,7 @@
+ 
+ #ifdef __has_include
+ #if __has_include(<string_view>) && __cplusplus >= 201703L
+-#define ABSL_HAVE_STD_STRING_VIEW 1
++// #define ABSL_HAVE_STD_STRING_VIEW 1
+ #endif
+ #endif
+ 



More information about the arch-commits mailing list