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

cmd/go: go get failures #3207

Closed
gopherbot opened this issue Mar 6, 2012 · 14 comments
Closed

cmd/go: go get failures #3207

gopherbot opened this issue Mar 6, 2012 · 14 comments
Milestone

Comments

@gopherbot
Copy link

by philipp.schumann:

Just updated from the previous weekly (22Feb) to the current (04Mar) and no "go
get" call seems to work.

You see to update I deleted my entire go folder and extracted the tarball in the same
path. But all previously installed packages were of course lost. That was stupid and I
suppose most people just overwrite instead of deleting so not sure if anyone noticed or
if it's just me but "go get" doesn't fully successfully work with any packages
out there that I tried.

I read in the go-nuts mailing list of a work-around to export GOPATH to a newly created
empty directory just before "go get"ting... this "worked" for
launchpad.net/mgo but not for stuff such as
"github.com/paul-lalonde/Go-OpenGL".

Guess will have to revert to 2012-02-22 for now. I'm on openSuse 12.1 64bit if that
helps.

I also saw in the release notes indeed that the whole go build/get/install system has
been "substantially redesigned". Well looks like those are breaking changes
for 100s of packages being in Real Use Today out there... but maybe I just missed some
other secret magic guru workaround sauce such as export GOPATH to somewhere it's not
really meant to point to?
@gnanderson
Copy link

Comment 1:

Outside of a few cgo warnings I can't reproduce any problems with using go get to
install github.com/paul-lalonde/Go-OpenGL I'm an openSUSE user also on 12.1 with latest
weekly. Perhaps this is something in your environment or specific build or something I'm
not seeing because I'm using a binary package.
Are you able to provide any errors that may help diagnose this? 
If you are really keen for latest weekly, we have an openSUSE_Factory maintenance repo
for Go language, devel:languages:go and I can attest the latest weekly build from there
is fine, it's at:
    http://download.opensuse.org/repositories/devel:/languages:/go/openSUSE_12.1/
and the build service project is located at:
    https://build.opensuse.org/project/show?project=devel:languages:go
If you install the latest weekly from there you should source the environment script:
    source /etc/profile.d/go.sh
Note that this will set your $GOPATH to $HOME/go, you may wish to override this in your
.bashrc to set it to what you were used to. This *may* change before Go 1 release.
There's a few of the more popular and useful libraries in that repo, not all of them are
building right now but the OpenGL, mgo packages should have built ok after the weekly
update.
If you have any issues with the packages from the repo, bug reports to
bugzilla.novell.com please unless you think it's a language bug.

@gopherbot
Copy link
Author

Comment 2 by vendion:

I am seeing this (or something like this) with the latest tip version:
go version
go version weekly.2012-03-04 +eb0c023eb7d7
go get -u github.com/nsf/gocode
package github.com/nsf/gocode
    imports github.com/nsf/gocode: import "github.com/nsf/gocode": cannot find package
go get github.com/garyburd/go-mongo
package github.com/garyburd/go-mongo
    imports github.com/garyburd/go-mongo: import "github.com/garyburd/go-mongo": cannot find package
With an earlier commit, probably from yesterday iirc:
go version
go version weekly.2012-03--4 +c1f5756f94b0
using go get to fetch or update packages work

@rsc
Copy link
Contributor

rsc commented Mar 7, 2012

Comment 3:

