constabulary / gb

gb, the project based build tool for Go
https://getgb.io/
MIT License
2.15k stars 150 forks source link

gb installation fail. #688

Open chainhead opened 7 years ago

chainhead commented 7 years ago

I am trying to install gb on Ubuntu-16.04,64-bit. The installation fails with error message as too many errors. What am I missing?


champ@champ:~/horizon$ go version
go version go1.7.5 linux/amd64
champ@champ:~/horizon$ go get github.com/constabulary/gb/...
# runtime
/usr/local/go/src/runtime/lfstack_amd64.go:16: lfstackPack redeclared in this block
    previous declaration at /usr/local/go/src/runtime/lfstack_64bit.go:37
/usr/local/go/src/runtime/lfstack_amd64.go:20: lfstackUnpack redeclared in this block
    previous declaration at /usr/local/go/src/runtime/lfstack_64bit.go:41
/usr/local/go/src/runtime/os_linux.go:27: _FUTEX_WAIT redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:22
/usr/local/go/src/runtime/os_linux.go:28: _FUTEX_WAKE redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:23
/usr/local/go/src/runtime/os_linux.go:36: futexsleep redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:31
/usr/local/go/src/runtime/os_linux.go:67: futexwakeup redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:62
/usr/local/go/src/runtime/os_linux.go:83: getproccount redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:78
/usr/local/go/src/runtime/os_linux.go:109: _CLONE_VM redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:104
/usr/local/go/src/runtime/os_linux.go:110: _CLONE_FS redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:105
/usr/local/go/src/runtime/os_linux.go:111: _CLONE_FILES redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:106
/usr/local/go/src/runtime/os_linux.go:111: too many errors
davecheney commented 7 years ago

Sorry, something is wrong with your go install. Either you have set GOROOT or you have copied several go installations over one another.

On Tue, 31 Jan 2017, 20:36 chainhead notifications@github.com wrote:

I am trying to install gb on Ubuntu-16.04,64-bit. The installation fails with error message as too many errors. What am I missing?

champ@champ:~/horizon$ go version go version go1.7.5 linux/amd64 champ@champ:~/horizon$ go get github.com/constabulary/gb/...

runtime

/usr/local/go/src/runtime/lfstack_amd64.go:16: lfstackPack redeclared in this block previous declaration at /usr/local/go/src/runtime/lfstack_64bit.go:37 /usr/local/go/src/runtime/lfstack_amd64.go:20: lfstackUnpack redeclared in this block previous declaration at /usr/local/go/src/runtime/lfstack_64bit.go:41 /usr/local/go/src/runtime/os_linux.go:27: _FUTEX_WAIT redeclared in this block previous declaration at /usr/local/go/src/runtime/os1_linux.go:22 /usr/local/go/src/runtime/os_linux.go:28: _FUTEX_WAKE redeclared in this block previous declaration at /usr/local/go/src/runtime/os1_linux.go:23 /usr/local/go/src/runtime/os_linux.go:36: futexsleep redeclared in this block previous declaration at /usr/local/go/src/runtime/os1_linux.go:31 /usr/local/go/src/runtime/os_linux.go:67: futexwakeup redeclared in this block previous declaration at /usr/local/go/src/runtime/os1_linux.go:62 /usr/local/go/src/runtime/os_linux.go:83: getproccount redeclared in this block previous declaration at /usr/local/go/src/runtime/os1_linux.go:78 /usr/local/go/src/runtime/os_linux.go:109: _CLONE_VM redeclared in this block previous declaration at /usr/local/go/src/runtime/os1_linux.go:104 /usr/local/go/src/runtime/os_linux.go:110: _CLONE_FS redeclared in this block previous declaration at /usr/local/go/src/runtime/os1_linux.go:105 /usr/local/go/src/runtime/os_linux.go:111: _CLONE_FILES redeclared in this block previous declaration at /usr/local/go/src/runtime/os1_linux.go:106 /usr/local/go/src/runtime/os_linux.go:111: too many errors

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/constabulary/gb/issues/688, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAcA17fsG-a_7FyoOLt1NXIxIeCZKTYks5rXwCMgaJpZM4LyaEi .

chainhead commented 7 years ago

