Skip to content

Crypto:build error after upgrade go to 1.12 #32129

Closed
@Smityz

Description

@Smityz

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

AlexRouSg commented on May 18, 2019

@AlexRouSg
Contributor

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

Smityz

Smityz commented on May 18, 2019

@Smityz
Author

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

I download the source code,the add it into path

AlexRouSg

AlexRouSg commented on May 18, 2019

@AlexRouSg
Contributor

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

Smityz

Smityz commented on May 18, 2019

@Smityz
Author

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

Smityz commented on May 18, 2019

@Smityz
Author

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

you are right,I fix it now

AlexRouSg

AlexRouSg commented on May 18, 2019

@AlexRouSg
Contributor

Please close this issue then

locked and limited conversation to collaborators on May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @AlexRouSg@gopherbot@Smityz

        Issue actions

          Crypto:build error after upgrade go to 1.12 · Issue #32129 · golang/go