bazel-contrib / bazel-contrib/rules_go
GitHub Action, Windows, Bazel 7.0.0rc7 Fails to Build: builder.exe.bat failed: error executing GoToolchainBinaryBuild command
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.5k
- Forks
- 762
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 12
Description
### What version of rules_go are you using? "0.43.0"
### What version of gazelle are you using? "0.34.0"
### What version of Bazel are you using? 7.0.0rc7
Build label: 7.0.0rc7
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Wed Dec 6 17:09:29 2023 (1701882569)
Build timestamp: 1701882569
Build timestamp as int: 1701882569
### Does this issue reproduce with the latest releases of all the above?
Yes
### What operating system and processor architecture are you using?
GitHub Action Builid Runner, Windows, amd64
### Any other potentially useful information about your toolchain?
Nothing unusual for a Go build
### What did you do?
When I created a release to build for linux, amd64 at GitHub, the GHA script was successful.
When I changed the script to build a release for windows, amd64 at GitHub, the GHA script failed.
Based on the error message, it seems to be rules_go related.
I've attach the debug build log for Bazel v7 and GHA.
I successfully built using this configuration but Bazel v6.4.0. I've attached its build log, too.
### What did you expect to see?
A successful build
### What did you see instead?
```
(21:12:34) INFO: Analyzed target //cmd:redeployer (410 packages loaded, 12996 targets configured).
(21:12:35) [5 / 336] [Prepa] Creating runfiles tree bazel-out/x64_windows-fastbuild/bin/cmd/redeployer_/redeployer.exe.runfiles
(21:12:36) [6 / 336] checking cached actions
(21:12:37) [6 / 336] GoToolchainBinaryBuild external/rules_go~0.43.0~go_sdk~redeployer__download_0/builder.exe [for tool]; 0s local
(21:12:46) [6 / 336] GoToolchainBinaryBuild external/rules_go~0.43.0~go_sdk~redeployer__download_0/builder.exe [for tool]; 9s local
(21:13:02) ERROR: C:/users/runneradmin/_bazel_runneradmin/atyj7lkh/external/rules_go~0.43.0~go_sdk~redeployer__download_0/BUILD.bazel:62:15: GoToolchainBinaryBuild external/rules_go~0.43.0~go_sdk~redeployer__download_0/builder.exe [for tool] failed: (Exit 1): builder.exe.bat failed: error executing GoToolchainBinaryBuild command (from target @@rules_go~0.43.0~go_sdk~redeployer__download_0//:builder)
cd /d C:/users/runneradmin/_bazel_runneradmin/atyj7lkh/execroot/_main
bazel-out\x64_windows-opt-exec-ST-13d3ddad9198\bin\external\rules_go~0.43.0~go_sdk~redeployer__download_0\builder.exe.bat
# Configuration: d26f6c25cc304796b4719fbb45e3b1629cb6daafb4b65cd2e4f70[180](https://github.com/ingios/redeployer/actions/runs/7146237705/job/19463701641#step:9:181)78d8765e
# Execution platform: @@local_config_platform//:host
go: downloading go1.21.4 (windows/amd64)
runtime/internal/atomic: C:\users\runneradmin\_bazel_runneradmin\atyj7lkh\execroot\_main\bazel-out\x64_windows-opt-exec-ST-13d3ddad9198\bin\external\rules_go~0.43.0~go_sdk~redeployer__download_0\gopath\pkg\mod\golang.org\toolchain@v0.0.1-go1.21.4.windows-amd64\pkg\tool\windows_amd64\asm.exe: fork/exec C:\users\runneradmin\_bazel_runneradmin\atyj7lkh\execroot\_main\bazel-out\x64_windows-opt-exec-ST-13d3ddad9198\bin\external\rules_go~0.43.0~go_sdk~redeployer__download_0\gopath\pkg\mod\golang.org\toolchain@v0.0.1-go1.21.4.windows-amd64\pkg\tool\windows_amd64\asm.exe: The directory name is invalid.
Target //cmd:redeployer failed to build
(21:13:02) INFO: Elapsed time: 159.110s, Critical Path: 25.34s
(21:13:02) INFO: 7 processes: 7 internal.
(21:13:02) ERROR: Build did NOT complete successfully
```
[release.yml.zip](https://github.com/bazelbuild/rules_go/files/13621073/release.yml.zip)
[bazel7_debug.log](https://github.com/bazelbuild/rules_go/files/13621142/bazel7_debug.log)
[bazel_6.4.0_debug.log](https://github.com/bazelbuild/rules_go/files/13621143/bazel_6.4.0_debug.log)
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 the attached release.yml and reproduce the Windows amd64 build using Bazel 7.0.0rc7, then compare bazel7_debug.log with bazel_6.4.0_debug.log. Inspect the external rules_go BUILD.bazel target for builder.exe and the //cmd:redeployer entry point. Done means the GitHub Actions Windows build completes successfully with the Bazel 7 configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100