rules_go icon indicating copy to clipboard operation
rules_go copied to clipboard

ppc64le build issue

Open sumitd2 opened this issue 2 years ago • 6 comments

What version of rules_go are you using?

0.41.0

What version of gazelle are you using?

0.31.1

What version of Bazel are you using?

6.1.0

Does this issue reproduce with the latest releases of all the above?

Yes

What operating system and processor architecture are you using?

Linux, ppc64le

Any other potentially useful information about your toolchain?

What did you do?

Build envoyproxy/envoy master

What did you expect to see?

Our build to succeed.

What did you see instead?

Our build is failing due to an "exec format error"

Hi team,

We are building a package (for the ppc64le architecture) called envoyproxy/envoy which uses bazel and rules_go. During the build it compiles a go binary, and then later executes it. We get an "exec format error" with the last tagged version of rules_go, but if we remove the following line it builds fine: https://github.com/bazelbuild/rules_go/blob/d2a3cf2d6b18f5be19adccc6a6806e0c3b8c410b/go/private/platforms.bzl#L33

Please also note that this used to work fine with rules_go v0.33.0 https://github.com/bazelbuild/rules_go/blob/8a362829c17b92266f5e1e79cdc1cfc38ec3f86a/go/private/platforms.bzl#L29-L34

Can you please identify and fix the issue? Thanks.

sumitd2 avatar Jul 14 '23 13:07 sumitd2

cc: @seth-priya

sumitd2 avatar Jul 14 '23 13:07 sumitd2

cc: @clnperez

sumitd2 avatar Jul 18 '23 06:07 sumitd2

looks like another good reason to get our CI working on ppc64le again

https://github.com/bazelbuild/rules_go/pull/3336 introduced this for big endian support, so if we remove it we'd break that. i'm not sure how to make bazel build against the correct target if we overload that for both. maybe someone from the bazel team could help

clnperez avatar Jul 20 '23 23:07 clnperez

@jayconrod do you still happen to be active here? you were super helpful getting ppc64le working several years ago :)

clnperez avatar Jul 21 '23 21:07 clnperez

This seems to be at least tangentially related to https://github.com/bazelbuild/rules_go/issues/3531 where ppc64le cross-compile targets fail. That issue mentions something about CPU platforms and those same lines of code.

evanj avatar Jul 27 '23 13:07 evanj

Thanks @evanj . It does seem related.

clnperez avatar Jul 27 '23 17:07 clnperez