Bazel build crashes while building a python package on Ubuntu. Full report:
Bazel在Ubuntu上构建python包时发生崩溃。完整的报告:
sudo bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
Tue Mar 14 02:41:24 IST 2017 : === Using tmpdir: /tmp/tmp.ZAETGIkAd2
~/git/tensorflow/bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles
~/git/tensorflow
~/git/tensorflow
/tmp/tmp.ZAETGIkAd2 ~/git/tensorflow
Tue Mar 14 02:41:26 IST 2017 : === Building wheel
error: can't copy 'tensorflow/python/pywrap_tensorflow_internal.py': doesn't exist or not a regular file
I have seen the earlier bug reports filed on this and have installed swig
that is required for TensorFlow on Ubuntu. Still same error log.
我已经看到了早期的bug报告,并且已经安装了在Ubuntu上的TensorFlow需要的swig。还是同样的错误日志。
System details
系统细节
uname -a
:
uname -:
Linux - 3.13.0-107-generic
Linux - 3.13.0-107-generic
2 个解决方案
#1
1
This is most likely not a problem with the build_pip_package command. I had a failed bazel build
command that I have erroneously overlooked.
这很可能不是build_pip_package命令的问题。我有一个失败的bazel构建命令,我错误地忽略了它。
Here is the error log:
这里是错误日志:
ERROR: /home/annanay/.cache/bazel/_bazel_root/9b62c7240de3d9136528cdded945b550/external/llvm/BUILD:418:5: Generating code from table: lib/Target/AArch64/AArch64.td @llvm//:aarch64_target_gen__gen_fast_isel_genrule failed: bash failed: error executing command
(cd /home/annanay/.cache/bazel/_bazel_root/9b62c7240de3d9136528cdded945b550/execroot/tensorflow && \
exec env - \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin \
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/external/llvm/llvm-tblgen -I external/llvm/include -I external/llvm/tools/clang/include -I $(dirname external/llvm/lib/Target/AArch64/AArch64.td) -gen-fast-isel external/llvm/lib/Target/AArch64/AArch64.td -o bazel-out/local-opt/genfiles/external/llvm/lib/Target/AArch64/AArch64GenFastISel.inc'): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 127.
bazel-out/host/bin/external/llvm/llvm-tblgen: relocation error: bazel-out/host/bin/external/llvm/llvm-tblgen: symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
Target //tensorflow/tools/pip_package:build_pip_package failed to build
#2
0
Try to change from build directory to some other directory. This works for me.
尝试从构建目录切换到其他目录。这适合我。
#1
1
This is most likely not a problem with the build_pip_package command. I had a failed bazel build
command that I have erroneously overlooked.
这很可能不是build_pip_package命令的问题。我有一个失败的bazel构建命令,我错误地忽略了它。
Here is the error log:
这里是错误日志:
ERROR: /home/annanay/.cache/bazel/_bazel_root/9b62c7240de3d9136528cdded945b550/external/llvm/BUILD:418:5: Generating code from table: lib/Target/AArch64/AArch64.td @llvm//:aarch64_target_gen__gen_fast_isel_genrule failed: bash failed: error executing command
(cd /home/annanay/.cache/bazel/_bazel_root/9b62c7240de3d9136528cdded945b550/execroot/tensorflow && \
exec env - \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin \
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/external/llvm/llvm-tblgen -I external/llvm/include -I external/llvm/tools/clang/include -I $(dirname external/llvm/lib/Target/AArch64/AArch64.td) -gen-fast-isel external/llvm/lib/Target/AArch64/AArch64.td -o bazel-out/local-opt/genfiles/external/llvm/lib/Target/AArch64/AArch64GenFastISel.inc'): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 127.
bazel-out/host/bin/external/llvm/llvm-tblgen: relocation error: bazel-out/host/bin/external/llvm/llvm-tblgen: symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
Target //tensorflow/tools/pip_package:build_pip_package failed to build
#2
0
Try to change from build directory to some other directory. This works for me.
尝试从构建目录切换到其他目录。这适合我。