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: gomobile bind target macos xcode issue #73119

Open
xcolwell opened this issue Apr 1, 2025 · 3 comments
Open

x/mobile: gomobile bind target macos xcode issue #73119

xcolwell opened this issue Apr 1, 2025 · 3 comments
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Other None of the above.
Milestone

Comments

@xcolwell
Copy link

xcolwell commented Apr 1, 2025

Go version

go version go1.24.1 darwin/arm64

Output of go env in your module/workspace:

AR='ar'
CC='clang'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='clang++'
GCCGO='gccgo'
GO111MODULE=''
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/Users/brien/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/Users/brien/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/4l/g_hryrh931zd32myc4m67v940000gn/T/go-build974863723=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMOD='/Users/brien/urnetwork/sdk/build/go.mod'
GOMODCACHE='/Users/brien/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/brien/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/brien/Library/Application Support/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.24.1'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

export GODEBUG=gotypesalias=0; \
	gomobile bind \
		-target macos/arm64,macos/amd64 -iosversion 16.0 \
		-bundleid network.ur \
		-trimpath \
		-gcflags "-dwarf=false" \
		-ldflags "-s -w -X client.Version=$$WARP_VERSION -compressdwarf=false -buildid=" \
		-o "$$BUILD_DIR/URnetworkSdk.xcframework" \
		"github.com/urnetwork/sdk"; \

What did you see happen?

Building for macos targets causes an error:

error: binaries with multiple platforms are not supported '/private/var/folders/4l/g_hryrh931zd32myc4m67v940000gn/T/gomobile-work-406005174/macos/macosx/URnetworkSdk.framework/URnetworkSdk'

What did you expect to see?

The xcframework should build correctly.

@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Apr 1, 2025
@gopherbot gopherbot added this to the Unreleased milestone Apr 1, 2025
@gabyhelp gabyhelp added the Other None of the above. label Apr 1, 2025
@xcolwell
Copy link
Author

xcolwell commented Apr 1, 2025

This seems to be resolved with

go clean -cache
go clean -modcache

@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 1, 2025
@cagedmantis
Copy link
Contributor

cc @hajimehoshi

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 NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Other None of the above.
Projects
None yet
Development

No branches or pull requests

4 participants