张量流程建立失败与gcc错误“as” [英] tensorflow build failure with gcc error 'as'

查看:215
本文介绍了张量流程建立失败与gcc错误“as”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



错误日志:

<$ p

我尝试从源代码构建tensorflow,但由于gcc错误而失败。 $ p> gcc:错误尝试exec'as':execvp:没有这样的文件或目录
错误:/home/pcy/tensorflow-r0.10/tensorflow/core/kernels/BUILD :369:1:
输出'tensorflow / core / kernels / _objs / batch_matrix_band_part_op_gpu / tensorflow / core / kernels / batch_matrix_band_part_op_gpu.cu.pic.o'未创建。

错误:/home/pcy/tensorflow-r0.10/tensorflow/core/kernels/BUILD:369:1:并非所有输出都已创建。
目标// tensorflow / tools / pip_package:build_pip_package未能生成
使用--verbose_failures查看失败生成步骤的命令行。
INFO:运行时间:24.255s,关键路径:23.90s
pcy @ BJSH-DATAGPU-134-200:〜/ tensorflow-r0.10 $其中,
为/ usr / bin / as /usr/share/man/man1/as.1.gz

任何人都可以解释这个?我不知道为什么它是错的...

解决方案

我不确定,但我相信这是因为Bazel取消了路径变量并在内部复制所需的工具或其他东西。



不幸的是,您必须重新编译编译器,并将路径硬编码为 ld nm



这与问题#2806 有关。



你必须这样配置你的编译器:

  ./ configure --prefix = / opt / gcc-5.3 --disable-nls --enable-languages = c,c ++ --with-ld = / bin / ld --with-nm = / bin / nm --with-as = / usr / bin / as 

显然,您可以选择自己的前缀路径。


I tried to build tensorflow from source but failed due to gcc error.

Error log:

gcc: error trying to exec 'as': execvp: No such file or directory
ERROR: /home/pcy/tensorflow-r0.10/tensorflow/core/kernels/BUILD:369:1:
output 'tensorflow/core/kernels/_objs/batch_matrix_band_part_op_gpu/tensorflow/core/kernels/batch_matrix_band_part_op_gpu.cu.pic.o' was not created.

ERROR: /home/pcy/tensorflow-r0.10/tensorflow/core/kernels/BUILD:369:1: not all outputs were created.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 24.255s, Critical Path: 23.90s
pcy@BJSH-DATAGPU-134-200:~/tensorflow-r0.10$ whereis as
as: /usr/bin/as /usr/share/man/man1/as.1.gz

Can anyone explain this? I have no idea why it is wrong...

解决方案

I am not sure, but I believe that is because Bazel unsets the path variable and copies the required tools internally or something.

The workaround is unfortunately that you have to recompile your compiler, and hardcode the paths to as, ld and nm.

This is related to Issue #2806.

You have to configure your compiler like this:

./configure --prefix=/opt/gcc-5.3 --disable-nls --enable-languages=c,c++ --with-ld=/bin/ld --with-nm=/bin/nm --with-as=/usr/bin/as

You can obviously choose your own prefix path.

这篇关于张量流程建立失败与gcc错误“as”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