Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 704490 - sci-libs/tensorflow-2.1.0_rc2 with sci-libs/scipy-1.4.1 - In file included from tensorflow/python/framework/op_def_registry.cc:20: .../python_include/pybind11/detail/common.h:302:12: error: multiple definition of 'enum class pybind11::return_value_policy'
Summary: sci-libs/tensorflow-2.1.0_rc2 with sci-libs/scipy-1.4.1 - In file included fr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jason Zaman
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-01 18:31 UTC by Harris Landgarten
Modified: 2020-01-26 05:35 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harris Landgarten 2020-01-01 18:31:17 UTC
scipy-1.4.1 installs a separate pybind11. Tensorflow builds fail during python section with the following error:

ERROR: /var/tmp/paludis/sci-libs-tensorflow-2.1.0_rc2/work/tensorflow-2.1.0-rc2-python3_6/tensorflow/python/BUILD:1270:1: C++ compilation of rule '//tensorflow/python:_op_def_registry.so' failed (Exit 1): gcc failed: error executing command 
  (cd /var/tmp/paludis/sci-libs-tensorflow-2.1.0_rc2/work/tensorflow-2.1.0-rc2-python3_6-bazel-base/execroot/org_tensorflow && \
  exec env - \
    PATH=/var/tmp/paludis/sci-libs-tensorflow-2.1.0_rc2/temp//python3.6/bin:/var/tmp/paludis/sci-libs-tensorflow-2.1.0_rc2/temp//python3.6/bin:/usr/libexec/paludis/utils/0:/usr/libexec/paludis/utils/1:/usr/libexec/paludis/utils/2:/usr/libexec/paludis/utils/3:/usr/libexec/paludis/utils/4:/usr/libexec/paludis/utils/5:/usr/libexec/paludis/utils/6:/usr/libexec/paludis/utils/7:/usr/libexec/paludis/utils:/usr/bin:/usr/sbin:/bin:/sbin:/usr/lib/llvm/9/bin:/usr/lib/llvm/8/bin:/usr/lib/llvm/7/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/opt/vmware/bin:/opt/cuda/bin:/opt/cuda/libnvvp \
    PWD=/proc/self/cwd \
  /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/host/bin/tensorflow/python/_objs/_op_def_registry.so/op_def_registry.pic.d '-frandom-seed=bazel-out/host/bin/tensorflow/python/_objs/_op_def_registry.so/op_def_registry.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/host/bin -iquote external/com_google_absl -iquote bazel-out/host/bin/external/com_google_absl -iquote external/nsync -iquote bazel-out/host/bin/external/nsync -iquote external/eigen_archive -iquote bazel-out/host/bin/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/host/bin/external/local_config_sycl -iquote external/com_googlesource_code_re2 -iquote bazel-out/host/bin/external/com_googlesource_code_re2 -iquote external/gif -iquote bazel-out/host/bin/external/gif -iquote external/libjpeg_turbo -iquote bazel-out/host/bin/external/libjpeg_turbo -iquote external/com_google_protobuf -iquote bazel-out/host/bin/external/com_google_protobuf -iquote external/farmhash_archive -iquote bazel-out/host/bin/external/farmhash_archive -iquote external/fft2d -iquote bazel-out/host/bin/external/fft2d -iquote external/highwayhash -iquote bazel-out/host/bin/external/highwayhash -iquote external/zlib_archive -iquote bazel-out/host/bin/external/zlib_archive -iquote external/local_config_python -iquote bazel-out/host/bin/external/local_config_python -iquote external/pybind11 -iquote bazel-out/host/bin/external/pybind11 -iquote external/bazel_tools -iquote bazel-out/host/bin/external/bazel_tools -isystem external/eigen_archive -isystem bazel-out/host/bin/external/eigen_archive -isystem external/farmhash_archive/src -isystem bazel-out/host/bin/external/farmhash_archive/src -isystem external/local_config_python/python_include -isystem bazel-out/host/bin/external/local_config_python/python_include -isystem external/pybind11/include -isystem bazel-out/host/bin/external/pybind11/include -g0 -g0 '-std=c++14' -fexceptions '-fvisibility=hidden' -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c tensorflow/python/framework/op_def_registry.cc -o bazel-out/host/bin/tensorflow/python/_objs/_op_def_registry.so/op_def_registry.pic.o)
Execution platform: @bazel_tools//platforms:host_platform
In file included from bazel-out/host/bin/external/local_config_python/python_include/pybind11/pytypes.h:12,
                 from bazel-out/host/bin/external/local_config_python/python_include/pybind11/cast.h:13,
                 from bazel-out/host/bin/external/local_config_python/python_include/pybind11/attr.h:13,
                 from bazel-out/host/bin/external/local_config_python/python_include/pybind11/pybind11.h:44,
                 from ./tensorflow/python/lib/core/pybind11_status.h:21,
                 from tensorflow/python/framework/op_def_registry.cc:20:
bazel-out/host/bin/external/local_config_python/python_include/pybind11/detail/common.h:302:12: error: multiple definition of 'enum class pybind11::return_value_policy'
  302 | enum class return_value_policy : uint8_t {

there are similar errors related to pybind11 headers before the build fails shortly after.
Comment 1 José de Paula Rodrigues 2020-01-06 18:34:38 UTC
Is it possible to make the tensorflow ebuild to temporarily unmerge pybind11, and re-emerge it afterwards? I've done just that (manually), and managed to successfully emerge tensorflow.
Comment 2 Larry the Git Cow gentoo-dev 2020-01-26 05:35:49 UTC
The bug has been closed via the following commit(s):

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

commit 81d6d00f81b49112fcca4b91f2121878db355724
Author:     Jason Zaman <perfinion@gentoo.org>
AuthorDate: 2020-01-25 14:21:01 +0000
Commit:     Jason Zaman <perfinion@gentoo.org>
CommitDate: 2020-01-26 05:35:17 +0000

    sci-libs/tensorflow: bump 2.1.0
    
    Closes: https://bugs.gentoo.org/701334
    Closes: https://bugs.gentoo.org/704490
    Closes: https://bugs.gentoo.org/701342
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Jason Zaman <perfinion@gentoo.org>

 sci-libs/tensorflow/Manifest                       |  3 ++-
 .../files/tensorflow-2.1.0-external_libs.patch     | 26 ----------------------
 .../tensorflow-2.1.0-python3.8-pywrap_tensor.patch | 11 ---------
 ...ow-2.1.0_rc2.ebuild => tensorflow-2.1.0.ebuild} | 14 +++++-------
 4 files changed, 7 insertions(+), 47 deletions(-)