-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/link,x/build: android-arm-corellium
tries to link using arm64
C toolchain
#58829
Comments
android-arm-corellium
C toolchain android-arm-corellium
tries to link using arm64
C toolchain
In triage, we (C&RT) suspect this is more of a builder environment issue, but we'll keep an eye on it. (Though maybe we're passing the wrong flag or something to the C toolchain.) |
I think if cfg.Goos == "darwin" {
return []string{"-arch", "x86_64", "-m64"}
} but as far as I can tell the So I think this is a |
Oh! This might also just be a bug in the test. (That was a bug: the doc comment for |
Change https://go.dev/cl/475155 mentions this issue: |
The test had been assuming that any 'gcc' or 'clang' command found in $PATH could be used to compile cgo dependencies for the target GOARCH and GOOS. That assumption does not hold in general: for example, the GOARCH/GOOS configuration may be cross-compiling, which will cause the test to fail if the native 'gcc' and/or 'clang' is not configured for the target architecture. Instead, leave the 'CC' variable unset and assume only that the user has configured it appropriate to the environment in which they are running the test. For #58829. Change-Id: I9a1269ae3e0b4af281702114dabba844953f74bd Reviewed-on: https://go-review.googlesource.com/c/go/+/475155 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Fixed in CL 475155. |
In CL 472096, I am experimenting with enabling tests that use go build on android, because I don't see a good reason not to. Unfortunately, cgo linking seems to be broken on the
android-arm-corellium
builder.An example failure (https://storage.googleapis.com/go-build-log/1efd1f50/android-arm-corellium_80b1a8db.log):
It appears that for some reason the external linker thinks it is linking for
arm64
instead ofarm
.This builder runs on the
arm64
host, and it uses the sameCC
value:It also explicitly sets
CGO_ENABLED=1
, added in CL 174857 (CC @eliasnaur @bradfitz).It isn't clear to me whether this is a bug in
cmd/link
(failing to set a needed arch flag), or a misconfiguration in the builder itself (supplying the wrongCC
value, or erroneously settingCGO_ENABLED
when it should not be set).(attn @golang/android @steeve @changkun; CC @golang/compiler)
The text was updated successfully, but these errors were encountered: