TensorFlow:解析 .d 文件时出错
TensorFlow: Error while parsing .d file
我用的是Ubuntu 15.10。目前我正在按照说明 here.
从源代码构建 TensorFlow
我安装成功,最后一步保存:"Build your target with GPU support".
当我从我的源代码树的根部 运行 这个命令时:
bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
我看到以下输出:
INFO: Found 1 target...
ERROR: /home/me/tensorflow/tensorflow/core/kernels/BUILD:549:1: error while parsing .d file: /home/me/.cache/bazel/_bazel_me/38a03c514c8dc954778fc9a555bce3de/tensorflow/bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/colorspace_op_gpu/tensorflow/core/kernels/colorspace_op_gpu.cu.d (No such file or directory).
nvcc warning : option '--relaxed-constexpr' has been deprecated and replaced by option '--expt-relaxed-constexpr'.
In file included from third_party/gpus/cuda/include/cuda_runtime.h:76:0,
from <command-line>:0:
third_party/gpus/cuda/include/host_config.h:115:2: error: #error -- unsupported GNU version! gcc versions later than 4.9 are not supported!
#error -- unsupported GNU version! gcc versions later than 4.9 are not supported!
^
Target //tensorflow/cc:tutorials_example_trainer failed to build
Use --verbose_failures to see the command lines of failed build steps.
有几点不明白:
- 为什么缺少
.d
文件?
- 这是什么意思?
nvcc warning : option '--relaxed-constexpr' has been deprecated and replaced by option '--expt-relaxed-constexpr'.
- 我的 GCC 版本是 5.2.1。这是否意味着我无法从源代码构建 TensorFlow?
感谢您的帮助。
考虑安装并临时选择旧版本的 gcc
:
apt-get install gcc-4.8
然后更新您的备选方案:
update-alternatives --remove-all gcc
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
编译 TensorFlow 后,您可以使用以前版本的 gcc
调用上面的命令,并使用 /usr/bin/gcc-5.x
.
的正确路径
Here您可以找到更详细的答案。
我用的是Ubuntu 15.10。目前我正在按照说明 here.
从源代码构建 TensorFlow我安装成功,最后一步保存:"Build your target with GPU support".
当我从我的源代码树的根部 运行 这个命令时:
bazel build -c opt --config=cuda //tensorflow/cc:tutorials_example_trainer
我看到以下输出:
INFO: Found 1 target...
ERROR: /home/me/tensorflow/tensorflow/core/kernels/BUILD:549:1: error while parsing .d file: /home/me/.cache/bazel/_bazel_me/38a03c514c8dc954778fc9a555bce3de/tensorflow/bazel-out/local_linux-opt/bin/tensorflow/core/kernels/_objs/colorspace_op_gpu/tensorflow/core/kernels/colorspace_op_gpu.cu.d (No such file or directory).
nvcc warning : option '--relaxed-constexpr' has been deprecated and replaced by option '--expt-relaxed-constexpr'.
In file included from third_party/gpus/cuda/include/cuda_runtime.h:76:0,
from <command-line>:0:
third_party/gpus/cuda/include/host_config.h:115:2: error: #error -- unsupported GNU version! gcc versions later than 4.9 are not supported!
#error -- unsupported GNU version! gcc versions later than 4.9 are not supported!
^
Target //tensorflow/cc:tutorials_example_trainer failed to build
Use --verbose_failures to see the command lines of failed build steps.
有几点不明白:
- 为什么缺少
.d
文件? - 这是什么意思?
nvcc warning : option '--relaxed-constexpr' has been deprecated and replaced by option '--expt-relaxed-constexpr'.
- 我的 GCC 版本是 5.2.1。这是否意味着我无法从源代码构建 TensorFlow?
感谢您的帮助。
考虑安装并临时选择旧版本的 gcc
:
apt-get install gcc-4.8
然后更新您的备选方案:
update-alternatives --remove-all gcc
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
编译 TensorFlow 后,您可以使用以前版本的 gcc
调用上面的命令,并使用 /usr/bin/gcc-5.x
.
Here您可以找到更详细的答案。