【问题标题】:tensorflow build failure with gcc error 'as'tensorflow 构建失败,gcc 错误为“as”
【发布时间】:2016-12-29 22:50:51
【问题描述】:

我尝试从源代码构建 tensorflow,但由于 gcc 错误而失败。

错误日志:

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

谁能解释一下?我不知道为什么它是错误的......

【问题讨论】:

    标签: ubuntu gcc build tensorflow


    【解决方案1】:

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

    不幸的是,解决方法是您必须重新编译编译器,并对 asldnm 的路径进行硬编码。

    这与问题#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
    

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

    【讨论】:

    • 为我工作,使用 gcc-4.9.4。谢谢!然后,过了一会儿,我找到了this 帖子,它建议只复制“as”来解决这个问题。不过,我自己没有尝试过,所以我不想将其发布为答案。
    猜你喜欢
    • 2020-03-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-07-07
    • 2011-08-12
    相关资源
    最近更新 更多