If you add -v -x to the go get command lines, what output does go get generate?
I cannot reproduce these failures:
$ go get -v -x github.com/nsf/gocode
github.com/nsf/gocode (download)
cd .
git clone https://github.com/nsf/gocode /Users/rsc/g/src/github.com/nsf/gocode
cd /Users/rsc/g/src/github.com/nsf/gocode
git show-ref
cd /Users/rsc/g/src/github.com/nsf/gocode
git show-ref tags/go.weekly.2012-02-22 origin/go.weekly.2012-02-22
cd /Users/rsc/g/src/github.com/nsf/gocode
git checkout tags/go.weekly.2012-02-22
WORK=/var/folders/mw/qfnx8hhd1_s9mm9wtbng0hw80000gn/T/go-build150122396
github.com/nsf/gocode
mkdir -p $WORK/github.com/nsf/gocode/_obj/
cd /Users/rsc/g/src/github.com/nsf/gocode
$GOROOT/pkg/tool/darwin_amd64/6g -o $WORK/github.com/nsf/gocode/_obj/_go_.6 -p
github.com/nsf/gocode -D github.com/nsf/gocode -I $WORK ./apropos.go
./autocompletecontext.go ./autocompletefile.go ./config.go ./decl.go ./declcache.go
./gocode.go ./os_posix.go ./package.go ./ripper.go ./rpc.go ./scope.go ./server.go
$GOROOT/pkg/tool/darwin_amd64/pack grc $WORK/github.com/nsf/gocode.a
$WORK/github.com/nsf/gocode/_obj/_go_.6
$GOROOT/pkg/tool/darwin_amd64/6l -o $WORK/github.com/nsf/gocode/_obj/a.out -L $WORK
$WORK/github.com/nsf/gocode.a
mkdir -p /Users/rsc/g/bin/
cp $WORK/github.com/nsf/gocode/_obj/a.out /Users/rsc/g/bin/gocode
$ go get -v -x github.com/garyburd/go-mongo
github.com/garyburd/go-mongo (download)
cd .
git clone https://github.com/garyburd/go-mongo
/Users/rsc/g/src/github.com/garyburd/go-mongo
cd /Users/rsc/g/src/github.com/garyburd/go-mongo
git show-ref
cd /Users/rsc/g/src/github.com/garyburd/go-mongo
git show-ref tags/go.weekly.2012-02-07 origin/go.weekly.2012-02-07
cd /Users/rsc/g/src/github.com/garyburd/go-mongo
git checkout tags/go.weekly.2012-02-07
WORK=/var/folders/mw/qfnx8hhd1_s9mm9wtbng0hw80000gn/T/go-build780340064
github.com/garyburd/go-mongo
mkdir -p $WORK/github.com/garyburd/go-mongo/_obj/
cd /Users/rsc/g/src/github.com/garyburd/go-mongo
$GOROOT/pkg/tool/darwin_amd64/6g -o $WORK/github.com/garyburd/go-mongo/_obj/_go_.6 -p
github.com/garyburd/go-mongo -D github.com/garyburd/go-mongo -I $WORK ./bson.go
./bson_decode.go ./bson_encode.go ./buffer.go ./collection.go ./connection.go
./database.go ./deprecated.go ./log.go ./mongo.go ./pool.go ./query.go
$GOROOT/pkg/tool/darwin_amd64/pack grc $WORK/github.com/garyburd/go-mongo.a
$WORK/github.com/garyburd/go-mongo/_obj/_go_.6
mkdir -p /Users/rsc/g/pkg/darwin_amd64/github.com/garyburd/
cp $WORK/github.com/garyburd/go-mongo.a
/Users/rsc/g/pkg/darwin_amd64/github.com/garyburd/go-mongo.a
$ go get -v -x github.com/garyburd/go-mongo
WORK=/var/folders/mw/qfnx8hhd1_s9mm9wtbng0hw80000gn/T/go-build266610490
$ go get -u -v -x github.com/garyburd/go-mongo
github.com/garyburd/go-mongo (download)
cd /Users/rsc/g/src/github.com/garyburd/go-mongo
git fetch
cd /Users/rsc/g/src/github.com/garyburd/go-mongo
git show-ref
cd /Users/rsc/g/src/github.com/garyburd/go-mongo
git show-ref tags/go.weekly.2012-02-07 origin/go.weekly.2012-02-07
cd /Users/rsc/g/src/github.com/garyburd/go-mongo
git checkout tags/go.weekly.2012-02-07
WORK=/var/folders/mw/qfnx8hhd1_s9mm9wtbng0hw80000gn/T/go-build535543775
$

Labels changed: added priority-go1, go1-must, removed priority-triage.

Owner changed to builder@golang.org.

Status changed to Accepted.

@gopherbot
Copy link
Author

Comment 4 by vendion:

