Issue is similar to the one described here but the answer did not help me.
I use Go 1.4 built from source. I have issued $ go install -x -a
to force the rebuild of all packages (although I only made a change to a single go file). The project is well structured and contains a command in a file named main.go with package main
and func main()
I am running out of ideas but gained a better understanding of the build process...
$ go env
GOARCH="386"
GOBIN=""
GOCHAR="8"
GOEXE=""
GOHOSTARCH="386"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/jdevoo/Downloads/go"
GORACE=""
GOROOT="/home/jdevoo/go"
GOTOOLDIR="/home/jdevoo/go/pkg/tool/linux_386"
CC="gcc"
GOGCCFLAGS="-fPIC -m32 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
Any ideas?
It really depends on where exactly is your main.go
.
It should be in $GOPATH/src/yourProject/main.go
, for a go install
to generate a $GOPATH/bin/yourProject
.
That is what "Your first program" describes.
$GOPATH
is your workspace, and should always include src
, pkg
and bin
.
To get a binary specifically for that command:
cd $GOPATH/src/github.com/eris-ltd/decerver/cmd/decerver/
go get
# or
go install
Note the -x
option is supposed to "print the command" only.-a
would force rebuilding.