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: gobind failed: exit status 2 #33998

Open
unifyproxy opened this issue Aug 31, 2019 · 1 comment

Comments

@unifyproxy
Copy link

commented Aug 31, 2019

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

$ go version
go version go1.12.9 linux/amd64

What version of Gomobile are you using (gomobile version)?

$ gomobile version
gomobile version +c6da959 Fri Aug 30 20:13:51 2019 +0000 (android); androidSDK=/home/jason/Android/Sdk/platforms/android-29

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="amd64"
GOBIN=""
GOCACHE="/home/jason/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/jason/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build025736357=/tmp/go-build -gno-record-gcc-switches"

What did you do?

gomobile bind -target android -o v2.aar github.com/v2ray/v2ray-core

What did you expect to see?

nothing (build success)

What did you see instead?

Error
gomobile: /usr/local/go/bin/go build -buildmode=c-shared -o=/tmp/gomobile-work-571427279/android/src/main/jniLibs/armeabi-v7a/libgojni.so gobind failed: exit status 2
# gobind
core_android.c:380:1: error: redefinition of 'Java_core_InboundHandlerConfig_getTag'
core_android.c:306:1: note: previous definition is here
core_android.c:554:1: error: redefinition of 'Java_core_OutboundHandlerConfig_getTag'
core_android.c:480:1: note: previous definition is here
core_android.c:573:1: error: redefinition of 'Java_core_OutboundHandlerConfig_getExpire'
core_android.c:468:1: note: previous definition is here
core_android.c:588:1: error: redefinition of 'Java_core_OutboundHandlerConfig_getComment'
core_android.c:460:1: note: previous definition is here

@gopherbot gopherbot added this to the Unreleased milestone Aug 31, 2019

@gopherbot gopherbot added the mobile label Aug 31, 2019

@katiehockman

This comment has been minimized.

Copy link
Contributor

commented Sep 3, 2019

/cc @hyangah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.