Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 690212 - sci-libs/tensorflow-1.14.0 fails to rebuild with net-libs/grpc-1.22.0 - error: using typedef-name 'grpc::ServerContext' after 'class'
Summary: sci-libs/tensorflow-1.14.0 fails to rebuild with net-libs/grpc-1.22.0 - error...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-19 12:56 UTC by Helmut Jarausch
Modified: 2019-08-03 12:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log xz-compressed (tensorflow-1.14.0.build.xz,146.21 KB, application/x-xz)
2019-07-19 12:56 UTC, Helmut Jarausch
Details
emerge --info (tensorflow.info,21.50 KB, application/x-info)
2019-07-19 12:56 UTC, Helmut Jarausch
Details
build log (gzip) (tensorflow-1.14.0-grpc1.22.build.gz,553.85 KB, application/gzip)
2019-07-24 14:42 UTC, arno.hilke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2019-07-19 12:56:11 UTC
Created attachment 583572 [details]
build log  xz-compressed

First, downgrading to net-libs/grpc-1.12.1-r1 fixes the problem below.
I'm not sure if it is a grpc or a tensorflow problem.

Trying to build tensorflow-1.14.0 with net-libs/grpc-1.22.0
gives

ERROR: /var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python3_7/tensorflow/contrib/bigtable/BUILD:90:1: C++ compilation of rule '//tensorflow/contrib/bigtable:bigtable_lib_cc' failed (Exit 1): gcc failed: error executing command 
  (cd /var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python3_7-bazel-base/execroot/org_tensorflow && \
  exec env - \
    HOME=/var/tmp/portage/sci-libs/tensorflow-1.14.0/homedir \
    PATH=/var/tmp/portage/sci-libs/tensorflow-1.14.0/temp/python3.7/bin:/var/tmp/portage/sci-libs/tensorflow-1.14.0/temp/python3.7/bin:/usr/lib/portage/python3.7/ebuild-helpers:/usr/lib/llvm/8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin \
    PWD=/proc/self/cwd \
    PYTHON_BIN_PATH=/usr/bin/python3.7 \
    PYTHON_LIB_PATH=/usr/lib/python3.7/site-packages \
    TF_CONFIGURE_IOS=0 \
    TF_DOWNLOAD_CLANG=0 \
    TF_NEED_CUDA=0 \
    TF_NEED_OPENCL_SYCL=0 \
    TF_NEED_ROCM=0 \
    TF_SYSTEM_LIBS=absl_py,astor_archive,boringssl,com_github_googleapis_googleapis,com_github_googlecloudplatform_google_cloud_cpp,com_google_protobuf,com_google_protobuf_cc,com_googlesource_code_re2,curl,cython,double_conversion,enum34_archive,flatbuffers,gast_archive,gif_archive,grpc,hwloc,icu,jpeg,jsoncpp_git,keras_applications_archive,lmdb,nasm,nsync,org_sqlite,pasta,pcre,png_archive,protobuf_archive,six_archive,snappy,swig,termcolor_archive,wrapt,zlib_archive \
  /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections '-std=c++0x' -MD -MF bazel-out/k8-opt/bin/tensorflow/contrib/bigtable/_objs/bigtable_lib_cc/bigtable_lib.pic.d '-frandom-seed=bazel-out/k8-opt/bin/tensorflow/contrib/bigtable/_objs/bigtable_lib_cc/bigtable_lib.pic.o' -fPIC -D__CLANG_SUPPORT_DYN_ANNOTATION__ -DEIGEN_MPL2_ONLY '-DEIGEN_MAX_ALIGN_BYTES=64' '-DEIGEN_HAS_TYPE_TRAITS=0' -iquote . -iquote bazel-out/k8-opt/bin -iquote external/com_google_absl -iquote bazel-out/k8-opt/bin/external/com_google_absl -iquote external/eigen_archive -iquote bazel-out/k8-opt/bin/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/k8-opt/bin/external/local_config_sycl -iquote external/com_github_googlecloudplatform_google_cloud_cpp -iquote bazel-out/k8-opt/bin/external/com_github_googlecloudplatform_google_cloud_cpp -isystem external/eigen_archive -isystem bazel-out/k8-opt/bin/external/eigen_archive '-march=native' -O2 -maes -mavx -mavx2 -mf16c -mfma -mmmx -mpclmul -mpopcnt -msse -msse2 -msse3 -msse4.1 -msse4.2 -msse4a -mssse3 -pipe '-std=c++17' -msse -msse2 -msse3 -msse4.1 -msse4.2 -mavx -mavx2 -mfma -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c tensorflow/contrib/bigtable/kernels/bigtable_lib.cc -o bazel-out/k8-opt/bin/tensorflow/contrib/bigtable/_objs/bigtable_lib_cc/bigtable_lib.pic.o)
Execution platform: @bazel_tools//platforms:host_platform
In file included from /usr/include/google/cloud/bigtable/data_client.h:22,
                 from ./tensorflow/contrib/bigtable/kernels/bigtable_lib.h:19,
                 from tensorflow/contrib/bigtable/kernels/bigtable_lib.cc:16:
/usr/include/google/bigtable/v2/bigtable.grpc.pb.h:52:7: 
error: using typedef-name 'grpc::ServerContext' after 'class'
   52 | class ServerContext;
      |       ^~~~~~~~~~~~~
In file included from /usr/include/grpcpp/impl/codegen/server_interface.h:29,
                 from /usr/include/grpcpp/server_impl.h:36,
                 from /usr/include/grpcpp/server.h:22,
                 from /usr/include/grpcpp/grpcpp.h:57,
                 from /usr/include/google/cloud/bigtable/client_options.h:20,
                 from /usr/include/google/cloud/bigtable/data_client.h:18,
                 from ./tensorflow/contrib/bigtable/kernels/bigtable_lib.h:19,
                 from tensorflow/contrib/bigtable/kernels/bigtable_lib.cc:16:
Comment 1 Helmut Jarausch 2019-07-19 12:56:39 UTC
Created attachment 583574 [details]
emerge --info
Comment 2 arno.hilke 2019-07-24 14:42:31 UTC
Created attachment 584294 [details]
build log (gzip)

I am facing the same problem
Comment 3 Cynede (RETIRED) gentoo-dev 2019-07-29 09:04:21 UTC
same
Comment 4 Larry the Git Cow gentoo-dev 2019-08-03 12:04:44 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b684f751b6ad2029191c65b50ce0eacc4de001a3

commit b684f751b6ad2029191c65b50ce0eacc4de001a3
Author:     Jason Zaman <perfinion@gentoo.org>
AuthorDate: 2019-08-02 14:21:01 +0000
Commit:     Jason Zaman <perfinion@gentoo.org>
CommitDate: 2019-08-03 11:55:38 +0000

    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>

 ...ll_headers-fix-paths-of-generated-headers.patch | 38 ++++++++++++++++++
 ...jsoncpp-update-header-symlinks-for-jsoncp.patch | 27 +++++++++++++
 ...g-generate-tensorflow_cc-pkg-config-entry.patch | 46 ++++++++++++++++++++++
 ...source-builtins-does-not-exist-in-python2.patch | 25 ++++++++++++
 ...w-1.14.0.ebuild => tensorflow-1.14.0-r1.ebuild} | 16 +++++---
 5 files changed, 146 insertions(+), 6 deletions(-)