Closed JNSFilipe closed 3 years ago
http_archive
is a Bazel macro that should be imported before being used. Add the following line in your WORKSPACE
file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
More details at https://docs.bazel.build/versions/main/repo/http.html.
I did manage to fix that, thanks. Furthermore, I think the link in urls
is wrong. I changed the WORKSPACE file to:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "ydf",
strip_prefix = "yggdrasil-decision-forests-0.1.3",
urls = ["https://github.com/google/yggdrasil-decision-forests/archive/refs/tags/0.1.3.zip"],
)
load("@ydf//yggdrasil_decision_forests:library.bzl", ydf_load_deps = "load_dependencies")
ydf_load_deps(repo_name = "@ydf", exclude_repo=[])
Nonetheless, I still do not manage to get it to work. As far as I can understand from the error message below, the dependencies of ydf are not being pulled, despite being included by the last two lines of the WORKSPACE file:
Unable to find package for @bazel_skylib//lib:versions.bzl: The repository '@bazel_skylib' could not be resolved
I'll create a standalone repo to demonstrate it. This will be easier this way :).
I'll update the issue when available.
Thank you very much, I appreciate it!
Hi,
The directory yggdrasil-decision-forests/tree/main/examples/standalone now contains a standalone example. The compilation requirements and trouble shooting instructions are the same as for the library.
I am trying to use
yggdrasil-decision-forests
as a C++ dependency in other project, that uses Bazel. I am using the suggestions in the documentation, mainly:In the BUILD file and:
In the WORKSPACE file.
Nonetheless, I am getting the following error, when making
bazel build models
: