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: Cannot init gomobile #34671

Closed
xsun2001 opened this issue Oct 3, 2019 · 3 comments
Closed

x/mobile/cmd/gomobile: Cannot init gomobile #34671

xsun2001 opened this issue Oct 3, 2019 · 3 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

@xsun2001
Copy link

xsun2001 commented Oct 3, 2019

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

$ go version
go version go1.13 darwin/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=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/xsun2001/Library/Caches/go-build"
GOENV="/Users/xsun2001/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/xsun2001/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/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/pw/6r37xyv50fx7gwmpg0bz56mh0000gn/T/go-build107464107=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ go get golang.org/x/mobile/cmd/gomobile
package golang.org/x/mobile/cmd/gomobile: unrecognized import path "golang.org/x/mobile/cmd/gomobile" (https fetch: Get https://golang.org/x/mobile/cmd/gomobile?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)

$  GO111MODULE=on GOPROXY=https://goproxy.io go get golang.org/x/mobile/cmd/gomobile
go: finding golang.org/x/mobile latest
go: downloading golang.org/x/mobile v0.0.0-20191002175909-6d0d39b2ca82
go: extracting golang.org/x/mobile v0.0.0-20191002175909-6d0d39b2ca82

$ gomobile init
gomobile: /usr/local/go/bin/go install golang.org/x/mobile/cmd/gobind failed: exit status 1
can't load package: package golang.org/x/mobile/cmd/gobind: cannot find package "golang.org/x/mobile/cmd/gobind" in any of:
	/usr/local/go/src/golang.org/x/mobile/cmd/gobind (from $GOROOT)
	/Users/xsun2001/go/src/golang.org/x/mobile/cmd/gobind (from $GOPATH)

$ GO111MODULE=on GOPROXY=https://goproxy.io gomobile init
gomobile: /usr/local/go/bin/go install golang.org/x/mobile/cmd/gobind failed: exit status 1
can't load package: package golang.org/x/mobile/cmd/gobind: cannot find package "golang.org/x/mobile/cmd/gobind" in any of:
	/usr/local/go/src/golang.org/x/mobile/cmd/gobind (from $GOROOT)
	/Users/xsun2001/go/src/golang.org/x/mobile/cmd/gobind (from $GOPATH)

What did you expect to see?

gomobile init passes.

What did you see instead?

Due to my poor network, I cannot directly call go get or I will get a timeout error. But when I use goproxy.io as my proxy, it seems that gomobile haven't been installed correctly. It said there wasn't gobind even I manually go get it. Sorry for my poor English.

@gopherbot gopherbot added this to the Unreleased milestone Oct 3, 2019
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Oct 3, 2019
@andybons andybons added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 3, 2019
@andybons
Copy link
Member

andybons commented Oct 3, 2019

@hyangah

@agnivade
Copy link
Contributor

agnivade commented Oct 3, 2019

gomobile does not work in module mode. I believe this is a duplicate of #27234.

@andybons
Copy link
Member

andybons commented Oct 3, 2019

Duplicate of #27234

@andybons andybons marked this as a duplicate of #27234 Oct 3, 2019
@andybons andybons closed this as completed Oct 3, 2019
@golang golang locked and limited conversation to collaborators Oct 2, 2020
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

4 participants