protocolbuffers/protobuf

Protobuf library requires bash.exe / WSL, seemingly unnecessarily

Open

#27,307 opened on May 9, 2026

View on GitHub
 (1 comment) (0 reactions) (0 assignees)C++ (16,128 forks)batch import
bughelp wanted

Repository metrics

Stars
 (71,223 stars)
PR merge metrics
 (Avg merge 2d 11h) (185 merged PRs in 30d)

Description

What version of protobuf and what language are you using?

Version: 35.0-rc2 (from BCR)

Language: C++

What supported operating system version are you using (e.g. Linux, Windows) ? Windows 11

What supported runtime / compiler version are you using (e.g. python version, gcc version) MSVC

What did you do? Attempt to build a protobuf target dependency on Windows 11.

Steps to reproduce the behavior:

  1. On a Windows 11 fresh install, no WSL, no bash.exe
  2. Use Bazel and write a Protobuf target. In my specific case I installed opentelemetry-proto and tried to build a target which has dependency on metrics_proto here: https://github.com/bazelbuild/bazel-central-registry/blob/main/modules/opentelemetry-proto/1.8.0/overlay/BUILD.bazel
  3. Observe build failure

What did you expect to see Successful build of a cc_proto_library() target

What did you see instead?

ERROR: C:/users/stepa/_bazel_stepa/hr2rqvqb/external/protobuf+/bazel/private/oss/toolchains/prebuilt/BUILD.bazel:25:20: ProtocAuthenticityCheck external/protobuf+/bazel/private/oss/toolchains/prebuilt/validation_output.txt failed: (Exit 1): bash.exe failed: error executing ProtocAuthenticityCheck command (from protoc_authenticity rule target @@protobuf+//bazel/private/oss/toolchains/prebuilt:authenticity_validation) C:\Users\stepa\AppData\Local\Microsoft\WindowsApps\bash.exe -c ... (remaining 1 argument skipped)
Windows Subsystem for Linux has no installed distributions.
You can resolve this by installing a distribution with the instructions below:

Use 'wsl.exe --list --online' to list available distributions
and 'wsl.exe --install <Distro>' to install.

I believe this is a repeat of https://github.com/protocolbuffers/protobuf/issues/19408. The problem seems to stem from https://github.com/protocolbuffers/protobuf/blob/main/bazel/private/oss/toolchains/prebuilt/protoc_authenticity.bzl#L18

It looks like this was attempted to be resolved in https://github.com/protocolbuffers/protobuf/pull/19409 but there's a regression.

Contributor guide