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
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (6 by maintainers)
Commits related to this issue
- Add unit test for pure and cgo This test currently fails, and is marked as manual so it does not run. Once #1009 is fixed, we will enable the test — committed to ianthehat/rules_go by ianthehat 7 years ago
- Add unit test for pure and cgo This test currently fails, and is marked as manual so it does not run. Once #1009 is fixed, we will enable the test — committed to ianthehat/rules_go by ianthehat 7 years ago
- Add unit test for pure and cgo (#1015) This test currently fails, and is marked as manual so it does not run. Once #1009 is fixed, we will enable the test — committed to bazelbuild/rules_go by ianthehat 7 years ago
- Select original go sources in pure mode This adds a filtering mechanism to the new GoSourceList logic and uses it to switch between the cgo processed sources and the unprocessed original sources depe... — committed to ianthehat/rules_go by ianthehat 7 years ago
- Select original go sources in pure mode This adds a filtering mechanism to the new GoSourceList logic and uses it to switch between the cgo processed sources and the unprocessed original sources depe... — committed to ianthehat/rules_go by ianthehat 7 years ago
- Select original go sources in pure mode (#1056) This adds a filtering mechanism to the new GoSourceList logic and uses it to switch between the cgo processed sources and the unprocessed original sou... — committed to bazelbuild/rules_go by ianthehat 7 years ago
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.