Skip to content
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

Protobuf v29.2 build fails with bazelisk #19740

Open
pkwarren opened this issue Dec 19, 2024 · 0 comments
Open

Protobuf v29.2 build fails with bazelisk #19740

pkwarren opened this issue Dec 19, 2024 · 0 comments
Assignees

Comments

@pkwarren
Copy link
Contributor

pkwarren commented Dec 19, 2024

What version of protobuf and what language are you using?
Version: v29.2
Language: All

What operating system (Linux, Windows, ...) and version?
Linux/macOS

What runtime / compiler are you using (e.g., python version or gcc version)
clang 16.0.0

What did you do?
Steps to reproduce the behavior:

  1. Run bazelisk build '//:protoc_lib'

What did you expect to see
Build should download bazel (if needed) and compile the protobuf library.

What did you see instead?

$ bazelisk build //:protoc_lib
2024/12/19 09:34:32 Downloading https://releases.bazel.build/8.0.0/release/bazel-8.0.0-darwin-arm64...
2024/12/19 09:34:32 Skipping basic authentication for releases.bazel.build because no credentials found in /Users/pkw/.netrc
Downloading: 56 MB out of 56 MB (100%) 
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 89a9cc3b-037e-49c2-b34f-47a21bfb0c8c
ERROR: Error computing the main repository mapping: error loading package 'external': Both --enable_bzlmod and --enable_workspace are disabled, but one of them must be enabled to fetch external dependencies.
Computing main repo mapping: 

It would be nice if protobuf checked in a .bazelversion with a known good version of Bazel to use for compilation, as without it the build attempts to use the latest version of Bazel. For reference, gRPC checks one in https://github.com/grpc/grpc/blob/master/.bazelversion. After creating this file, compilation succeeds with bazelisk.

Anything else we should know about your project / environment
n/a

@pkwarren pkwarren added the untriaged auto added to all issues by default when created. label Dec 19, 2024
@zhangskz zhangskz added bazel 29.x and removed untriaged auto added to all issues by default when created. labels Dec 20, 2024
@zhangskz zhangskz self-assigned this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants