Asylo bazel构建错误“结构没有方法'package_name'”

时间:2018-09-05 23:57:51

标签: bazel

我正在尝试构建快速入门的“ hello_world”包。但是我在bazel中遇到以下错误。你能帮忙吗?我是bazel的新手。

$ bazel run --config=enc-sim //hello_world -- --
ERROR: /home/shankaran/asylo-examples/hello_world/BUILD:51:1: Traceback (most recent call last):
 File "/home/shankaran/asylo-examples/hello_world/BUILD", line 51
        enclave_loader(name = "hello_world", srcs = ["hel..."], <3 more arguments>)
 File "/home/shankaran/.cache/bazel/_bazel_shankaran/795757229ebec3834830ec8fb369480e/external/com_google_asylo/asylo/bazel/asylo.bzl", line 303, in enclave_loader
        copy_from_host(target = loader_name, output = loa...)
 File "/home/shankaran/.cache/bazel/_bazel_shankaran/795757229ebec3834830ec8fb369480e/external/com_google_asylo/asylo/bazel/asylo.bzl", line 65, in copy_from_host
        _parse_label(target)
 File "/home/shankaran/.cache/bazel/_bazel_shankaran/795757229ebec3834830ec8fb369480e/external/com_google_asylo/asylo/bazel/asylo.bzl", line 42, in _parse_label
        native.package_name()
struct has no method 'package_name'.
ERROR: no such target '//hello_world:hello_world': target 'hello_world' not declared in package 'hello_world' defined by /home/shankaran/asylo-examples/hello_world/BUILD.
INFO: Elapsed time: 0.083s
ERROR: Build failed. Not running target.

`

1 个答案:

答案 0 :(得分:1)

您的Bazel版本太旧了。您至少需要Bazel 0.13。