从源代码构建Tensorboard 1.13.1时出现问题(cfg必须为“主机”或“目标”)

时间:2019-06-06 11:13:18

标签: tensorboard

我正在尝试从源代码构建Tensorboard(1.13.1)。我正在使用Bazel版本0.26.0(从源构建)和JDK版本11.0.3。在构建过程中出现以下错误:

# bazel build --incompatible_disallow_filetype=false --incompatible_bzl_disallow_load_after_statement=false  tensorboard
Starting local Bazel server and connecting to it...
ERROR: /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/compiler/closure_js_library.bzl:343:17: Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/compiler/closure_js_library.bzl", line 335
                rule(implementation = _closure_js_lib..., <2 more arguments>)
        File "/root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/compiler/closure_js_library.bzl", line 343, in rule
                attr.label_list(cfg = "data", allow_files = True)
cfg must be either 'host' or 'target'.
ERROR: error loading package '': in /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/defs.bzl: Extension file 'closure/compiler/closure_js_library.bzl' has errors
ERROR: error loading package '': in /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/io_bazel_rules_closure/closure/defs.bzl: Extension file 'closure/compiler/closure_js_library.bzl' has errors
INFO: Elapsed time: 14.290s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

如果我从.bzl文件中搜索“数据”并将其替换为“主机”,则会出现另一个错误:

# bazel build --incompatible_disallow_filetype=false --incompatible_bzl_disallow_load_after_statement=false  tensorboard
ERROR: error loading package '': in /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/org_tensorflow/tensorflow/workspace.bzl: Label '@org_tensorflow//third_party:nccl/nccl_configure.bzl' crosses boundary of subpackage '@org_tensorflow//third_party/nccl' (perhaps you meant to put the colon here: '@org_tensorflow//third_party/nccl:nccl_configure.bzl'?)
ERROR: error loading package '': in /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/org_tensorflow/tensorflow/workspace.bzl: Label '@org_tensorflow//third_party:nccl/nccl_configure.bzl' crosses boundary of subpackage '@org_tensorflow//third_party/nccl' (perhaps you meant to put the colon here: '@org_tensorflow//third_party/nccl:nccl_configure.bzl'?)
INFO: Elapsed time: 15.377s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

通过替换来纠正错误,

load("//third_party:nccl/nccl_configure.bzl", "nccl_configure")

作者

load("//third_party/nccl:nccl_configure.bzl", "nccl_configure")

在缓存文件中,

/root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/org_tensorflow/tensorflow/workspace.bzl

解决错误,但现在收到此错误:

# bazel build --incompatible_disallow_filetype=false --incompatible_bzl_disallow_load_after_statement=false  tensorboard
ERROR: /root/.cache/bazel/_bazel_root/4e113d18791d4c114d32fe59cdd54b1a/external/org_tensorflow/tensorflow/workspace.bzl:18:1: file '@io_bazel_rules_closure//closure:defs.bzl' does not contain symbol 'filegroup_external'
ERROR: error loading package '': Extension file 'tensorflow/workspace.bzl' has errors
ERROR: error loading package '': Extension file 'tensorflow/workspace.bzl' has errors
INFO: Elapsed time: 1.113s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

现在,我被卡住了。任何指针高度赞赏!

0 个答案:

没有答案