Date: Saturday, November 10, 2018 @ 03:17:00 Author: svenstaro Revision: 405615
upgpkg: tensorflow 1.12.0-1 Added: tensorflow/trunk/explicitly_import_bazelrc.patch tensorflow/trunk/protobuf-version-bump.patch Modified: tensorflow/trunk/PKGBUILD tensorflow/trunk/protobuf-python37-apply.patch tensorflow/trunk/protobuf-python37.patch ---------------------------------+ PKGBUILD | 41 ++++++++++++++++++++++++-------------- explicitly_import_bazelrc.patch | 24 ++++++++++++++++++++++ protobuf-python37-apply.patch | 6 ++--- protobuf-python37.patch | 6 ++--- protobuf-version-bump.patch | 30 +++++++++++++++++++++++++++ 5 files changed, 86 insertions(+), 21 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-11-10 01:37:23 UTC (rev 405614) +++ PKGBUILD 2018-11-10 03:17:00 UTC (rev 405615) @@ -4,32 +4,41 @@ pkgbase=tensorflow pkgname=(tensorflow tensorflow-opt tensorflow-cuda tensorflow-opt-cuda python-tensorflow python-tensorflow-opt python-tensorflow-cuda python-tensorflow-opt-cuda) -pkgver=1.11.0 -_pkgver=1.11.0 -pkgrel=2 +pkgver=1.12.0 +_pkgver=1.12.0 +pkgrel=1 pkgdesc="Library for computation using data flow graphs for scalable machine learning" url="https://www.tensorflow.org/" license=('APACHE') arch=('x86_64') +depends=('c-ares') makedepends=('bazel' 'python-numpy' 'cuda' 'nvidia-utils' 'nccl' 'cudnn' 'python-pip' 'python-wheel' 'python-setuptools' 'python-h5py' 'python-keras-applications' 'python-keras-preprocessing') optdepends=('tensorboard: Tensorflow visualization toolkit') source=("https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz" - python37.patch + # python37.patch + protobuf-version-bump.patch protobuf-python37.patch - protobuf-python37-apply.patch) -sha512sums=('26e9542c43e11a663cbc5cf42859ae7b6dc0e92cfa88775fd4d1badba7f08c59b60c05010fd9f3ec501313be5c042f39b17323bb4753babf365ba2a48af836c2' - '9e3954c10f9dc11d3b6a6a0162061511eaa81b934debaf4f159f11f60e235e6f2762a216d10927695497e8cf7065855d343cd1573727da3f6355e669ea7c6788' - 'a248658d9466bd3aba854b429ce2c1981c5efff5196dead7b2a8c216b9a6cac781a9f487db5ff4513becc4e6d6cc14c494768a859e1f51a9eea848d8f0178204' - '081ff5e35b643c63d3fc28d75266fe13fe70f8f274c862ff7959ec360654ae15593e8c45379a6b23c91fb475af6b9315188f3bfec866fddbbb86a0613d3aa738') + protobuf-python37-apply.patch + # try_import.patch + explicitly_import_bazelrc.patch) +sha512sums=('b145a9118856aa00a829ab6af89bff4e1e131371c96d77b07532544112803c4574d97ef224b28a64437a2af8db4286786dc0b4123efe110b2aa734b443a7e238' + 'b9821d8eed1bb0125ddb8ebc46e8a4b8630789aac9b35aa4ecf24459476370f8b57fcf016952d7b7b61bee4177124abba343b7c9e956645b8895d2680f84e29a' + 'c5e24f584153752e7e22f472c8b0378dce8d0e07fa44598f571d27707d1ac5d0917ca1b6556c59259ef27c1405da6f83b9080ed803550ae6a6121ea3054d3111' + 'e13399375a8d61f695f67be20d86570b0e7e9b8682ea00eb689b3638e2b12ce50cb45fbe46f2ce1b1f065d043a29b8fac1b96eeec01317415ef2d8b51ac8332a' + 'b4567bef73007c388ae782cda0b9f2e06c7d87de03e97dfd99e258275cd60be8a1fa07359eae24316f9d059e00b6abc632d7c72f84318de1a6f4902f59d6fd8e') prepare() { # https://github.com/tensorflow/tensorflow/issues/20517 # patch -d tensorflow-${_pkgver} -Np1 -i ${srcdir}/python37.patch # https://github.com/tensorflow/tensorflow/issues/20950 + patch -d tensorflow-${_pkgver} -Np1 -i ${srcdir}/protobuf-version-bump.patch patch -d tensorflow-${_pkgver} -Np1 -i ${srcdir}/protobuf-python37-apply.patch + # https://github.com/protocolbuffers/protobuf/issues/4086 cp ${srcdir}/protobuf-python37.patch tensorflow-${_pkgver}/third_party/ + # https://github.com/tensorflow/tensorflow/issues/23402 + patch -d "tensorflow-${_pkgver}" -Np1 -i "${srcdir}/explicitly_import_bazelrc.patch" cp -r tensorflow-${_pkgver} tensorflow-${_pkgver}-opt cp -r tensorflow-${_pkgver} tensorflow-${_pkgver}-cuda @@ -51,6 +60,8 @@ export TF_NEED_MPI=0 export TF_NEED_TENSORRT=0 export TF_NEED_NGRAPH=0 + export TF_NEED_IGNITE=0 + export TF_NEED_ROCM=0 export TF_SET_ANDROID_WORKSPACE=0 export TF_DOWNLOAD_CLANG=0 export TF_NCCL_VERSION=2.3 @@ -130,7 +141,7 @@ } package_tensorflow-cuda() { - depends=(cuda cudnn nccl) + depends+=(cuda cudnn nccl) conflicts=(tensorflow) provides=(tensorflow) pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)" @@ -146,7 +157,7 @@ } package_tensorflow-opt-cuda() { - depends=(cuda cudnn nccl) + depends+=(cuda cudnn nccl) conflicts=(tensorflow) provides=(tensorflow tensorflow-cuda) pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)" @@ -162,7 +173,7 @@ } package_python-tensorflow() { - depends=(python-termcolor python-astor python-gast python-numpy python-protobuf absl-py python-h5py python-keras-applications python-keras-preprocessing) + depends+=(python-termcolor python-astor python-gast python-numpy python-protobuf absl-py python-h5py python-keras-applications python-keras-preprocessing) cd ${srcdir}/tensorflow-${_pkgver} @@ -178,7 +189,7 @@ } package_python-tensorflow-opt() { - depends=(python-termcolor python-astor python-gast python-numpy python-protobuf absl-py python-h5py python-keras-applications python-keras-preprocessing) + depends+=(python-termcolor python-astor python-gast python-numpy python-protobuf absl-py python-h5py python-keras-applications python-keras-preprocessing) conflicts=(python-tensorflow) provides=(python-tensorflow) pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CPU optimizations)" @@ -197,7 +208,7 @@ } package_python-tensorflow-cuda() { - depends=(python-termcolor python-astor python-gast python-numpy cuda cudnn python-pycuda python-protobuf absl-py nccl python-h5py python-keras-applications python-keras-preprocessing) + depends+=(python-termcolor python-astor python-gast python-numpy cuda cudnn python-pycuda python-protobuf absl-py nccl python-h5py python-keras-applications python-keras-preprocessing) conflicts=(python-tensorflow) provides=(python-tensorflow) pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)" @@ -216,7 +227,7 @@ } package_python-tensorflow-opt-cuda() { - depends=(python-termcolor python-astor python-gast python-numpy cuda cudnn python-pycuda python-protobuf absl-py nccl python-h5py python-keras-applications python-keras-preprocessing) + depends+=(python-termcolor python-astor python-gast python-numpy cuda cudnn python-pycuda python-protobuf absl-py nccl python-h5py python-keras-applications python-keras-preprocessing) conflicts=(python-tensorflow) provides=(python-tensorflow python-tensorflow-cuda) pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)" Added: explicitly_import_bazelrc.patch =================================================================== --- explicitly_import_bazelrc.patch (rev 0) +++ explicitly_import_bazelrc.patch 2018-11-10 03:17:00 UTC (rev 405615) @@ -0,0 +1,24 @@ +From 03e63a291bc95dacaa821585f39a360b43465cb5 Mon Sep 17 00:00:00 2001 +From: Yun Peng <pclo...@google.com> +Date: Wed, 7 Nov 2018 11:18:53 +0100 +Subject: [PATCH] Explicitly import tools/bazel.rc + +To fix build with Bazel 0.19.0 or later and it won't break build with old version or Bazel +Fixes https://github.com/tensorflow/tensorflow/issues/23398 +--- + configure.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/configure.py b/configure.py +index 2eeeceb3399c..2d2bcd8d5838 100644 +--- a/configure.py ++++ b/configure.py +@@ -1555,6 +1555,9 @@ def main(): + check_bazel_version('0.15.0') + + reset_tf_configure_bazelrc() ++ # Explicitly import tools/bazel.rc, this is needed for Bazel 0.19.0 or later ++ write_to_bazelrc('import %workspace%/tools/bazel.rc') ++ + cleanup_makefile() + setup_python(environ_cp) Modified: protobuf-python37-apply.patch =================================================================== --- protobuf-python37-apply.patch 2018-11-10 01:37:23 UTC (rev 405614) +++ protobuf-python37-apply.patch 2018-11-10 03:17:00 UTC (rev 405615) @@ -3,25 +3,25 @@ --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -377,6 +377,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): - urls = PROTOBUF_URLS, sha256 = PROTOBUF_SHA256, strip_prefix = PROTOBUF_STRIP_PREFIX, + urls = PROTOBUF_URLS, + patch_file = clean_dep("//third_party:protobuf-python37.patch"), ) # We need to import the protobuf library under the names com_google_protobuf @@ -387,6 +388,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): - urls = PROTOBUF_URLS, sha256 = PROTOBUF_SHA256, strip_prefix = PROTOBUF_STRIP_PREFIX, + urls = PROTOBUF_URLS, + patch_file = clean_dep("//third_party:protobuf-python37.patch"), ) tf_http_archive( @@ -394,6 +396,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): - urls = PROTOBUF_URLS, sha256 = PROTOBUF_SHA256, strip_prefix = PROTOBUF_STRIP_PREFIX, + urls = PROTOBUF_URLS, + patch_file = clean_dep("//third_party:protobuf-python37.patch"), ) Modified: protobuf-python37.patch =================================================================== --- protobuf-python37.patch 2018-11-10 01:37:23 UTC (rev 405614) +++ protobuf-python37.patch 2018-11-10 03:17:00 UTC (rev 405615) @@ -1,7 +1,7 @@ -From 0a59054c30e4f0ba10f10acfc1d7f3814c63e1a7 Mon Sep 17 00:00:00 2001 +From 5c42943e75231b79f4ffcc37a22f0077a2fb0e7d Mon Sep 17 00:00:00 2001 From: Ben Webb <b...@salilab.org> -Date: Thu, 12 Jul 2018 10:58:10 -0700 -Subject: [PATCH] Add Python 3.7 compatibility (#4862) +Date: Tue, 3 Jul 2018 09:51:09 -0700 +Subject: [PATCH] Add Python 3.7 compatibility Compilation of Python wrappers fails with Python 3.7 because the Python folks changed their C API such that Added: protobuf-version-bump.patch =================================================================== --- protobuf-version-bump.patch (rev 0) +++ protobuf-version-bump.patch 2018-11-10 03:17:00 UTC (rev 405615) @@ -0,0 +1,30 @@ +From 3e8295b03eac9c0e84ca6707000bade78c360221 Mon Sep 17 00:00:00 2001 +From: Michael <michae...@users.noreply.github.com> +Date: Fri, 2 Nov 2018 12:52:38 +0000 +Subject: [PATCH] Update protobuf for Python 3.7 compat + +Regards tensorflow/tensorflow#20517 +--- + tensorflow/workspace.bzl | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl +index 08739f15548f..60a54bec1900 100755 +--- a/tensorflow/workspace.bzl ++++ b/tensorflow/workspace.bzl +@@ -345,11 +345,11 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): + ) + + PROTOBUF_URLS = [ +- "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz", +- "https://github.com/google/protobuf/archive/v3.6.0.tar.gz", ++ "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.1.tar.gz", ++ "https://github.com/google/protobuf/archive/v3.6.1.tar.gz", + ] +- PROTOBUF_SHA256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4" +- PROTOBUF_STRIP_PREFIX = "protobuf-3.6.0" ++ PROTOBUF_SHA256 = "3d4e589d81b2006ca603c1ab712c9715a76227293032d05b26fca603f90b3f5b" ++ PROTOBUF_STRIP_PREFIX = "protobuf-3.6.1" + + tf_http_archive( + name = "protobuf_archive",