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: clang: error: invalid version number in '-target arm64-apple-ios13.0-macabi' #54727

Open
smartgolang opened this issue Aug 29, 2022 · 4 comments
Labels
mobile Android, iOS, and x/mobile NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@smartgolang
Copy link

smartgolang commented Aug 29, 2022

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

$ go version
go version go1.19 darwin/arm64

Does this issue reproduce with the latest release?

yes

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

Mac OS Monterey 12.4

go env Output
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/<...>/Library/Caches/go-build"
GOENV="/Users/<...>/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/<...>/go-mdb-projects/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/<...>/go-mdb-projects"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="0"
GOMOD="/Users/<...>/<...>/<...>/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/w6/mmjtf28933l2_pkfr203rdwr0000gn/T/go-build2964995692=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

gomobile bind -target=ios,iossimulator,macos,maccatalyst -o My.xcframework .

What did you expect to see?

a library for Mac Catalyst

What did you see instead?

runtime/cgo

clang: error: invalid version number in '-target arm64-apple-ios13.0-macabi'

@seankhliao seankhliao changed the title Error when building for Mac Catalyst x/mobile: clang: error: invalid version number in '-target arm64-apple-ios13.0-macabi' Aug 29, 2022
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Aug 29, 2022
@gopherbot gopherbot added this to the Unreleased milestone Aug 29, 2022
@heschi
Copy link
Contributor

heschi commented Aug 29, 2022

cc @hyangah

@heschi heschi added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 29, 2022
@joshbuddy
Copy link

joshbuddy commented Sep 8, 2022

@smartgolang I believe this needs to be run with -iosversion=14 at a minimum

@David699
Copy link

David699 commented Sep 8, 2022

run this ok:
gomobile bind -v -a -target=ios,iossimulator,maccatalyst,macos -iosversion=15

@constantinevassil
Copy link

constantinevassil commented Sep 19, 2022

I tried again with your suggestion but now I get the following
cgo: C compiler "2022-09-19" not found: exec: "2022-09-19": executable file not found in $PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants