Bazel build failure on @org_golang_x_sys//unix
See original GitHub issueDescription of the problem / feature request / question:
When running a bazel build on this workspace it fails with the following error:
+ bazel build //...
INFO: Found 41 targets...
ERROR: /private/var/tmp/_bazel_liam/9586a0d1a7804298899944d9204a8df3/external/org_golang_x_sys/unix/BUILD.bazel:3:1: error executing shell command: 'bazel-out/local-fastbuild/bin/external/org_golang_x_sys/unix/bazel-out/local-fastbuild/genfiles/external/org_golang_x_sys/unix/cgo_default_library.cgo.dir.CGoCodeGenFile.params' failed: bash failed: error executing command
(exec env - \
CGO_LDFLAGS='' \
GOARCH=amd64 \
GOOS=darwin \
GOROOT=/private/var/tmp/_bazel_liam/9586a0d1a7804298899944d9204a8df3/external/go1.8.3.darwin-amd64 \
/bin/bash -c bazel-out/local-fastbuild/bin/external/org_golang_x_sys/unix/bazel-out/local-fastbuild/genfiles/external/org_golang_x_sys/unix/cgo_default_library.cgo.dir.CGoCodeGenFile.params)
no buildable Go source files in @org_golang_x_sys//unix:cgo_default_library.cgo
INFO: Elapsed time: 1.674s, Critical Path: 1.25s
It seems to have been cause by upgrading to the latest commit of io_bazel_rules_go
.
If possible, provide a minimal example to reproduce the problem:
Run a bazel build //...
in repo root
Environment info
-
Operating System: OSX (locally) also failing on Ubuntu (Pipeline)
-
Bazel version (output of
bazel info release
): 0.4.5-homebrew
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Issues - GitHub
The build may fail, and it may cause us to fetch more repositories than necessary. golang.org/x/sys/unix doesn't have any deps though, so at ......
Read more >rules_go - Go Packages
When a project reaches major version v1 it is considered stable. Learn more. Repository. github.com/bazelbuild/rules_go. Links. Report a Vulnerability ...
Read more >Bazel to build
Multilingual magic. Build and test using Java, C++, Go, Android, iOS and many other languages and platforms. Bazel runs on Windows, macOS, and...
Read more >Go 1.18 build error on Mac: "unix/syscall_darwin.1_13.go:25:3 ...
This was caused by an old version of golang.org/x/sys (mentioned in this issue). Fix is to update with: go get -u golang.org/x/sys.
Read more >Go Release Dashboard
#50421 cmd/compile: calling string(...) on generic slices fails regardless of type constraints. #52025 cmd/compile: defer of embedded method resolves pointer ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jayconrod just picked up the latest commit. All working, thanks!
@liamawhite The most recent commit I could find where we could build
golang.org/x/sys/unix
was 84382d5163b44286680176fb1fdf00e4afdb2b88 (April 17). Be advised that BUILD files generated with this version are platform-specific.For ETA, I’m hoping to close bazelbuild/rules_go#510 and bazelbuild/rules_go#409 this week. I don’t know of any other issues preventing
golang.org/x/sys/unix
from building, but if anything does come up, it will be a high priority.