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: does not support ARMv7 builds for ios #41074

Closed
basdevelop opened this issue Aug 27, 2020 · 8 comments
Closed

x/mobile/cmd/gomobile: does not support ARMv7 builds for ios #41074

basdevelop opened this issue Aug 27, 2020 · 8 comments
Labels
FrozenDueToAge 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.
Milestone

Comments

@basdevelop
Copy link

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

$ go version
go version go1.14.7 darwin/amd64

 gomobile version
gomobile version +973feb4 Sat Aug 1 11:21:45 2020 +0000 (android,ios); androidSDK=/Users/wsli/Library/Android/sdk/platforms/android-30




Does this issue reproduce with the latest release?

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="/Users/wsli/go/bin"
GOCACHE="/Users/wsli/Library/Caches/go-build"
GOENV="/Users/wsli/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/wsli/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.14.7/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.14.7/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/0j/8lghc3kd7yx2c_1lp9zhc6_h0000gn/T/go-build149931103=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

gomobile bind -v -o $(BINDIR)/xxx.framework -target=ios

What did you expect to see?

frameworks support armv7

What did you see instead?

missing required architecture armv7

ld: warning: Could not find or use auto-linked framework

@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Aug 27, 2020
@gopherbot gopherbot added this to the Unreleased milestone Aug 27, 2020
@hzy
Copy link

hzy commented Aug 27, 2020

+1 for this issue

@hajimehoshi
Copy link
Member

hajimehoshi commented Aug 28, 2020

Go 1.15 and gomobile no longer supports darwin/arm.

@martisch
Copy link
Contributor

martisch commented Aug 28, 2020

As seen in the release notes Go 1.15 dropped darwin/arm support:
https://golang.org/doc/go1.15#darwin

I dont think there will be much support for armv7 on darwin (if its not already there and this is a bug) as go1.14 will run out of support at some point wether gomobile supports it or not.

/cc @eliasnaur

@martisch martisch reopened this Aug 28, 2020
@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 31, 2020
@dmitshur dmitshur changed the title x/mobile: Gomobile does not support ARMv7 builds for ios x/mobile/cmd/gomobile: does not support ARMv7 builds for ios Aug 31, 2020
@ToJen
Copy link

ToJen commented Sep 9, 2020

What's the solution?

@ToJen
Copy link

ToJen commented Sep 9, 2020

Related to #41300

@hajimehoshi
Copy link
Member

No solution here. iOS ARMv7 (32bit) is no longer supported by Go.

@ToJen
Copy link

ToJen commented Sep 9, 2020

Ok, what's the best way to run gomobile so that it doesn't try to use arm even though the machine is amd64. Or maybe I should ask, how does one specify the iOS arch to use?

@hajimehoshi
Copy link
Member

You can specify the architecture by giving e.g, -target=ios/arm64 to gomobile-build or gomobile-bind. Or, just specifying -target=ios should include arm64 version and amd64 version. Your machine's architecture doesn't matter here for iOS (as long as you use macOS).

@golang golang locked and limited conversation to collaborators Sep 9, 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 NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

7 participants