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: failed to find packages #27300

Closed
axet opened this issue Aug 28, 2018 · 4 comments
Closed

x/mobile: failed to find packages #27300

axet opened this issue Aug 28, 2018 · 4 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@axet
Copy link

axet commented Aug 28, 2018

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

go version go1.11 darwin/amd64

Does this issue reproduce with the latest release?

Issue related to new 'go mod' feature only. Previous build works.

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

GOARCH="amd64"
GOBIN="/Users/axet/.go/bin"
GOCACHE="/Users/axet/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/axet/.go"
GOPROXY=""
GORACE=""
GOROOT="/opt/local/lib/go"
GOTMPDIR=""
GOTOOLDIR="/opt/local/lib/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="/usr/bin/clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/axet/source/libtorrent/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/lv/m63vrmx5375dgk4jhc05ww000000gn/T/go-build008741573=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

# git clone https://gitlab.com/axet/libtorrent

# cd libtorrent

cat << EOF > go.mod
module gitlab.com/axet/libtorrent
require (
	github.com/anacrolix/torrent master
)
replace github.com/anacrolix/torrent master => gitlab.com/axet/torrent master
EOF

gomobile bind -o libtorrent.aar gitlab.com/axet/libtorrent

Stops with following error:

go: writing go.sum: open /Users/axet/.go/pkg/mod/github.com/anacrolix/missinggo@v0.0.0-20180725070939-60ef2fbf63df/go.sum: permission denied

Directory is readonly. If you run:

chmod +w /Users/axet/.go/pkg/mod/github.com/anacrolix/missinggo@v0.0.0-20180725070939-60ef2fbf63df

The following error will occure:

could not import github.com/tinylib/msgp/msgp (cannot find package "github.com/tinylib/msgp/msgp" in any of:
	/opt/local/lib/go/src/github.com/tinylib/msgp/msgp (from $GOROOT)
	/Users/axet/.go/src/github.com/tinylib/msgp/msgp (from $GOPATH)))))))
@FiloSottile FiloSottile changed the title gomobile failed to find packages x/mobile: failed to find packages Aug 30, 2018
@gopherbot gopherbot added this to the Unreleased milestone Aug 30, 2018
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Aug 30, 2018
@FiloSottile FiloSottile added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. modules and removed mobile Android, iOS, and x/mobile labels Aug 30, 2018
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Aug 30, 2018
@FiloSottile
Copy link
Contributor

@bcmills @rsc it looks like cmd/go is trying to write a go.sum to a module in the pkg/mod cache here. Not sure if that's caused by gomobile, but it probably shouldn't happen.

@myitcv
Copy link
Member

myitcv commented Nov 14, 2018

cc @eliasnaur - some time has elapsed since this issue and I'm not sufficiently up to speed to know whether mobile is now modules-aware.

@eliasnaur
Copy link
Contributor

eliasnaur commented Nov 14, 2018 via email

@changkun
Copy link
Member

Mobile supports modules today and works well. Close as this is oudated.

@golang golang locked and limited conversation to collaborators Feb 21, 2023
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 modules 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

6 participants