tensorflow bazel建筑失败

2024-10-02 08:30:01 发布

您现在位置:Python中文网/ 问答频道 /正文

建筑tf(在this之后)

./configure && bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package失败:

root@commandor:/opt/tf/sc/tensorflow# bazel build --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" --config=opt //tensorflow/tools/pip_package:build_pip_package
WARNING: /home/ertosns/.cache/bazel/_bazel_root/502c46fd2b7f9ff136e0381cc7e075fe/external/protobuf_archive/WORKSPACE:1: Workspace name in /home/ertosns/.cache/bazel/_bazel_root/502c46fd2b7f9ff136e0381cc7e075fe/external/protobuf_archive/WORKSPACE (@com_google_protobuf) does not match the name given in the repository's definition (@protobuf_archive); this will cause a build error in future versions
ERROR: /home/ertosns/.cache/bazel/_bazel_root/502c46fd2b7f9ff136e0381cc7e075fe/external/jpeg/BUILD:126:12: Illegal ambiguous match on configurable attribute "deps" in @jpeg//:jpeg:
@jpeg//:k8
@jpeg//:armeabi-v7a
Multiple matches are not allowed unless one is unambiguously more specialized.
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: 

/home/ertosns/.cache/bazel/_bazel_root/502c46fd2b7f9ff136e0381cc7e075fe/external/jpeg/BUILD:126:12: Illegal ambiguous match on configurable attribute "deps" in @jpeg//:jpeg:
@jpeg//:k8
@jpeg//:armeabi-v7a
Multiple matches are not allowed unless one is unambiguously more specialized.
INFO: Elapsed time: 10.065s
FAILED: Build did NOT complete successfully (97 packages loaded)
    currently loading: tensorflow/contrib/data/kernels ... (3 packages)

不太熟悉bazel,但是根据this条件,需要传递针对jpeg的参数,到底是什么参数,为什么指南没有提到这一点?在

在Python2.7、3.6下构建r1.6版本都失败了,并出现了相同的错误。在

配置过程:拒绝除jemalloc之外的所有支持。在

^{pr2}$

我试图构建源代码,因为在卸载tensorflow并重新安装之后,它没有工作!虽然它在以前的版本中可以工作,但是在Ubuntu17.xx上,当前的ubuntu版本是17.10

谷歌群组discussion

my previous question关于同一主题,但针对不同的问题。在


Tags: pipinbuildpackagecachehometensorflowroot
2条回答

看来bazel的0.12版本导致了这个问题,请尝试将其降级到0.11。在

我也遇到了同样的问题,Bazel 0.12,回到Bazel 0.11,从我做起:

$ curl -LO "https://github.com/bazelbuild/bazel/releases/download/0.11.1/bazel_0.11.1-linux-x86_64.deb" 

$ sudo dpkg -i bazel_*.deb

相关问题 更多 >

    热门问题