Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 688594 - sci-libs/tensorflow-1.14.0 - .../work/tensorflow-1.14.0-python2_7-bazel-base/external/org_tensorflow/tensorflow/tools/git/gen_git_source.py: ImportError: No module named builtins
Summary: sci-libs/tensorflow-1.14.0 - .../work/tensorflow-1.14.0-python2_7-bazel-base/...
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: 2019-06-24 09:02 UTC by borysdyczko
Modified: 2019-08-03 12:04 UTC (History)
1 user (show)

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


Attachments
emerge output (log,11.01 KB, text/plain)
2019-06-24 09:02 UTC, borysdyczko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description borysdyczko 2019-06-24 09:02:55 UTC
Created attachment 580620 [details]
emerge output

sci-libs/tensorflow-1.14.0 failed to build with error: 
ImportError: No module named builtins

I installed dev-python/future manually, then tensorflow was built successfully.
Comment 1 picnic.sun 2019-07-07 06:47:03 UTC
INFO: Build completed successfully, 22 total actions
 * python2_7: running run_in_build_dir do_compile
bazel --bazelrc=/var/tmp/portage/sci-libs/tensorflow-1.14.0/temp/bazelrc --output_base=/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7-bazel-base build //tensorflow/tools/pip_package:build_pip_package
WARNING: ignoring LD_PRELOAD in environment.
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Analyzing: target //tensorflow/tools/pip_package:build_pip_package (1 packages loaded)
Analyzing: target //tensorflow/tools/pip_package:build_pip_package (1 packages loaded, 0 targets configured)
Analyzing: target //tensorflow/tools/pip_package:build_pip_package (66 packages loaded, 37 targets configured)
Analyzing: target //tensorflow/tools/pip_package:build_pip_package (68 packages loaded, 38 targets configured)
Analyzing: target //tensorflow/tools/pip_package:build_pip_package (78 packages loaded, 126 targets configured)
Analyzing: target //tensorflow/tools/pip_package:build_pip_package (105 packages loaded, 165 targets configured)
Analyzing: target //tensorflow/tools/pip_package:build_pip_package (132 packages loaded, 189 targets configured)
Analyzing: target //tensorflow/tools/pip_package:build_pip_package (162 packages loaded, 1191 targets configured)
Traceback (most recent call last):
  File "/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7-bazel-base/external/org_tensorflow/tensorflow/tools/git/gen_git_source.py", line 29, in <module>
    from builtins import bytes  # pylint: disable=redefined-builtin
ImportError: No module named builtins
ERROR: /var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7/tensorflow/core/BUILD:2750:1: no such package '@local_config_git//': Traceback (most recent call last):
        File "/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7/third_party/git/git_configure.bzl", line 61
                _fail(result.stderr)
        File "/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7/third_party/git/git_configure.bzl", line 14, in _fail
                fail(("%sGit Configuration Error:%s %...)))
Git Configuration Error: Traceback (most recent call last):
  File "/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7-bazel-base/external/org_tensorflow/tensorflow/tools/git/gen_git_source.py", line 29, in <module>
    from builtins import bytes  # pylint: disable=redefined-builtin
ImportError: No module named builtins

 and referenced by '//tensorflow/core:version_info_gen'
ERROR: /var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7/tensorflow/core/BUILD:2750:1: no such package '@local_config_git//': Traceback (most recent call last):
        File "/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7/third_party/git/git_configure.bzl", line 61
                _fail(result.stderr)
        File "/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7/third_party/git/git_configure.bzl", line 14, in _fail
                fail(("%sGit Configuration Error:%s %...)))
Git Configuration Error: Traceback (most recent call last):
  File "/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7-bazel-base/external/org_tensorflow/tensorflow/tools/git/gen_git_source.py", line 29, in <module>
    from builtins import bytes  # pylint: disable=redefined-builtin
ImportError: No module named builtins

 and referenced by '//tensorflow/core:version_info_gen'
ERROR: /var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7/tensorflow/core/BUILD:2750:1: no such package '@local_config_git//': Traceback (most recent call last):
        File "/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7/third_party/git/git_configure.bzl", line 61
                _fail(result.stderr)
        File "/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7/third_party/git/git_configure.bzl", line 14, in _fail
                fail(("%sGit Configuration Error:%s %...)))
Git Configuration Error: Traceback (most recent call last):
  File "/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7-bazel-base/external/org_tensorflow/tensorflow/tools/git/gen_git_source.py", line 29, in <module>
    from builtins import bytes  # pylint: disable=redefined-builtin
ImportError: No module named builtins

 and referenced by '//tensorflow/core:version_info_gen'
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: no such package '@local_config_git//': Traceback (most recent call last):
        File "/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7/third_party/git/git_configure.bzl", line 61
                _fail(result.stderr)
        File "/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7/third_party/git/git_configure.bzl", line 14, in _fail
                fail(("%sGit Configuration Error:%s %...)))
Git Configuration Error: Traceback (most recent call last):
  File "/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7-bazel-base/external/org_tensorflow/tensorflow/tools/git/gen_git_source.py", line 29, in <module>
    from builtins import bytes  # pylint: disable=redefined-builtin
ImportError: No module named builtins

INFO: Elapsed time: 13.874s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (166 packages loaded, 1917 targets configured)
FAILED: Build did NOT complete successfully (166 packages loaded, 1917 targets configured)
 * ERROR: sci-libs/tensorflow-1.14.0::gentoo failed (compile phase):
 *   ebazel failed
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called src_compile
 *   environment, line 3822:  Called python_foreach_impl 'run_in_build_dir' 'do_compile'
 *   environment, line 3279:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'run_in_build_dir' 'do_compile'
 *   environment, line 2573:  Called _multibuild_run '_python_multibuild_wrapper' 'run_in_build_dir' 'do_compile'
 *   environment, line 2571:  Called _python_multibuild_wrapper 'run_in_build_dir' 'do_compile'
 *   environment, line  874:  Called run_in_build_dir 'do_compile'
 *   environment, line 3793:  Called do_compile
 *   environment, line 3818:  Called ebazel 'build' '//tensorflow/tools/pip_package:build_pip_package'
 *   environment, line 1916:  Called die
 * The specific snippet of code:
 *       "${@}" || die "ebazel failed"
 * 
 * If you need support, post the output of `emerge --info '=sci-libs/tensorflow-1.14.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sci-libs/tensorflow-1.14.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sci-libs/tensorflow-1.14.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sci-libs/tensorflow-1.14.0/temp/environment'.
 * Working directory: '/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0-python2_7'
 * S: '/var/tmp/portage/sci-libs/tensorflow-1.14.0/work/tensorflow-1.14.0'

>>> Failed to emerge sci-libs/tensorflow-1.14.0, Log file:

>>>  '/var/tmp/portage/sci-libs/tensorflow-1.14.0/temp/build.log'
Comment 2 Larry the Git Cow gentoo-dev 2019-08-03 12:04:47 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(-)