I must of had something weird with that commit, I updated my Go install to go version
weekly.2012-03-04 +5c664f190e4e and I am able to install packages on my system with go
get command:
$ go get -v -x -u github.com/nsf/gocode
github.com/nsf/gocode (download)
cd /root/gocode/src/github.com/nsf/gocode
git fetch
cd /root/gocode/src/github.com/nsf/gocode
git show-ref
cd /root/gocode/src/github.com/nsf/gocode
git show-ref tags/go.weekly.2012-02-22 origin/go.weekly.2012-02-22
cd /root/gocode/src/github.com/nsf/gocode
git checkout tags/go.weekly.2012-02-22
WORK=/tmp/go-build725970184
github.com/nsf/gocode
mkdir -p $WORK/github.com/nsf/gocode/_obj/
cd $GOROOTcode/src/github.com/nsf/gocode
$GOROOT/pkg/tool/linux_amd64/6g -o $WORK/github.com/nsf/gocode/_obj/_go_.6 -p
github.com/nsf/gocode -D github.com/nsf/gocode -I $WORK ./apropos.go
./autocompletecontext.go ./autocompletefile.go ./config.go ./decl.go ./declcache.go
./gocode.go ./os_posix.go ./package.go ./ripper.go ./rpc.go ./scope.go ./server.go
$GOROOT/pkg/tool/linux_amd64/pack grc $WORK/github.com/nsf/gocode.a
$WORK/github.com/nsf/gocode/_obj/_go_.6
$GOROOT/pkg/tool/linux_amd64/6l -o $WORK/github.com/nsf/gocode/_obj/a.out -L $WORK
$WORK/github.com/nsf/gocode.a
mkdir -p $GOROOTcode/bin/
cp $WORK/github.com/nsf/gocode/_obj/a.out $GOROOTcode/bin/gocode
$ go get -v -x github.com/garyburd/go-mongo
WORK=/tmp/go-build396339392
github.com/garyburd/go-mongo
mkdir -p $WORK/github.com/garyburd/go-mongo/_obj/
cd $GOROOTcode/src/github.com/garyburd/go-mongo
$GOROOT/pkg/tool/linux_amd64/6g -o $WORK/github.com/garyburd/go-mongo/_obj/_go_.6 -p
github.com/garyburd/go-mongo -D github.com/garyburd/go-mongo -I $WORK ./bson.go
./bson_decode.go ./bson_encode.go ./buffer.go ./collection.go ./connection.go
./database.go ./deprecated.go ./log.go ./mongo.go ./pool.go ./query.go
$GOROOT/pkg/tool/linux_amd64/pack grc $WORK/github.com/garyburd/go-mongo.a
$WORK/github.com/garyburd/go-mongo/_obj/_go_.6
mkdir -p $GOROOTcode/pkg/linux_amd64/github.com/garyburd/
cp $WORK/github.com/garyburd/go-mongo.a
$GOROOTcode/pkg/linux_amd64/github.com/garyburd/go-mongo.a

@rsc
Copy link
Contributor

rsc commented Mar 7, 2012

Comment 5:

Okay, that only leaves philipp.schumann.  Philipp, can you please try the go get command
with -v and -x?

Status changed to WaitingForReply.

@rsc
Copy link
Contributor

rsc commented Mar 12, 2012

Comment 6:

Status changed to TimedOut.

@gopherbot
Copy link
Author

Comment 7 by themax:

Hi Russ, I'm actually having this same issue, both with weekly.2012-03-04 and also with
weekly.2012-03-13 (I just updated).  It's likely an error on my part (improper
environment setting?).  Thanks!
max-desktop$ export | grep GO
declare -x GOPATH="/home/max/src/go"
max-desktop$ go get -v -x -u github.com/nsf/gocode
github.com/nsf/gocode (download)
cd /home/max/src/go/src/github.com/nsf/gocode
git fetch
cd /home/max/src/go/src/github.com/nsf/gocode
git show-ref
cd /home/max/src/go/src/github.com/nsf/gocode
git show-ref tags/go.weekly.2012-03-13 origin/go.weekly.2012-03-13
cd /home/max/src/go/src/github.com/nsf/gocode
git checkout tags/go.weekly.2012-03-13
package github.com/nsf/gocode
    imports github.com/nsf/gocode
    imports github.com/nsf/gocode: import "github.com/nsf/gocode": cannot find package

@gopherbot
Copy link
Author

Comment 8 by themax:

I worked around this by changing by GOPATH:
max-desktop$ export | grep GOPATH
declare -x GOPATH="/home/max/mygo:/home/max/src/go"
Now this works:
max-desktop$ go get -v -x -u github.com/nsf/gocode
github.com/nsf/gocode (download)
cd .
git clone https://github.com/nsf/gocode /home/max/mygo/src/github.com/nsf/gocode
cd /home/max/mygo/src/github.com/nsf/gocode
git show-ref
cd /home/max/mygo/src/github.com/nsf/gocode
git show-ref tags/go.weekly.2012-03-13 origin/go.weekly.2012-03-13
cd /home/max/mygo/src/github.com/nsf/gocode
git checkout tags/go.weekly.2012-03-13
WORK=/tmp/go-build350497192
github.com/nsf/gocode
mkdir -p $WORK/github.com/nsf/gocode/_obj/
cd /home/max/mygo/src/github.com/nsf/gocode
/home/max/src/go/pkg/tool/linux_amd64/6g -o $WORK/github.com/nsf/gocode/_obj/_go_.6 -p
github.com/nsf/gocode -D _/home/max/mygo/src/github.com/nsf/gocode -I $WORK
./autocompletecontext.go ./autocompletefile.go ./client.go ./config.go
./cursorcontext.go ./decl.go ./declcache.go ./formatters.go ./gocode.go ./os_posix.go
./package.go ./ripper.go ./rpc.go ./scope.go ./server.go ./utils.go
/home/max/src/go/pkg/tool/linux_amd64/pack grc $WORK/github.com/nsf/gocode.a
$WORK/github.com/nsf/gocode/_obj/_go_.6
cd .
/home/max/src/go/pkg/tool/linux_amd64/6l -o $WORK/github.com/nsf/gocode/_obj/a.out -L
$WORK $WORK/github.com/nsf/gocode.a
mkdir -p /home/max/mygo/bin/
cp $WORK/github.com/nsf/gocode/_obj/a.out /home/max/mygo/bin/gocode

