go: cmd/godoc: confused by symlinks in GOROOT: godoc: corpus fstree is nil
Please answer these questions before submitting your issue. Thanks!
- What version of Go are you using (
go version
)? go version go1.6 linux/amd64 - What operating system and processor architecture are you using (
go env
)? GOARCH=“amd64” GOBIN=“” GOEXE=“” GOHOSTARCH=“amd64” GOHOSTOS=“linux” GOOS=“linux” GOPATH=“/home/me/Code/go” GORACE=“” GOROOT=“/usr/lib/go” GOTOOLDIR=“/usr/lib/go/pkg/tool/linux_amd64” GO15VENDOREXPERIMENT=“1” CC=“gcc” GOGCCFLAGS=“-fPIC -m64 -pthread -fmessage-length=0” CXX=“g++” CGO_ENABLED=“1” - What did you do?
go get golang.org/x/tools/cmd/godoc
sudo -E go install golang.org/x/tools/cmd/godoc
godoc -http=":8080"
- What did you expect to see? godoc running on the command line, listening to HTTP requests
- What did you see instead? “2016/03/31 11:15:45 godoc: corpus fstree is nil”, followed by program exit with status code -1
- Other notes
- It was working when I was running go 1.5, I added the ubuntu-lxc/lxd-stable ppa and upgraded to go 1.6.
- I tried running go get with --update, and then tried removing all references I could find to godoc and the installing again using the commands from question # 3.
which godoc
gives “/usr/lib/go/bin/godoc”godoc net/http
prints the documentation on the command line, as expected.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 3
- Comments: 19 (9 by maintainers)
Links to this issue
Commits related to this issue
- godoc: don't try to follow all symlinks Revert https://golang.org/cl/45096. Original change description: godoc: follow symbolic links to folders in GOROOT Directory walking in godoc relies ... — committed to golang/tools by ianlancetaylor 7 years ago
- [release-branch.go1.9] godoc: don't try to follow all symlinks Revert https://golang.org/cl/45096. Original change description: godoc: follow symbolic links to folders in GOROOT Directory w... — committed to golang/tools by ianlancetaylor 7 years ago
Here’s a partially functioning workaround for anyone who cares.
If I run
godoc -http=":8080 -goroot /usr/share/go
(where /usr/share/go is the path that some of the symlinks in GOROOT point to) the server starts. It can’t find the “Documents” page so I can’t view “Effective Go” and friends locally, but at least I can navigate around package docs, including my own packages.I got this working by removing the docs symlink and taking a copy of the docs source…
in
/usr/lib/go-1.6