Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crypto:build error after upgrade go to 1.12 #32129

Closed
Smityz opened this issue May 18, 2019 · 6 comments
Closed

Crypto:build error after upgrade go to 1.12 #32129

Smityz opened this issue May 18, 2019 · 6 comments

Comments

@Smityz
Copy link

Smityz commented May 18, 2019

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!

@AlexRouSg
Copy link
Contributor

The Go installation looks broken, how did you update it on the server?

@Smityz
Copy link
Author

Smityz commented May 18, 2019

The Go installation looks broken, how did you update it on the server?

I download the source code,the add it into path

@AlexRouSg
Copy link
Contributor

Did you delete the old installation first or did you just copy it over?

@Smityz
Copy link
Author

Smityz commented May 18, 2019

Did you delete the old installation first or did you just copy it over?

I don't know,it's not my server,I try to rm it's old folder,and install go again

@Smityz
Copy link
Author

Smityz commented May 18, 2019

Did you delete the old installation first or did you just copy it over?

you are right,I fix it now

@AlexRouSg
Copy link
Contributor

Please close this issue then

@Smityz Smityz closed this as completed May 18, 2019
@golang golang locked and limited conversation to collaborators May 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants