[Bazel] Build error from source
See original GitHub issueWhat is the problem?
Have the following build error when building from source using bazel 4.0.
DEBUG: /home/acxz/vcs/git/github/acxz/pkgbuilds/python-ray/src/ray-ray-1.2.0/bazel/ray_deps_setup.bzl:63:14: No implicit mirrors used because urls were explicitly provided
ERROR: /home/acxz/.cache/bazel/_bazel_acxz/efe9f06255fafeaf8887ca9ca2d64c2e/external/com_google_protobuf/BUILD:873:21: in proto_lang_toolchain rule @com_google_protobuf//:cc_toolchain: '@com_google_protobuf//:cc_toolchain' does not have mandatory provider 'ProtoInfo'.
INFO: Repository boost instantiated at:
/home/acxz/vcs/git/github/acxz/pkgbuilds/python-ray/src/ray-ray-1.2.0/WORKSPACE:5:15: in <toplevel>
/home/acxz/vcs/git/github/acxz/pkgbuilds/python-ray/src/ray-ray-1.2.0/bazel/ray_deps_setup.bzl:134:22: in ray_deps_setup
/home/acxz/vcs/git/github/acxz/pkgbuilds/python-ray/src/ray-ray-1.2.0/bazel/ray_deps_setup.bzl:74:24: in auto_http_archive
Repository rule http_archive defined at:
/home/acxz/.cache/bazel/_bazel_acxz/efe9f06255fafeaf8887ca9ca2d64c2e/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
ERROR: Analysis of target '//:ray_pkg' failed; build aborted: Analysis of target '@com_google_protobuf//:cc_toolchain' failed
INFO: Elapsed time: 1.303s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (7 packages loaded, 247 targets configured)
Fetching @cython; Restarting.
Ray version and other system information (Python version, TensorFlow version, OS): Bazel: 4.0
Reproduction (REQUIRED)
N/A Please provide a short code snippet (less than 50 lines if possible) that can be copy-pasted to reproduce the issue. The snippet should have no external library dependencies (i.e., use fake or mock data / environments):
If the code snippet cannot be run by itself, the issue will be closed with “needs-repro-script”.
- I have verified my script runs in a clean environment and reproduces the issue.
- I have verified the issue also occurs with the latest wheels.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Compiling Bazel from Source
Step 1: Get the latest Bazel release · Maybe your Bazel binary's directory is not on the PATH. This is not a big...
Read more >Building Gerrit from source using Bazel. Error at the verry first ...
I wanted to have a closer look, so I said "let's compile Gerrit first from source". Oh, that needs Bazel, fine. For the...
Read more >Build error in Bazel - Google Groups
Maybe the error might be that you are using an incorrect version of Bazel. Try using Bazelisk :).
Read more >How to ensure your code builds with Bazel - CockroachDB
There is a class of Bazel build errors that Gazelle can’t handle, and manual intervention is necessary. In this case you typically need...
Read more >Building a Go project using Bazel - Tweag
Gazelle looks at the Go source files and generates Bazel BUILD files ... ERROR: /tendermint/third_party/proto/gogoproto/BUILD.bazel:5:14: no ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
From https://github.com/bazelbuild/bazel/issues/12887#issuecomment-765950727 and https://github.com/bazelbuild/bazel/issues/12887#issuecomment-768894825, update protobuf to latest version also works (built with @acxz 's py39 branch merged):
From https://github.com/bazelbuild/bazel/issues/12887#issuecomment-765950727:
… should do it. Verified working build+tests w/ bazel 4.0.0 on macOS 11.2.2, ray at ea7d4c66076c5141bbf22c60d77ff4868b1cbb87.
@rkooo567 Is this something you’d be open to a PR on?