Asylo bazel构建错误“struct has no method'package_name'”

问题描述 投票:0回答:1

我正在尝试构建快速启动“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.

`

bazel
1个回答
1
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.