question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bazel build failure on @org_golang_x_sys//unix

See original GitHub issue

Description 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:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
liamawhitecommented, Jun 8, 2017

@jayconrod just picked up the latest commit. All working, thanks!

1reaction
jayconrodcommented, Jun 7, 2017

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found