Well, I have only go installation; built from source. And, this is what I have from go env. Any ideas?


champ@champ:~$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/champ/wrkspc-go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build692762371=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
champ@champ:~$ go get github.com/constabulary/gb/...
# runtime
/usr/local/go/src/runtime/lfstack_amd64.go:16: lfstackPack redeclared in this block
    previous declaration at /usr/local/go/src/runtime/lfstack_64bit.go:37
/usr/local/go/src/runtime/lfstack_amd64.go:20: lfstackUnpack redeclared in this block
    previous declaration at /usr/local/go/src/runtime/lfstack_64bit.go:41
/usr/local/go/src/runtime/os_linux.go:27: _FUTEX_WAIT redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:22
/usr/local/go/src/runtime/os_linux.go:28: _FUTEX_WAKE redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:23
/usr/local/go/src/runtime/os_linux.go:36: futexsleep redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:31
/usr/local/go/src/runtime/os_linux.go:67: futexwakeup redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:62
/usr/local/go/src/runtime/os_linux.go:83: getproccount redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:78
/usr/local/go/src/runtime/os_linux.go:109: _CLONE_VM redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:104
/usr/local/go/src/runtime/os_linux.go:110: _CLONE_FS redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:105
/usr/local/go/src/runtime/os_linux.go:111: _CLONE_FILES redeclared in this block
    previous declaration at /usr/local/go/src/runtime/os1_linux.go:106
/usr/local/go/src/runtime/os_linux.go:111: too many errors
davecheney commented 7 years ago

Can you build any Go programs ? My suspicion is no, so this is not related to gb.

davecheney commented 7 years ago

Hang on, you said you build from source, but the location of GOROOT is reported as /usr/local/go, which is the default location when you use the binary version from the website.

Please check your $PATH, you definitely have more than one go installation on your system.

On Tue, Jan 31, 2017 at 9:16 PM, Dave Cheney dave@cheney.net wrote:

Can you build any Go programs ? My suspicion is no, so this is not related to gb.

chainhead commented 7 years ago

Correction: I downloaded a binary from here and then set the GOROOT to /usr/local/go after I unpacked the .tar.gz. And, I don't see a go version in $PATH .

Let me try this on a fresh VM and see how it goes. Please close this thread for now.

davecheney commented 7 years ago

Double check you downloaded the right version, IE amd64, not i386, and that you removed /usr/local/go before unpacking.

On Tue, 31 Jan 2017, 23:08 chainhead notifications@github.com wrote:

Correction: I downloaded a binary from here https://golang.org/dl/ and then set the GOROOT to /usr/local/go after I unpacked the .tar.gz. And, I don't see a go version in $PATH .

Let me try this on a fresh VM and see how it goes. Please close this thread for now.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/constabulary/gb/issues/688#issuecomment-276347101, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAcA0PiaJbJGW7PPn_VORAH9Pw6XrFXks5rXyQ1gaJpZM4LyaEi .

chainhead commented 7 years ago

Ok. I nuked the /usr/local/go folder and unpacked the .tar.gz file. Then, I ran the command go get github.com/constabulary/gb/... to install gb. No errors this time!

When I run gb from command line, I get a message as "program not currently installed." Apparently, it is not a system-wide installation; it gets installed under GOPATH.

I have been instructed to run gb vendor restore. It results in a FATAL error message as 'unknown command "vendor"'. There is a gb-vendor command too; but, running it returns a error message as 'it is meant to be run as gb vendor ...'.

So, how am I supposed to run the restore to install dependencies followed by a build?

PS: Should I open a new question for this?

davecheney commented 7 years ago

Is $GOPATH/bin in your $PATH?

On Tue, 31 Jan 2017, 23:34 chainhead notifications@github.com wrote:

Ok. I nuked the /usr/local/go folder and unpacked the .tar.gz file. Then, I ran the command go get github.com/constabulary/gb/... to install gb. No errors this time!

But, when I run gb from command line, I get a message as "program not currently installed."

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/constabulary/gb/issues/688#issuecomment-276351919, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAcA7JKlWYCOwYPq61pdyYBHQg1aqGcks5rXypmgaJpZM4LyaEi .