-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bazel] Build fails with Bazel 6.0.0: Constraints from "@bazel_tools" removed #31504
Comments
FYI you can use |
Downgrading to 4.2.0 worked for me. I was using the latest 6.0.0 before, and the build was constantly failing.
|
Hi, I'm a bot from the Ray team :) To help human contributors to focus on more relevant issues, I will automatically add the stale label to issues that have had no activity for more than 4 months. If there is no further activity in the 14 days, the issue will be closed!
You can always ask for help on our discussion forum or Ray's public slack channel. |
Is upgrading bazel on the ray roadmap? |
Respectfully, it must be. It's not reasonable to keep a dependency pinned forever. And if that's not enough of an argument, then bazel 6 specificaly would give some potentially very large advantages on the packaging side due to bzlmod, which should ideally unblock things like osx-support in conda-forge, improving the grpc-situation, etc. etc. |
as @cadedaniel said, to build ray, it needs to run https://docs.ray.io/en/latest/ray-contribute/development.html#preparing-to-build-ray-on-linux I agree that the build toolchain setup is a bit convoluted right now. we are working on simplifying it. we do not have plans to upgrade bazel in the near term. to upgrade bazel, a big cleanup needs to be performed first, on the (weird) use of bazel rules in the ray repo today, and discarding old, legacy stuff from the repo that is not worth upgrading. there is no planned timeline for now. although upgrading bazel is a nice to have, the current version of bazel serves okay for our purpose of building/testing/releasing ray. and upgrading it does not seem to give us any immediate benefit. fwiw, we will probably upgrade bazel some time in the future when the repo structure is cleaner, and hence upgrading can be easier. specifically for the grpc related issues, it is unclear about the urgency, or even if upgrading grpc is the right way to go at the moment. in the worst case, the grpc stubs can be generated in other ways. upgrading bazel is not a must. unfortunately, conda-forge support is not really in our scope today afaik. (sorry, conda-forge friends..) if you are looking for smoother integration in the long run, maybe consider reaching out to @zhe-thoughts or Ray leadership for a more formal collaboration deal or something. :) I am closing this issue as the original issue (cannot build with 6.0.0) is "intended behavior". for "ray's build tool chain needs to upgrade to bazel 6", the current answer is "won't fix". sorry. |
It is not only conda-forge support that is broken. Windows support is also broken, see #42098. I fear the CI builds are succeeding due to a very fragile setup that happens to work, and could break at any tool update. |
fwiw, this statement is also kind of true for Linux and OSX. It is just that Windows's toolchain config steps are inherently more complex than Linux and OSX (and foreign to many developers), so when something is broken, it is harder to fix. Ray is not really using bazel in bazel's idiomatic/recommended way. It is not using bazel to define everything in the build toolchain, but using the native ones from the system all the time. Using an old version of bazel is not really the root cause here. |
What happened + What you expected to happen
When building ray from source with
cd python && pip install -ve .
, bazel throws a build error and the build fails during thebuild_ext
step:I've tried doing
bazel clean --expunge
andrm -r ~/.cache/bazel/
but neither solved the issue. From the error message it looks like this is coming from a bazel toolchain dependency.Note: Okay, when using Bazel 5.4.0 it looks like Ray is able to build without issue, but with 6.0.0 it fails. Here's the release for 6.0.0, it looks like a lot changed but I haven't gone through it thoroughly enough to isolate the issue. As a temporary workaround, installing bazelisk and creating a
.bazeliskrc
withUSE_BAZEL_VERSION=5.x
at the root of the Ray repo will fix the issue.Versions / Dependencies
Ray: 5c7826f
Python: 3.10.8
OS: Linux 6.1.3-arch1-1 x86_64
Java: java-11-openjdk
Bazel: 6.0.0
Reproduction script
Issue Severity
High: It blocks me from completing my task.
The text was updated successfully, but these errors were encountered: