Date: Wednesday, May 19, 2021 @ 08:41:53 Author: svenstaro Revision: 936385
upgpkg: tensorflow 2.5.0-2: gcc10 rebuild Modified: tensorflow/trunk/PKGBUILD ----------+ PKGBUILD | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-05-19 08:38:25 UTC (rev 936384) +++ PKGBUILD 2021-05-19 08:41:53 UTC (rev 936385) @@ -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=1 +pkgrel=2 pkgdesc="Library for computation using data flow graphs for scalable machine learning" url="https://www.tensorflow.org/" license=('APACHE') @@ -19,8 +19,10 @@ 'cython') 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 build-against-actual-mkl.patch) sha512sums=('637c63b1bed1c0eb7bb018f1ff7f29f7f0d78e75dac384df4ecb5dfb92bbcb28209e3d3d2204145abddf88e3247d8c31bbb4cea032a73b7122b2ef3eb0d2b947' + '164a9213ffd8c7047a6a03022a3d768736ff3245871fcddb70e9bac8b57922f6dabf369a112d599465884e966ce5499040c6b041e216a7675f27c174e4f8c0ee' 'e51e3f3dced121db3a09fbdaefd33555536095584b72a5eb6f302fa6fa68ab56ea45e8a847ec90ff4ba076db312c06f91ff672e08e95263c658526582494ce08') # consolidate common dependencies to prevent mishaps @@ -59,6 +61,7 @@ # See https://github.com/intel/mkl-dnn/issues/102 # MKLML version that Tensorflow wants to use is https://github.com/intel/mkl-dnn/releases/tag/v0.21 # patch -Np1 -d tensorflow-${_pkgver} -i "$srcdir"/build-against-actual-mkl.patch + patch -Np1 -d tensorflow-${_pkgver} -i "$srcdir"/48935.patch # Get rid of hardcoded versions. Not like we ever cared about what upstream # thinks about which versions should be used anyway. ;) (FS#68772) @@ -95,9 +98,9 @@ export TF_IGNORE_MAX_BAZEL_VERSION=1 export TF_MKL_ROOT=/opt/intel/mkl export NCCL_INSTALL_PATH=/usr - export GCC_HOST_COMPILER_PATH=/usr/bin/gcc - export HOST_C_COMPILER=/usr/bin/gcc - export HOST_CXX_COMPILER=/usr/bin/g++ + export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-10 + export HOST_C_COMPILER=/usr/bin/gcc-10 + export HOST_CXX_COMPILER=/usr/bin/g++-10 export TF_CUDA_CLANG=0 # Clang currently disabled because it's not compatible at the moment. export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang export TF_CUDA_PATHS=/opt/cuda,/usr/lib,/usr @@ -105,15 +108,10 @@ export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' /usr/include/cudnn_version.h) export TF_CUDA_COMPUTE_CAPABILITIES=5.2,5.3,6.0,6.1,6.2,7.0,7.2,7.5,8.0,8.6 - # Required until https://github.com/tensorflow/tensorflow/issues/39467 is fixed. - export CC=gcc - export CXX=g++ + export CC=gcc-10 + export CXX=g++-10 export BAZEL_ARGS="--config=mkl -c opt --copt=-I/usr/include/openssl-1.0 --host_copt=-I/usr/include/openssl-1.0 --linkopt=-l:libssl.so.1.0.0 --linkopt=-l:libcrypto.so.1.0.0 --host_linkopt=-l:libssl.so.1.0.0 --host_linkopt=-l:libcrypto.so.1.0.0" - - # Workaround for gcc 10+ warnings related to upb. - # See https://github.com/tensorflow/tensorflow/issues/39467 - export BAZEL_ARGS="$BAZEL_ARGS --host_copt=-Wno-stringop-truncation" } build() {
