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 failing when using goMobile in Cayley #33096

Closed
zhuguocheng29 opened this issue Jul 13, 2019 · 2 comments
Closed

x/mobile: build failing when using goMobile in Cayley #33096

zhuguocheng29 opened this issue Jul 13, 2019 · 2 comments

Comments

@zhuguocheng29
Copy link

@zhuguocheng29 zhuguocheng29 commented Jul 13, 2019

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

$ go version
go version go1.12.5 darwin/amd64

Does this issue reproduce with the latest release?

yes

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/zhuguocheng/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/zhuguocheng/Projects/GoTest"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/zhuguocheng/Projects/cayley/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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/vy/p8y7d81137g3042mrjr7y5c40000gn/T/go-build236115641=/tmp/go-build -gno-record-gcc-switches -fno-common"

go env Output
$ go env

What did you do?

env GO111MODULE=off gomobile build -target=android ./cmd/cayley

What did you expect to see?

success

What did you see instead?

gomobile: go build -buildmode=c-shared -o /var/folders/vy/p8y7d81137g3042mrjr7y5c40000gn/T/gomobile-work-248534955/lib/armeabi-v7a/libcayley.so ./cmd/cayley failed: exit status 1
cmd/cayley/cayley.go:30:2: cannot find package "github.com/cayleygraph/cayley/clog" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/clog (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/clog (from $GOPATH)
cmd/cayley/cayley.go:31:2: cannot find package "github.com/cayleygraph/cayley/clog/glog" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/clog/glog (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/clog/glog (from $GOPATH)
cmd/cayley/cayley.go:26:2: cannot find package "github.com/cayleygraph/cayley/cmd/cayley/command" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/cmd/cayley/command (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/cmd/cayley/command (from $GOPATH)
cmd/cayley/cayley.go:32:2: cannot find package "github.com/cayleygraph/cayley/graph" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/graph (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/graph (from $GOPATH)
cmd/cayley/cayley.go:37:2: cannot find package "github.com/cayleygraph/cayley/graph/all" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/graph/all (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/graph/all (from $GOPATH)
cmd/cayley/cayley.go:33:2: cannot find package "github.com/cayleygraph/cayley/quad" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/quad (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/quad (from $GOPATH)
cmd/cayley/cayley.go:40:2: cannot find package "github.com/cayleygraph/cayley/quad/dot" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/quad/dot (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/quad/dot (from $GOPATH)
cmd/cayley/cayley.go:41:2: cannot find package "github.com/cayleygraph/cayley/quad/gml" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/quad/gml (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/quad/gml (from $GOPATH)
cmd/cayley/cayley.go:42:2: cannot find package "github.com/cayleygraph/cayley/quad/graphml" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/quad/graphml (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/quad/graphml (from $GOPATH)
cmd/cayley/cayley.go:43:2: cannot find package "github.com/cayleygraph/cayley/quad/json" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/quad/json (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/quad/json (from $GOPATH)
cmd/cayley/cayley.go:44:2: cannot find package "github.com/cayleygraph/cayley/quad/jsonld" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/quad/jsonld (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/quad/jsonld (from $GOPATH)
cmd/cayley/cayley.go:45:2: cannot find package "github.com/cayleygraph/cayley/quad/nquads" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/quad/nquads (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/quad/nquads (from $GOPATH)
cmd/cayley/cayley.go:46:2: cannot find package "github.com/cayleygraph/cayley/quad/pquads" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/quad/pquads (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/quad/pquads (from $GOPATH)
cmd/cayley/cayley.go:52:2: cannot find package "github.com/cayleygraph/cayley/query/gizmo" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/query/gizmo (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/query/gizmo (from $GOPATH)
cmd/cayley/cayley.go:53:2: cannot find package "github.com/cayleygraph/cayley/query/graphql" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/query/graphql (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/query/graphql (from $GOPATH)
cmd/cayley/cayley.go:54:2: cannot find package "github.com/cayleygraph/cayley/query/mql" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/query/mql (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/query/mql (from $GOPATH)
cmd/cayley/cayley.go:55:2: cannot find package "github.com/cayleygraph/cayley/query/sexp" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/query/sexp (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/query/sexp (from $GOPATH)
cmd/cayley/cayley.go:34:2: cannot find package "github.com/cayleygraph/cayley/version" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/version (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/version (from $GOPATH)
cmd/cayley/cayley.go:49:2: cannot find package "github.com/cayleygraph/cayley/writer" in any of:
/usr/local/go/src/github.com/cayleygraph/cayley/writer (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/cayleygraph/cayley/writer (from $GOPATH)
cmd/cayley/cayley.go:27:2: cannot find package "github.com/spf13/cobra" in any of:
/usr/local/go/src/github.com/spf13/cobra (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/spf13/cobra (from $GOPATH)
cmd/cayley/cayley.go:28:2: cannot find package "github.com/spf13/viper" in any of:
/usr/local/go/src/github.com/spf13/viper (from $GOROOT)
/Users/zhuguocheng/Projects/GoTest/src/github.com/spf13/viper (from $GOPATH)

@hyangah

This comment has been minimized.

Copy link
Contributor

@hyangah hyangah commented Jul 13, 2019

It's not obvious to me yet where is your current directory, and where the source code are in.
But based on
GOMOD="/Users/zhuguocheng/Projects/cayley/go.mod", I am guessing you have source code under $HOME/Projects/cayley. Gomobile assumes go working in GOPATH mode and looks for necessary packages under $HOME/Projects/GoTest.

It is a duplicate of #27234. Gomobile doesn't work in module mode.

@hyangah hyangah changed the title build failing when using goMobile in Cayley x/mobile: build failing when using goMobile in Cayley Jul 13, 2019
@gopherbot gopherbot added this to the Unreleased milestone Jul 13, 2019
@gopherbot gopherbot added the mobile label Jul 13, 2019
@dmitshur

This comment has been minimized.

Copy link
Member

@dmitshur dmitshur commented Jul 15, 2019

@zhuguocheng29 Thanks for the report.

If you are using module mode, let's close this issue in favor of #27234, since it's already tracking the task of resolving that.

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