rules_go: experimental_platforms mac os to linux does not work

Cross compiling with release 0.7.0 --experimental_platforms does not work on mac to produce linux binaries.

I have create a sample repo that fails with the command bazel build --experimental_platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //:logrusbazel

https://github.com/margic/logrusbazel

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (6 by maintainers)

Commits related to this issue

Most upvoted comments

It fixes the error you reported, but still does not work. The problem is that logrus depends on x/sys/unix, which uses cgo, and we don’t support cross compiling with cgo right now.