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: wiki page commands don't work #55867

Closed
TheBicPen opened this issue Sep 25, 2022 · 2 comments
Closed

x/mobile: wiki page commands don't work #55867

TheBicPen opened this issue Sep 25, 2022 · 2 comments
Labels
mobile Android, iOS, and x/mobile WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@TheBicPen
Copy link

TheBicPen commented Sep 25, 2022

https://github.com/golang/go/wiki/Mobile

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

$ go version
go version go1.18.1 linux/amd64

Does this issue reproduce with the latest release?

Probably.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/alex/.cache/go-build"
GOENV="/home/alex/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/alex/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/alex/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go-1.18"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.18/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
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-build1987326445=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Went through the guide on the wiki page: https://github.com/golang/go/wiki/Mobile

$ gomobile init
gomobile: command not found

had to do echo 'export PATH=$PATH:~/go/bin' >> ~/.bashrc && . ~/.bashrc (from #21818 comments). Didn't see this documented anywhere.

$ go get -d golang.org/x/mobile/example/bind/...
go: go.mod file not found in current directory or any parent directory.
        'go get' is no longer supported outside a module.
        To build and install a command, use 'go install' with a version,
        like 'go install example.com/cmd@latest'
        For more information, see https://golang.org/doc/go-get-install-deprecation
        or run 'go help get' or 'go help install'.

Tried a whole bunch of things:

$ go install golang.org/x/mobile/example/bind/...
go: warning: "golang.org/x/mobile/example/bind/..." matched no packages
$ go install golang.org/x/mobile/example/bind/
go: 'go install' requires a version when current directory is not in a module
        Try 'go install golang.org/x/mobile/example/bind/@latest' to install the latest version
$ go install golang.org/x/mobile/example/bind/@latest
go: golang.org/x/mobile/example/bind/@latest: argument must be a clean package path

Still not sure what to do at this point.

What did you expect to see?

I expected the commands in the wiki page to work correctly out of the box.

What did you see instead?

They did not work out of the box, and no documentation is provided for how to solve the issues encountered. Just a poor experience for new users overall.

@changkun
Copy link
Member

changkun commented Sep 26, 2022

According to the provided messages, it seems that gomobile is not yet installed on your environment, try:

go install golang.org/x/mobile/cmd/gomobile@latest

This is described in https://github.com/golang/go/wiki/Mobile#tools

@changkun changkun added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. mobile Android, iOS, and x/mobile labels Sep 26, 2022
@changkun changkun changed the title Mobile wiki page commands don't work x/mobile: wiki page commands don't work Sep 27, 2022
@gopherbot gopherbot added this to the Unreleased milestone Sep 27, 2022
@gopherbot
Copy link

gopherbot commented Oct 26, 2022

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants