-
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
Go 1.16 beta1: ios/amd64 build fails #43343
Comments
Maybe you need an explicit |
The code I’m building doesn’t use cgo, and the build settings I’m using work fine for all other combinations. |
Ah, now I understand. It's using
https://github.com/golang/go/tree/master/misc/ios has instructions how to use it. |
Also using |
CC @eliasnaur. |
Maybe it needs to make |
I'm not sure either. CC @cherrymui. |
Yeah,
This is not an error. It should generate the executable and it probably runs fine.
Could you explain what doesn't work? |
|
@cherrymui Erroring sounds less "risky" because it can be made to work later. I would create a change, but I have no clue where the appropriate place would be. (Also, probably faster if someone else who knows where and how to exactly restrict it.) |
Yeah, I think it shouldn't be hard to make internal linking work for iOS, then you don't need the C linker. Maybe in Go 1.17. Not sure it is that useful, though, since for actual iOS apps I think it generally needs some C (or other language) part. That said, I think it's been the case for quite a while (CGO_ENABLED stuff for cross-compilation). As we're late in the release cycle, maybe it's better to do the erroring behavior in Go 1.17. This probably will be in cmd/go, but I'm not sure exactly where. Issue #31544 might be relevant (about the |
@egonelbre could you clarify if
|
@churrymui Yes The main issue is that |
What I should do with this? |
@enty8080 your |
@eliasnaur
|
I don't know the reason for your error. FWIW, Rob may have had the same issue:
|
@eliasnaur I am using latest MacBook Air: |
See https://tip.golang.org/misc/ios/README . For cross compilation in general, you need to set |
@cherrymui Thanks, I answered here #43371 |
Change https://golang.org/cl/280154 mentions this issue: |
Change https://golang.org/cl/280153 mentions this issue: |
Updates #43371, #43343. Change-Id: I19386269245f2c20345c6cac7560089b8223e9f9 Reviewed-on: https://go-review.googlesource.com/c/go/+/280153 Trust: Cherry Zhang <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
Updates #43371, #43343. Change-Id: Ib89b809a5220717507272453ea86224d1928dd36 Reviewed-on: https://go-review.googlesource.com/c/go/+/280154 Trust: Cherry Zhang <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
From #43343 (comment) the ios/amd64 build works, so this issue is resolved. I'll look into erroring out when cgo is not enabled (not necessarily in this release, though). |
This might fix the issue when running ios builds. See golang/go#43343
What version of Go are you using (
go version
)?What did you do?
I have a cross-compilation test which I run on CI. It builds a binary for all supported GOOS / GOARCH combinations (as reported by
go tool dist list
).Using Go 1.15.x,
GOOS=ios GOARCH=amd64
is unsupported:Go 1.16 apparently adds support, but building fails. On my Mac, the error message is the following:
On CI (GitHub Actions), I'm getting the following failure:
Not sure what exactly this means, nor do I particularly care about building for this architecture. However, if
go tool dist list
lists this as a support combination, I would have expected the build to succeed.What did you expect to see?
go build
should succeed.What did you see instead?
go build
failed, see above.The text was updated successfully, but these errors were encountered: