sourcegraph / srclib

srclib is a polyglot code analysis library, built for hackability. It consists of language analysis toolchains (currently for Go and Java, with Python, JavaScript, and Ruby in beta) with a common output format, and a CLI tool for running the analysis.
https://srclib.org
Other
942 stars 62 forks source link

Failed to install Go toolchain #267

Closed alexsaveliev closed 8 years ago

alexsaveliev commented 8 years ago

I think that pre-requisite is to have empty GOPATH, for example with export GOPATH=/tmp/nogo

user@user-virtual-machine:~$ srclib toolchain install go
Go (github.com/sourcegraph/srclib-go) =========================================
mkdir -p /tmp/nogo/src/github.com/sourcegraph
ln -s /home/user/.srclib/github.com/sourcegraph/srclib-go /tmp/nogo/src/github.com/sourcegraph/srclib-go
Symlinked toolchain github.com/sourcegraph/srclib-go into your GOPATH at /tmp/nogo/src/github.com/sourcegraph/srclib-go
Downloading Go toolchain
Cloning into 'srclib-go'...
remote: Counting objects: 5077, done.
remote: Compressing objects: 100% (159/159), done.
remote: Total 5077 (delta 56), reused 0 (delta 0), pack-reused 4883
Receiving objects: 100% (5077/5077), 2.87 MiB | 1.27 MiB/s, done.
Resolving deltas: 100% (1708/1708), done.
Checking connectivity... done.
Building Go toolchain program
Running [make] in /home/user/.srclib/github.com/sourcegraph/srclib-go
GOBIN=/home/user/.srclib/github.com/sourcegraph/srclib-go/.bin go get github.com/tools/godep
.bin/godep go build -o .bin/srclib-go
godep: [WARNING]: godep should only be used inside a valid go package directory and
godep: [WARNING]: may not function correctly. You are probably outside of your $GOPATH.
godep: [WARNING]:       Current Directory: /home/user/.srclib/github.com/sourcegraph/srclib-go
godep: [WARNING]:       $GOPATH: /tmp/nogo
godep: WARNING: Go version (go1.6) & $GO15VENDOREXPERIMENT= wants to enable the vendor experiment, but disabling because a Godep workspace (Godeps/_workspace) exists
graph.go:18:2: cannot find package "sourcegraph.com/sourcegraph/srclib-go/gog" in any of:
        /usr/local/go/src/sourcegraph.com/sourcegraph/srclib-go/gog (from $GOROOT)
        /home/user/.srclib/github.com/sourcegraph/srclib-go/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib-go/gog (from $GOPATH)
        /tmp/nogo/src/sourcegraph.com/sourcegraph/srclib-go/gog
graph.go:19:2: cannot find package "sourcegraph.com/sourcegraph/srclib-go/gog/definfo" in any of:
        /usr/local/go/src/sourcegraph.com/sourcegraph/srclib-go/gog/definfo (from $GOROOT)
        /home/user/.srclib/github.com/sourcegraph/srclib-go/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib-go/gog/definfo (from $GOPATH)
        /tmp/nogo/src/sourcegraph.com/sourcegraph/srclib-go/gog/definfo
graph.go:20:2: cannot find package "sourcegraph.com/sourcegraph/srclib-go/golang_def" in any of:
        /usr/local/go/src/sourcegraph.com/sourcegraph/srclib-go/golang_def (from $GOROOT)
        /home/user/.srclib/github.com/sourcegraph/srclib-go/Godeps/_workspace/src/sourcegraph.com/sourcegraph/srclib-go/golang_def (from $GOPATH)
        /tmp/nogo/src/sourcegraph.com/sourcegraph/srclib-go/golang_def
godep: go exit status 1
make: *** [.bin/srclib-go] Error 1
failed to install/upgrade Go (github.com/sourcegraph/srclib-go) toolchain: command ["make"] failed: exit status 2

FAILED: srclib toolchain install go

I think that we should revert @f37ecd88157b8a4606035ca28ceddc2a09d4ef99 (#259) and use sourcegraph.com instead of github.com

beyang commented 8 years ago

Yep, the sourcegraph.com URLs should now work.