Skip to content

Protobuf v29.2 build fails with bazelisk #19740

Closed
@pkwarren

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions