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

cmd/go: support -buildmode=c-archive on android/arm64 #33806

Open
nathan-fiscaletti opened this issue Aug 23, 2019 · 4 comments
Open

cmd/go: support -buildmode=c-archive on android/arm64 #33806

nathan-fiscaletti opened this issue Aug 23, 2019 · 4 comments

Comments

@nathan-fiscaletti
Copy link
Contributor

@nathan-fiscaletti nathan-fiscaletti commented Aug 23, 2019

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

$ go version
go version go1.12.9 linux/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="arm64"
GOBIN=""
GOCACHE="/home/vagrant/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="android"
GOPATH="/usr/local/go/go_packages:/vcb"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="/toolchain/aarch64-linux-android//bin/aarch64-linux-android-clang"
CXX="/toolchain/aarch64-linux-android//bin/aarch64-linux-android-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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build250707415=/tmp/go-build -gno-record-gcc-switches"

What did you do?

go build -o libtest.a -buildmode=c-archive -x

What did you expect to see?

An archive file targeting android/arm64 to be built

What did you see instead?

invalid value "c-archive" for flag -buildmode: buildmode c-archive not supported on android/arm64
@nathan-fiscaletti
Copy link
Contributor Author

@nathan-fiscaletti nathan-fiscaletti commented Aug 23, 2019

Same issue using following combinations as well

export GOOS=android
export GOARCH="arm"
export GOOS=android
export GOARCH="386"
@bcmills bcmills changed the title -buildmode=c-archive not supported on android/arm64 cmd/go: -buildmode=c-archive not supported on android/arm64 Aug 26, 2019
@bcmills bcmills changed the title cmd/go: -buildmode=c-archive not supported on android/arm64 cmd/go: support -buildmode=c-archive on android/arm64 Aug 26, 2019
@bcmills bcmills added this to the Unplanned milestone Aug 26, 2019
@bcmills
Copy link
Member

@bcmills bcmills commented Aug 26, 2019

See previously #14327 (comment).

@aduermael
Copy link

@aduermael aduermael commented Feb 21, 2020

@nathan-fiscaletti Having the same issue. Were you able to make it work on your side?

@nathan-fiscaletti
Copy link
Contributor Author

@nathan-fiscaletti nathan-fiscaletti commented Feb 21, 2020

@aduermael I was not with -buildmode=c-archive, I ended up having to switch to -buildmode=c-shared and had to adapt my use case to use shared libraries instead :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.