tidb: met `go: verifying github.com/coreos/etcd@v3.3.10+incompatible: checksum mismatch` error, when I compile TiDB on MacBook

image

CGO_ENABLED=0 GO111MODULE=on go build -ldflags '-L/usr/local/opt/libxml2/lib -X “github.com/pingcap/parser/mysql.TiDBReleaseVersion=v2.1.0-rc.3-415-g7ee6811d9” -X “github.com/pingcap/tidb/util/printer.TiDBBuildTS=2019-01-04 02:29:23” -X “github.com/pingcap/tidb/util/printer.TiDBGitHash=7ee6811d9777bc2ae281292bf2f6313abb64b5c3” -X “github.com/pingcap/tidb/util/printer.TiDBGitBranch=master” -X “github.com/pingcap/tidb/util/printer.GoVersion=go version go1.11.4 darwin/amd64” ’ -o bin/tidb-server tidb-server/main.go go: downloading github.com/coreos/etcd v3.3.10+incompatible go: downloading github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 go: downloading golang.org/x/text v0.3.0 go: downloading github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2 go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 go: downloading golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e go: verifying github.com/grpc-ecosystem/go-grpc-middleware@v1.0.0: checksum mismatch downloaded: h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c= go.sum: h1:BWIsLfhgKhV5g/oF34aRjniBHLTZe5DNekSjbAjIS6c= make: *** [server] Error 1

go version go1.11.4 darwin/amd64

I have searched, but I don’t know how to solve this problem?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (11 by maintainers)

Most upvoted comments

@acmerfight

verifying github.com/grpc-ecosystem/go-grpc-middleware@v1.0.0: checksum mismatch

From this discussion: https://github.com/golang/go/issues/29278#issuecomment-447535013

How about rm go.sum and go clean -modcache, then make tidb server? That is, switch your work dir to $tidb_source_dir, then:

rm go.sum
go clean -modcache
make

Go this today on 3.3.10+incompatible: a local Athens gets h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= While sum.golang.org gets h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04= And a direct download gets h1:KjVWqrZ5U0wa3CxY2AxlH6/UcB+PK2td1DcsYhA+HRs=

Shouldn’t sums be reproducible and independent from the download source if the content is the same ?

@acmerfight

verifying github.com/grpc-ecosystem/go-grpc-middleware@v1.0.0: checksum mismatch

From this discussion: golang/go#29278 (comment) How about rm go.sum and go clean -modcache, then make tidb server? That is, switch your work dir to $tidb_source_dir, then:

rm go.sum
go clean -modcache
make

my problem is

go: downloading github.com/coreos/etcd v3.3.11+incompatible
go: downloading go.etcd.io/etcd v3.3.13+incompatible
go: downloading golang.org/x/text v0.3.1
verifying go.etcd.io/etcd@v3.3.13+incompatible: checksum mismatch
	downloaded: h1:rfkxarmSsXhjq8lIP2ubJgWnIFVmsepP9Ij29pUm6ng=
	go.sum:     h1:jCejD5EMnlGxFvcGRyEV4VGlENZc7oPQX6o0t7n3xbw=

it does not work for me。My colleague (under windows) always generate checksum

h1:jCejD5EMnlGxFvcGRyEV4VGlENZc7oPQX6o0t7n3xbw=

while I (under macos) always generate checksum

jCejD5EMnlGxFvcGRyEV4VGlENZc7oPQX6o0t7n3xbw=

for

go.etcd.io/etcd@v3.3.13+incompatible: checksum mismatch

even though I can delete go.sum and generate my version of go.sum and It can work fine whatever it’s go build or go run or anything but we work together with git ,the go.sum(or the checksum) has to be unique or I have to delete and regenerate go.sum over and over again.

Solved.The reason is colleagues in my team use different goproxy ,someone use https://goproxy.io and someone use that goproxy we run of our own,and then the checksum of module etcd turn out to be different。It maybe the problem of our goproxy(but anyway ,if we use the same goproxy ,problem will be solved)and we have decided to update our goproxy and check it later。