【发布时间】:2018-03-21 11:37:17
【问题描述】:
我在运行标准 C++ API 示例时遇到问题: https://www.tensorflow.org/api_guides/cc/guide
我创建了所有文件和目录。然后 Bazel 启动后会抛出错误。
INFO: From Compiling external/snappy/snappy-sinksource.cc [for host]:
cc1plus: warning: command line option '-Wno-implicit-function-declaration' is valid for C/ObjC but not for C++
ERROR: /home/[...]/tensorflow/tensorflow/core/BUILD:1796:1: Executing genrule //tensorflow/core:version_info_gen failed (Exit 127): bash failed: error executing command
(cd /home/[...]/.cache/bazel/_bazel_[...]/[...]/org_tensorflow && \
exec env - \
LD_LIBRARY_PATH=/opt/ros/lunar/lib \
PATH=/opt/ros/lunar/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games \
/bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; tensorflow/tools/git/gen_git_source.py --generate external/local_config_git/gen/spec.json external/local_config_git/gen/head external/local_config_git/gen/branch_ref "bazel-out/host/genfiles/tensorflow/core/util/version_info.cc"')
/usr/bin/env: 'python\r': No such file or directory
Target //tensorflow/cc/example:example failed to build
INFO: Elapsed time: 2.329s, Critical Path: 0.57s
FAILED: Build did NOT complete successfully
ERROR: Build failed. Not running target
我的系统正在运行 Debian。看起来行尾有问题,但我真的找不到任何东西。 Linux系统下的例子不应该默认运行吗?
还是我以某种方式错误配置了 bazel?
【问题讨论】:
标签: c++ tensorflow bazel