@rsc
Copy link
Contributor

rsc commented Mar 26, 2012

Comment 9:

Hi Max,
I was away on vacation last week but am back and would like to figure this out.
I tried recreating your case but it works for me (transcript below).
Is it possible that  in your setup, one of these directories is a symlink?
    /home/max/src/go
    /home/max/src/go/src
    /home/max/src/go/src/github.com
    /home/max/src/go/src/github.com/nsf
    /home/max/src/go/src/github.com/nsf/gocode
The go command can definitely get confused by symlinks.
Thanks.
Russ
$ mkdir /tmp/play
$ cd /tmp/play
$ hg clone https://code.google.com/p/go
...
$ mkdir -p src/go
$ cd go/src
$ ./make.bash
...
$ cd ../..
$ export GOPATH=/tmp/play/src/go
$ export | grep GO
declare -x GOPATH="/tmp/play/src/go"
$ go get -v -x -u github.com/nsf/gocode
github.com/nsf/gocode (download)
cd .
git clone https://github.com/nsf/gocode /tmp/play/src/go/src/github.com/nsf/gocode
cd /tmp/play/src/go/src/github.com/nsf/gocode
git show-ref
cd /tmp/play/src/go/src/github.com/nsf/gocode
git show-ref tags/go.weekly.2012-03-13 origin/go.weekly.2012-03-13
cd /tmp/play/src/go/src/github.com/nsf/gocode
git checkout tags/go.weekly.2012-03-13
WORK=/var/folders/00/05_b8000h01000cxqpysvccm000n9d/T/go-build973957517
github.com/nsf/gocode
mkdir -p $WORK/github.com/nsf/gocode/_obj/
cd /tmp/play/src/go/src/github.com/nsf/gocode
/Users/rsc/g/go/pkg/tool/darwin_amd64/6g -o $WORK/github.com/nsf/gocode/_obj/_go_.6 -p
github.com/nsf/gocode -D _/tmp/play/src/go/src/github.com/nsf/gocode -I $WORK
./autocompletecontext.go ./autocompletefile.go ./client.go ./config.go
./cursorcontext.go ./decl.go ./declcache.go ./formatters.go ./gocode.go ./os_posix.go
./package.go ./ripper.go ./rpc.go ./scope.go ./server.go ./utils.go
/Users/rsc/g/go/pkg/tool/darwin_amd64/pack grc $WORK/github.com/nsf/gocode.a
$WORK/github.com/nsf/gocode/_obj/_go_.6
cd .
/Users/rsc/g/go/pkg/tool/darwin_amd64/6l -o $WORK/github.com/nsf/gocode/_obj/a.out -L
$WORK $WORK/github.com/nsf/gocode.a
mkdir -p /tmp/play/src/go/bin/
cp $WORK/github.com/nsf/gocode/_obj/a.out /tmp/play/src/go/bin/gocode
$

Labels changed: removed go1-must.

Status changed to Accepted.

@gopherbot
Copy link
Author

Comment 10 by themax:

Hi Russ, I think I reproduced it.  Maybe it's a garbage-in / garbage-out situation. 
Here's a script:
$ mkdir /tmp/play
$ cd /tmp/play
$ hg clone https://code.google.com/p/go
$ cd go/src
$ ./make.bash
$ cd /tmp/play
$ export GOPATH=/tmp/play/go
$ export | grep GO
declare -x GOPATH="/tmp/play/go"
$ /tmp/play/go/bin/go get -v -x -u github.com/nsf/gocode
github.com/nsf/gocode (download)
cd .
git clone https://github.com/nsf/gocode /tmp/play/go/src/github.com/nsf/gocode
cd /tmp/play/go/src/github.com/nsf/gocode
git show-ref
cd /tmp/play/go/src/github.com/nsf/gocode
git show-ref tags/go.weekly.2012-03-13 origin/go.weekly.2012-03-13
cd /tmp/play/go/src/github.com/nsf/gocode
git checkout tags/go.weekly.2012-03-13
package github.com/nsf/gocode
    imports github.com/nsf/gocode
    imports github.com/nsf/gocode: import "github.com/nsf/gocode": cannot find package

@gopherbot
Copy link
Author

Comment 11 by themax:

And BTW, in answer to your question, those directories were not symlinks.

@rsc
Copy link
Contributor

rsc commented Mar 26, 2012

Comment 12:

Thanks Max!

@rsc
Copy link
Contributor

rsc commented Mar 27, 2012

Comment 13:

Issue #3278 has been merged into this issue.

@rsc
Copy link
Contributor

rsc commented Mar 27, 2012

Comment 14:

This issue was closed by revision 6b09295.

Status changed to Fixed.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants