无法使用bazel从源代码构建TensorFlow.2016年1月22日

jks*_*hin 3 bazel tensorflow

我想从源代码安装最新的TensorFlow.我拉了存储库,然后跑了

bazel build -c opt //tensorflow/tools/pip_package:build_pip_package

我收到了这个错误:

ERROR: /home/samuelchin/tensorflow/tensorflow/models/embedding/BUILD:10:6: First argument of load() is a path, not a label. It should start with a single slash if it is an absolute path.
ERROR: /home/samuelchin/tensorflow/tensorflow/models/embedding/BUILD:10:6: file '/tensorflow:tensorflow.bzl.bzl' was not correctly loaded. Make sure the 'load' statement appears in the global scope in your file.
ERROR: /home/samuelchin/tensorflow/tensorflow/models/embedding/BUILD:104:1: name 'tf_gen_op_wrapper_py' is not defined.
ERROR: /home/samuelchin/tensorflow/tensorflow/tools/pip_package/BUILD:13:1: Target '//tensorflow/models/embedding:package' contains an error and its package is in error and referenced by '//tensorflow/tools/pip_package:build_pip_package'.
ERROR: Loading failed; build aborted.
INFO: Elapsed time: 0.071s.
Run Code Online (Sandbox Code Playgroud)

mrr*_*rry 5

最近对TensorFlow BUILD文件进行了更改,导致对Bazel 0.1.4的依赖.这是在邮件列表上公布discuss@tensorflow.org,但尚未进入网站上的文档.

正如您已经发现的那样,将Bazel升级到版本0.1.4应该可以解决此构建错误.