golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.02k stars 17.54k forks source link

gomobile bind -target ios fails #63162

Closed houmie closed 1 year ago

houmie commented 1 year ago

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

$ go version go1.21.1 darwin/arm64

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
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/houmie/Library/Caches/go-build'
GOENV='/Users/houmie/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/houmie/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/houmie/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/Cellar/go/1.21.1/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.21.1/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21.1'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/houmie/Projects/libXray/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/9m/lwx24q8929g7kpcg7vb5vssh0000gn/T/go-build140045140=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

gomobile bind -target ios

What did you expect to see?

No Crashes

What did you see instead?

gomobile: xcodebuild -create-xcframework -framework /var/folders/9m/lwx24q8929g7kpcg7vb5vssh0000gn/T/gomobile-work-3069817858/ios/iphoneos/LibXray.framework -framework /var/folders/9m/lwx24q8929g7kpcg7vb5vssh0000gn/T/gomobile-work-3069817858/iossimulator/iphonesimulator/LibXray.framework -framework /var/folders/9m/lwx24q8929g7kpcg7vb5vssh0000gn/T/gomobile-work-3069817858/iossimulator/iphonesimulator/LibXray.framework -output LibXray.xcframework failed: exit status 70
error: cannot compute path of binary 'Path(str: "/private/var/folders/9m/lwx24q8929g7kpcg7vb5vssh0000gn/T/gomobile-work-3069817858/ios/iphoneos/LibXray.framework/Versions/A/LibXray")' relative to that of '/var/folders/9m/lwx24q8929g7kpcg7vb5vssh0000gn/T/gomobile-work-3069817858/ios/iphoneos/LibXray.framework'
mauri870 commented 1 year ago

Possible duplicate of https://github.com/golang/go/issues/63141

cherrymui commented 1 year ago

Yeah, looks like a dup of #63141. Could you try updating gomobile? Thanks.