Skip to content

golangci/go-misc: checksum mismatch #344

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

Closed
ml- opened this issue Jan 1, 2019 · 7 comments
Closed

golangci/go-misc: checksum mismatch #344

ml- opened this issue Jan 1, 2019 · 7 comments

Comments

@ml-
Copy link

ml- commented Jan 1, 2019

When trying to build the project, there is a checksum mismatch when dependencies are retrieved.
I tried this on my own system, as well as on the golang:1.11.4 docker image.

$ go build -o golangci-lint ./cmd/golangci-lint/main.go

Error:

go: verifying github.com/golangci/[email protected]: checksum mismatch
	downloaded: h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw=
	go.sum:     h1:WadunOE/TeHR8U7f0TXiJACHeU3cuFOXuKafw4rozqU=

Info:
System: Arch Linux
go version go1.11.4 linux/amd64

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ml/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ml/.local/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/ml/code/golangci-lint/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-build893572642=/tmp/go-build -gno-record-gcc-switches"
@mbana
Copy link

mbana commented Jan 15, 2019

I am getting the same error but in a different context; I am trying to place all the tools that I use in tools/tools.go file.

Sample Repo:
https://github.com/banaio/go_samples/tree/master/how_can_i_track_tool_dependencies_for_a_module

git clone [email protected]:banaio/go_samples.git
cd go_samples/how_can_i_track_tool_dependencies_for_a_module
make

Error Log:
https://circleci.com/gh/banaio/go_samples/10, look at the step find * -maxdepth 1 -mindepth 1 -type d -execdir make \;.

  ---> Initialising ... 
go mod download
go: verifying github.com/golangci/[email protected]: checksum mismatch
	downloaded: h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw=
	go.sum:     h1:WadunOE/TeHR8U7f0TXiJACHeU3cuFOXuKafw4rozqU=
Makefile:11: recipe for target 'init' failed
make: *** [init] Error 1

Cause:
For someone reason this only happens when I run it on the CI, it never happens locally.

@ml-
Copy link
Author

ml- commented Jan 16, 2019

Hi @mbana,
is it possible that the Go versions of your local machine and CI differ?

I can safely reproduce this with 1.11.4.

@mbana
Copy link

mbana commented Jan 20, 2019

@jirfag jirfag closed this as completed in 59a533c Jan 21, 2019
@jirfag
Copy link
Contributor

jirfag commented Jan 21, 2019

@ml- @mbana thank you! I've fixed it in the master

@mbana
Copy link

mbana commented Jan 21, 2019

Thanks, are you going to make a new release?

@jirfag
Copy link
Contributor

jirfag commented Jan 21, 2019

Yes, I already did - v1.13

@ryboe
Copy link
Contributor

ryboe commented Jan 26, 2019

I ran into this. I fixed it by updating my go compiler to the latest version and running go clean -modcache, which clears out the cache of downloaded modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants