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: build failed with modules #40520

Closed
onoketa opened this issue Jul 31, 2020 · 1 comment
Closed

x/mobile: build failed with modules #40520

onoketa opened this issue Jul 31, 2020 · 1 comment
Labels
Milestone

Comments

@onoketa
Copy link

@onoketa onoketa commented Jul 31, 2020

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

$ go version
go version go1.14.6 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
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/onoketa/.cache/go-build"
GOENV="/home/onoketa/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/onoketa/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/onoketa/go/src/github.com/iyouport-org/relaybaton/go.mod"
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-build039912770=/tmp/go-build -gno-record-gcc-switches" 

What did you do?

gomobile bind -o relaybaton.aar -target=android relaybaton/cmd/android

What did you expect to see?

successful build

What did you see instead?

gomobile: go build -buildmode=c-shared -o=/tmp/gomobile-work-174727089/android/src/main/jniLibs/armeabi-v7a/libgojni.so ./gobind failed: exit status 1
go: cannot determine module path for source directory /tmp/gomobile-work-174727089/src (outside GOPATH, module path must be specified)

Example usage:
'go mod init example.com/m' to initialize a v0 or v1 module
'go mod init example.com/m/v2' to initialize a v2 module

Run 'go help mod init' for more information.

@gopherbot gopherbot added the mobile label Jul 31, 2020
@gopherbot gopherbot added this to the Unreleased milestone Jul 31, 2020
@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis commented Aug 3, 2020

We don't really use our issue tracker for questions. More people will see your question, and you will get better answers, if you ask on a forum rather than on the issue tracker. See https://golang.org/wiki/Questions.

@cagedmantis cagedmantis closed this Aug 3, 2020
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.