Skip to content
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

x/mobile/cmd/gomobile: Go1.15beta1 cannot generate Objective-c bindings if target includes amd64 #40390

Closed
libnat opened this issue Jul 24, 2020 · 7 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Milestone

Comments

@libnat
Copy link

libnat commented Jul 24, 2020

What version of Go are you using (go version)?

$ go version
go version go1.15beta1 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOOS="darwin"

What did you do?

gomobile bind -v -target=ios .
gomobile bind -v -target=ios/amd64 .
Both fail with the same error.

What did you expect to see?

Generate objective-c framework

What did you see instead?

clang: error: invalid argument '-mmacosx-version-min=10.11' not allowed with '-mios-simulator-version-min=7.0'
clang: warning: using sysroot for 'iPhoneSimulator' but targeting 'MacOSX' [-Wincompatible-sysroot]
@hajimehoshi
Copy link
Member

CC @hyangah @eliasnaur @dmitshur

@hajimehoshi
Copy link
Member

Confirmed the issue.

I'm not sure where -mmacosx-version-min=10.11 came from. I think this is from Go 1.15 compiler, but is that true?

@hajimehoshi
Copy link
Member

$ find . -name "*.go" | xargs grep "mmacosx-version-min"                                                                                                                                                                                      
./src/crypto/x509/root_cgo_darwin_amd64.go:#cgo CFLAGS: -mmacosx-version-min=10.11

My guess is that this should be omitted when ios build tag exists.

@gopherbot
Copy link

Change https://golang.org/cl/244777 mentions this issue: crypto/x509: do not specify -mmacosx-version-min on iOS

@hajimehoshi
Copy link
Member

This issue does not happen with the latest Go, then the next version of Go 1.15 has already fixed this issue.

(Probably 72019cf fixed this?)

@hajimehoshi
Copy link
Member

Go 1.15 rc1, which was released 30 minutes ago, did not cause this issue. Let me close this.

@dmitshur
Copy link
Contributor

Thanks for investigating and confirming this is fixed, Hajime.

@golang golang locked and limited conversation to collaborators Jul 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

4 participants