从源构建TensorFlow时出错

从源构建TensorFlow时出错,tensorflow,compiler-errors,bazel,Tensorflow,Compiler Errors,Bazel,我正尝试在Debian操作系统上从源代码构建TensorFlow cpu only r1.11,遵循本教程: 我使用本教程按照建议从二进制安装程序安装了bazel。 然后,我按照每一步进行操作,一切正常,直到发出以下命令: bazel test -c opt -- //tensorflow/... -//tensorflow/compiler/... -//tensorflow/contrib/lite/... 它向我显示了以下错误: ERROR: error loading package

我正尝试在Debian操作系统上从源代码构建TensorFlow cpu only r1.11,遵循本教程:

我使用本教程按照建议从二进制安装程序安装了bazel。

然后,我按照每一步进行操作,一切正常,直到发出以下命令:

bazel test -c opt -- //tensorflow/... -//tensorflow/compiler/... -//tensorflow/contrib/lite/...
它向我显示了以下错误:

ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '@io_bazel_rules_closure//closure': The native http_archive rule is deprecated. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement.
Use --incompatible_remove_native_http_archive=false to temporarily continue using the native rule.
ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '@io_bazel_rules_closure//closure': The native http_archive rule is deprecated. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement.
Use --incompatible_remove_native_http_archive=false to temporarily continue using the native rule.
INFO: Elapsed time: 0.088s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)

我在网上看到这可能与bazel有关。因此,我尝试使用使用bazel自定义APT存储库重新安装bazel,但我得到了相同的错误

从1.12.0版开始,TensorFlow使用了一些不推荐的Bazel功能,这些功能在最近的Bazel版本中被完全删除。不要使用最新的版本,现在尝试使用较旧的版本。我能够使用Bazel 0.18.1在Windows上构建TensorFlow 1.12.0,这很可能也适用于TensorFlow 1.11。

我同意@jdehesa。甚至我也在努力用从头开始的方式构建tensorflow。我尝试了不同的版本,0.26,0.21,0.19.1,最后它使用了0.18.1。因此,这是一个bazel问题,而不是Tensorflow问题。TF_version=1.12.0

@jdehesa谢谢你!你帮我打开了。如果你能给出答案,我会记为已解决。“它可能会帮助其他人,希望是这样吗?”萨提亚·穆瑟哦,是的,修好了,谢谢你指出这一点。