summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaman <perfinion@gentoo.org>2019-08-02 22:21:01 +0800
committerJason Zaman <perfinion@gentoo.org>2019-08-03 19:55:38 +0800
commitb684f751b6ad2029191c65b50ce0eacc4de001a3 (patch)
tree5a73bef7b7e654eda37dea4814f5ae70aa7a6cf8 /sci-libs
parentapp-editors/scite: version bump to 4.2.0 (diff)
downloadgentoo-b684f751b6ad2029191c65b50ce0eacc4de001a3.tar.gz
gentoo-b684f751b6ad2029191c65b50ce0eacc4de001a3.tar.bz2
gentoo-b684f751b6ad2029191c65b50ce0eacc4de001a3.zip
sci-libs/tensorflow-1.14.0-r1: Fix build issues
- Header paths were mangled - Jsoncpp-1.9 build error - Newer GRPC needed a bumped google-cloud-cpp dep - Build failed with python2 if future was not installed - Add tensorflow_cc pkgconfig file Closes: https://bugs.gentoo.org/688594 Closes: https://bugs.gentoo.org/689282 Closes: https://bugs.gentoo.org/690212 Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/tensorflow/files/tensorflow-1.14.0-0002-install_headers-fix-paths-of-generated-headers.patch38
-rw-r--r--sci-libs/tensorflow/files/tensorflow-1.14.0-0003-systemlibs-jsoncpp-update-header-symlinks-for-jsoncp.patch27
-rw-r--r--sci-libs/tensorflow/files/tensorflow-1.14.0-0004-pkgconfig-generate-tensorflow_cc-pkg-config-entry.patch46
-rw-r--r--sci-libs/tensorflow/files/tensorflow-1.14.0-0005-gen_git_source-builtins-does-not-exist-in-python2.patch25
-rw-r--r--sci-libs/tensorflow/tensorflow-1.14.0-r1.ebuild (renamed from sci-libs/tensorflow/tensorflow-1.14.0.ebuild)16
5 files changed, 146 insertions, 6 deletions
diff --git a/sci-libs/tensorflow/files/tensorflow-1.14.0-0002-install_headers-fix-paths-of-generated-headers.patch b/sci-libs/tensorflow/files/tensorflow-1.14.0-0002-install_headers-fix-paths-of-generated-headers.patch
new file mode 100644
index 000000000000..566f28743764
--- /dev/null
+++ b/sci-libs/tensorflow/files/tensorflow-1.14.0-0002-install_headers-fix-paths-of-generated-headers.patch
@@ -0,0 +1,38 @@
+From 5176e1feb22fac2f9d4ca9d8ad261ef6893d3c76 Mon Sep 17 00:00:00 2001
+From: Jason Zaman <jason@perfinion.com>
+Date: Mon, 29 Jul 2019 01:17:06 +0800
+Subject: [PATCH 2/3] install_headers: fix paths of generated headers
+
+Signed-off-by: Jason Zaman <jason@perfinion.com>
+---
+ tensorflow/BUILD | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/tensorflow/BUILD b/tensorflow/BUILD
+index a04ddf9f8a..1e0cc9207b 100644
+--- a/tensorflow/BUILD
++++ b/tensorflow/BUILD
+@@ -703,8 +703,8 @@ genrule(
+ mkdir $@
+ for f in $(SRCS); do
+ d="$${f%/*}"
+- d="$${d#bazel-out*genfiles/}"
+- d="$${d#*external/eigen_archive/}"
++ d="$${d#bazel-out/*/genfiles/}"
++ d="$${d#bazel-out/*/bin/}"
+
+ if [[ $${d} == *local_config_* ]]; then
+ continue
+@@ -716,6 +716,9 @@ genrule(
+ if [[ $${TF_SYSTEM_LIBS:-} == *$${extname}* ]]; then
+ continue
+ fi
++
++ d="$${d#*external/farmhash_archive/src}"
++ d="$${d#*external/$${extname}/}"
+ fi
+
+ mkdir -p "$@/$${d}"
+--
+2.21.0
+
diff --git a/sci-libs/tensorflow/files/tensorflow-1.14.0-0003-systemlibs-jsoncpp-update-header-symlinks-for-jsoncp.patch b/sci-libs/tensorflow/files/tensorflow-1.14.0-0003-systemlibs-jsoncpp-update-header-symlinks-for-jsoncp.patch
new file mode 100644
index 000000000000..3ccdf4933732
--- /dev/null
+++ b/sci-libs/tensorflow/files/tensorflow-1.14.0-0003-systemlibs-jsoncpp-update-header-symlinks-for-jsoncp.patch
@@ -0,0 +1,27 @@
+From 22275f7dbfa2d483ed4778427b137e83144bac3d Mon Sep 17 00:00:00 2001
+From: Jason Zaman <jason@perfinion.com>
+Date: Fri, 2 Aug 2019 20:06:33 +0800
+Subject: [PATCH 3/3] systemlibs: jsoncpp: update header symlinks for jsoncpp
+ 1.9
+
+Signed-off-by: Jason Zaman <jason@perfinion.com>
+---
+ third_party/systemlibs/jsoncpp.BUILD | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/third_party/systemlibs/jsoncpp.BUILD b/third_party/systemlibs/jsoncpp.BUILD
+index 526fd0c418..7d54f9289b 100644
+--- a/third_party/systemlibs/jsoncpp.BUILD
++++ b/third_party/systemlibs/jsoncpp.BUILD
+@@ -6,6 +6,8 @@ filegroup(
+ )
+
+ HEADERS = [
++ "include/json/allocator.h",
++ "include/json/assertions.h",
+ "include/json/autolink.h",
+ "include/json/config.h",
+ "include/json/features.h",
+--
+2.21.0
+
diff --git a/sci-libs/tensorflow/files/tensorflow-1.14.0-0004-pkgconfig-generate-tensorflow_cc-pkg-config-entry.patch b/sci-libs/tensorflow/files/tensorflow-1.14.0-0004-pkgconfig-generate-tensorflow_cc-pkg-config-entry.patch
new file mode 100644
index 000000000000..5e65c413e776
--- /dev/null
+++ b/sci-libs/tensorflow/files/tensorflow-1.14.0-0004-pkgconfig-generate-tensorflow_cc-pkg-config-entry.patch
@@ -0,0 +1,46 @@
+From a8144189b257d515f1eb72a4b50098e9f4abd4ea Mon Sep 17 00:00:00 2001
+From: Jason Zaman <jason@perfinion.com>
+Date: Fri, 2 Aug 2019 22:21:25 +0800
+Subject: [PATCH 4/5] pkgconfig: generate tensorflow_cc pkg-config entry
+
+Signed-off-by: Jason Zaman <jason@perfinion.com>
+---
+ tensorflow/c/generate-pc.sh | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/tensorflow/c/generate-pc.sh b/tensorflow/c/generate-pc.sh
+index 7184ad68fb..a4d51a1b3b 100755
+--- a/tensorflow/c/generate-pc.sh
++++ b/tensorflow/c/generate-pc.sh
+@@ -63,12 +63,26 @@ cat << EOF > tensorflow.pc
+ prefix=${TF_PREFIX}
+ exec_prefix=\${prefix}
+ libdir=\${exec_prefix}/${LIBDIR}
+-includedir=\${prefix}/include
++includedir=\${prefix}/include/tensorflow
+
+ Name: TensorFlow
+ Version: ${TF_VERSION}
+ Description: Library for computation using data flow graphs for scalable machine learning
+ Requires:
+-Libs: -L\${libdir} -ltensorflow
++Libs: -L\${libdir} -ltensorflow -ltensorflow_framework
++Cflags: -I\${includedir}
++EOF
++
++cat << EOF > tensorflow_cc.pc
++prefix=${TF_PREFIX}
++exec_prefix=\${prefix}
++libdir=\${exec_prefix}/${LIBDIR}
++includedir=\${prefix}/include/tensorflow
++
++Name: TensorFlow
++Version: ${TF_VERSION}
++Description: Library for computation using data flow graphs for scalable machine learning
++Requires:
++Libs: -L\${libdir} -ltensorflow_cc -ltensorflow_framework
+ Cflags: -I\${includedir}
+ EOF
+--
+2.21.0
+
diff --git a/sci-libs/tensorflow/files/tensorflow-1.14.0-0005-gen_git_source-builtins-does-not-exist-in-python2.patch b/sci-libs/tensorflow/files/tensorflow-1.14.0-0005-gen_git_source-builtins-does-not-exist-in-python2.patch
new file mode 100644
index 000000000000..fc2e1fe92cb4
--- /dev/null
+++ b/sci-libs/tensorflow/files/tensorflow-1.14.0-0005-gen_git_source-builtins-does-not-exist-in-python2.patch
@@ -0,0 +1,25 @@
+From bdbe7a572ed248bf8e53df200ffa5e66bf77b16f Mon Sep 17 00:00:00 2001
+From: Jason Zaman <jason@perfinion.com>
+Date: Fri, 2 Aug 2019 22:22:53 +0800
+Subject: [PATCH 5/5] gen_git_source: builtins does not exist in python2
+
+Signed-off-by: Jason Zaman <jason@perfinion.com>
+---
+ tensorflow/tools/git/gen_git_source.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/tensorflow/tools/git/gen_git_source.py b/tensorflow/tools/git/gen_git_source.py
+index 6cefd3900b..4d52c1fccf 100755
+--- a/tensorflow/tools/git/gen_git_source.py
++++ b/tensorflow/tools/git/gen_git_source.py
+@@ -26,7 +26,6 @@ NOTE: this script is only used in opensource.
+ from __future__ import absolute_import
+ from __future__ import division
+ from __future__ import print_function
+-from builtins import bytes # pylint: disable=redefined-builtin
+ import argparse
+ import json
+ import os
+--
+2.21.0
+
diff --git a/sci-libs/tensorflow/tensorflow-1.14.0.ebuild b/sci-libs/tensorflow/tensorflow-1.14.0-r1.ebuild
index 934280200207..0d050e7f370c 100644
--- a/sci-libs/tensorflow/tensorflow-1.14.0.ebuild
+++ b/sci-libs/tensorflow/tensorflow-1.14.0-r1.ebuild
@@ -53,7 +53,7 @@ RDEPEND="
dev-db/lmdb
dev-db/sqlite
dev-libs/icu
- >=dev-libs/jsoncpp-1.8.4
+ >=dev-libs/jsoncpp-1.9
dev-libs/libpcre
dev-libs/nsync
dev-libs/openssl:0=
@@ -62,7 +62,7 @@ RDEPEND="
media-libs/giflib
media-libs/libjpeg-turbo
media-libs/libpng:0
- >=net-libs/grpc-1.16.0
+ >=net-libs/grpc-1.22.0
net-misc/curl
sys-libs/zlib
>=sys-apps/hwloc-2
@@ -82,9 +82,9 @@ RDEPEND="
>=dev-python/protobuf-python-3.6.0[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
dev-python/termcolor[${PYTHON_USEDEP}]
- dev-python/grpcio[${PYTHON_USEDEP}]
+ >=dev-python/grpcio-1.22.0[${PYTHON_USEDEP}]
>=dev-python/wrapt-1.11.1[${PYTHON_USEDEP}]
- >=net-libs/google-cloud-cpp-0.9.0
+ >=net-libs/google-cloud-cpp-0.10.0
>=sci-libs/keras-applications-1.0.6[${PYTHON_USEDEP}]
>=sci-libs/keras-preprocessing-1.0.5[${PYTHON_USEDEP}]
>=sci-visualization/tensorboard-1.13.0[${PYTHON_USEDEP}]
@@ -112,7 +112,7 @@ BDEPEND="
)
!python? ( dev-lang/python )
python? (
- dev-python/grpcio-tools
+ >=dev-python/grpcio-tools-1.22.0
)"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
@@ -120,6 +120,10 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}/tensorflow-1.14.0-0001-systemlibs-unbundle-enum34.patch"
+ "${FILESDIR}/tensorflow-1.14.0-0002-install_headers-fix-paths-of-generated-headers.patch"
+ "${FILESDIR}/tensorflow-1.14.0-0003-systemlibs-jsoncpp-update-header-symlinks-for-jsoncp.patch"
+ "${FILESDIR}/tensorflow-1.14.0-0004-pkgconfig-generate-tensorflow_cc-pkg-config-entry.patch"
+ "${FILESDIR}/tensorflow-1.14.0-0005-gen_git_source-builtins-does-not-exist-in-python2.patch"
)
DOCS=( AUTHORS CONTRIBUTING.md ISSUE_TEMPLATE.md README.md RELEASE.md )
CHECKREQS_MEMORY="5G"
@@ -328,7 +332,7 @@ src_install() {
# Generate pkg-config file
${PN}/c/generate-pc.sh --prefix="${EPREFIX}"/usr --libdir=$(get_libdir) --version=${MY_PV} || die
insinto /usr/$(get_libdir)/pkgconfig
- doins ${PN}.pc
+ doins ${PN}.pc ${PN}_cc.pc
for l in libtensorflow{,_framework,_cc}.so; do
dolib.so bazel-bin/tensorflow/${l}