
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/[email protected]: 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?
temporary workaround: rm -f go.sum then make again
@darren Thank you
but I didn't solve this problem, after I deleted go.sum

@eurekaka can you help me, I want to be a contributor。I met this problem,when I try to compile TiDB
@acmerfight Seems it's a bug of go: https://github.com/golang/go/issues/27925. And go 1.11.4 is also affected: https://github.com/golang/go/issues/27925#issuecomment-448278648
From the discussion, maybe delete Go module caches locally will make the build work normally:
go clean -modcache
Refer from go module document https://github.com/golang/go/wiki/Modules:
The module cache in Go 1.11 can sometimes cause various errors, primarily if there were previously network issues or multiple go commands executing in parallel (see #26794, which is addressed for Go 1.12). As a troubleshooting step, you can copy $GOPATH/pkg/mod to a backup directory (in case further investigation is warranted later), run go clean -modcache, and then see whether the original problem persists.
thank you, @zz-jason
So sad,
go clean -modcache didn't work, I met the same error again.
@acmerfight the error is "unknown import path"?
@zz-jason
After I run go clean -modcache
I met the same error
go: verifying github.com/grpc-ecosystem/[email protected]: checksum mismatch
downloaded: h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c=
go.sum: h1:BWIsLfhgKhV5g/oF34aRjniBHLTZe5DNekSjbAjIS6c=
@acmerfight
verifying github.com/grpc-ecosystem/[email protected]: 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
@zz-jason thank you very much. I solved this problem.
I'm going to close this issue for it is solved.
I met this issue as well.
@acmerfight
verifying github.com/grpc-ecosystem/[email protected]: checksum mismatch
From this discussion: golang/go#29278 (comment)
How about
rm go.sumandgo clean -modcache, thenmaketidb 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/[email protected]+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/[email protected]+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.
@acmerfight
verifying github.com/grpc-ecosystem/[email protected]: checksum mismatch
From this discussion: golang/go#29278 (comment)
How aboutrm go.sumandgo clean -modcache, thenmaketidb server? That is, switch your work dir to $tidb_source_dir, then:rm go.sum go clean -modcache makemy 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/[email protected]+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/[email protected]+incompatible: checksum mismatch
even though I can delete go.sum and generate
myversion 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。
> go get -u go.etcd.io/etcd/client dev [ee3ea31]
go: finding go.etcd.io/etcd v3.3.17+incompatible
go: downloading go.etcd.io/etcd v3.3.17+incompatible
go: extracting go.etcd.io/etcd v3.3.17+incompatible
verifying go.etcd.io/[email protected]+incompatible: checksum mismatch
downloaded: h1:Lla8yiEXK3cXjuK+bjzMgMdVLw0qaRJOhAEj35mynAE=
go.sum: h1:9BNNn2BNDBt0qoneUyIMIc6TgShBBdx2BFWpmTjqDfo=
I get sum with Lla8yiEXK3cXjuK+bjzMgMdVLw0qaRJOhAEj35mynAE=,
but others get sum 9BNNn2BNDBt0qoneUyIMIc6TgShBBdx2BFWpmTjqDfo=
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 ?
Most helpful comment
@acmerfight
From this discussion: https://github.com/golang/go/issues/29278#issuecomment-447535013
How about
rm go.sumandgo clean -modcache, thenmaketidb server? That is, switch your work dir to $tidb_source_dir, then: