Closed
Description
What version of Go are you using (go version
)?
$ go version go version go1.12.5 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GOARCH="amd64" GOBIN="" GOCACHE="/data/home/***/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/data/home/***/go" GOPROXY="" GORACE="" GOROOT="/usr/local/go" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/data/home/***/***/***/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build015182643=/tmp/go-build -gno-record-gcc-switches"
What did you do?
I try to update my project from Go 1.11 to Go 1.12,and use go modules to solve dependecy,I have successed update my project in go version go1.12.5 windows/amd64 with my .sh.But when I try to push it on my server(go version go1.12.5 linux/amd64),it compiled faild,I don't know why,is there any differences between two OS?
bash compile.sh # crypto/rc4 /usr/local/go/src/crypto/rc4/rc4_asm.go:15:18: (*Cipher).XORKeyStream redeclared in this block previous declaration at /usr/local/go/src/crypto/rc4/rc4.go:61:6 # bytes /usr/local/go/src/bytes/bytes_decl.go:10:6: IndexByte redeclared in this block previous declaration at /usr/local/go/src/bytes/bytes.go:101:34 /usr/local/go/src/bytes/bytes_decl.go:17:6: Equal redeclared in this block previous declaration at /usr/local/go/src/bytes/bytes.go:18:25 /usr/local/go/src/bytes/bytes_decl.go:24:6: Compare redeclared in this block previous declaration at /usr/local/go/src/bytes/bytes.go:37:27 # crypto/cipher /usr/local/go/src/crypto/cipher/xor_amd64.go:9:6: xorBytes redeclared in this block previous declaration at /usr/local/go/src/crypto/cipher/xor.go:58:33 /usr/local/go/src/crypto/cipher/xor_amd64.go:22:6: xorWords redeclared in this block previous declaration at /usr/local/go/src/crypto/cipher/xor.go:83:27 # strings /usr/local/go/src/strings/strings_decl.go:8:6: IndexByte redeclared in this block previous declaration at /usr/local/go/src/strings/strings.go:150:34
What did you expect to see?
Compile success!
What did you see instead?
Compile failed!
Activity
AlexRouSg commentedon May 18, 2019
The Go installation looks broken, how did you update it on the server?
Smityz commentedon May 18, 2019
I download the source code,the add it into path
AlexRouSg commentedon May 18, 2019
Did you delete the old installation first or did you just copy it over?
Smityz commentedon May 18, 2019
I don't know,it's not my server,I try to rm it's old folder,and install go again
Smityz commentedon May 18, 2019
you are right,I fix it now
AlexRouSg commentedon May 18, 2019
Please close this issue then