rules_go
rules_go copied to clipboard
Windows tests that require protoc are failing in CI
For example: https://buildkite.com/bazel/rules-go-golang/builds/2117#f1a36175-f7c1-4cc4-bf93-6ccfc57a428d
(21:45:54) ERROR: C:/b/5nywwchv/external/com_google_protobuf/BUILD:311:2: Couldn't build file external/com_google_protobuf/source_context_proto-descriptor-set.proto.bin: Generating Descriptor Set proto_library @com_google_protobuf//:source_context_proto failed (Exit -1073741515): protoc.exe failed: error executing command
--
| cd C:/b/5nywwchv/execroot/io_bazel_rules_go
| SET PATH=C:\tools\msys64\usr\bin;C:\tools\msys64\bin;C:\Windows;C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0;C:\python3\lib\site-packages\pywin32_system32;C:\python3\Scripts\;C:\python3\;C:\python2\;C:\python2\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\GooGet;C:\Program Files\Google\Compute Engine\metadata_scripts;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files\Google\Compute Engine\sysprep;C:\ProgramData\chocolatey\bin;C:\Program Files\LLVM\bin;C:\tools\msys64\usr\bin;C:\Program Files\Git\cmd;c:\openjdk\bin;C:\Program Files\CMake\bin;c:\ninja;c:\bazel;c:\buildkite
| SET RUNFILES_MANIFEST_ONLY=1
| bazel-out/host/bin/external/com_google_protobuf/protoc.exe --proto_path=bazel-out/x64_windows-opt-exec-A2178B74/bin/external/com_google_protobuf/_virtual_imports/source_context_proto --descriptor_set_out=bazel-out/x64_windows-opt-exec-A2178B74/bin/external/com_google_protobuf/source_context_proto-descriptor-set.proto.bin -Igoogle/protobuf/source_context.proto=bazel-out/x64_windows-opt-exec-A2178B74/bin/external/com_google_protobuf/_virtual_imports/source_context_proto/google/protobuf/source_context.proto --direct_dependencies google/protobuf/source_context.proto --direct_dependencies_violation_msg=%s is imported, but @com_google_protobuf//:source_context_proto doesn't directly depend on a proto_library that 'srcs' it. bazel-out/x64_windows-opt-exec-A2178B74/bin/external/com_google_protobuf/_virtual_imports/source_context_proto/google/protobuf/source_context.proto
| Execution platform: @io_bazel_rules_go//go/toolchain:windows_amd64_cgo
I think the problem here is that protoc.exe is built with the mingw-gcc toolchain, and when it's invoked in proto_library, it's not able to load a .dll. Not sure which file is missing or where it's located. --action_env=PATH should take care of it, but I'm not sure if that's getting passed down to the action.
I'm running into this issue as well trying to port my code to windows
@adamyi I don't think I've seen this issue outside of CI. Please open a new issue, including your environment and command used to invoke Bazel.