protocolbuffers / protocolbuffers/protobuf
Protobuf library requires bash.exe / WSL, seemingly unnecessarily
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 72k
- Forks
- 16.3k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 140
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:
- On a Windows 11 fresh install, no WSL, no bash.exe
- 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
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with bazel/private/oss/toolchains/prebuilt/protoc_authenticity.bzl at the referenced line and compare it with the attempted resolution in pull request 19409. Reproduce the failure on a fresh Windows 11 installation without WSL using the opentelemetry-proto metrics_proto dependency. Done means a cc_proto_library() target builds successfully without requiring bash.exe or an installed WSL distribution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100