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

Open
axet opened this Issue Aug 28, 2018 · 3 comments

Comments

Projects
None yet
5 participants
@axet

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 from gomobile failed to find packages to 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 label Aug 30, 2018

@gopherbot gopherbot added the mobile label Aug 30, 2018

@FiloSottile

This comment has been minimized.

Member

FiloSottile commented Aug 30, 2018

@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

This comment has been minimized.

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

This comment has been minimized.

Contributor

eliasnaur commented Nov 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment