The version of GO should be 1.10 or above. #6969
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What have you changed? (mandatory)
The version of GO should be 1.10 or above,because 1.9 can't support math.Round
What are the type of the changes (mandatory)?
Bug fix
How has this PR been tested (mandatory)?
Use GO 1.9.4 version:
[root@zbdba tidb]# make server
make parser
make[1]: Entering directory
/data1/source_code/src/github.com/pingcap/tidb' CGO_ENABLED=0 go build -o bin/goyacc parser/goyacc/main.go bin/goyacc -o /dev/null parser/parser.y Parse table entries: 708693 of 1797400, x 16 bits == 1417386 bytes bin/goyacc -o parser/parser.go parser/parser.y 2>&1 | egrep "(shift|reduce)/reduce" | awk '{print} END {if (NR > 0) {print "Find conflict in parser.y. Please check y.output for more information."; exit 1;}}' rm -f y.output make[1]: Leaving directory
/data1/source_code/src/github.com/pingcap/tidb'CGO_ENABLED=0 go build -ldflags '-X "github.com/pingcap/tidb/mysql.TiDBReleaseVersion=v2.1.0-beta-7-gf6ee36e" -X "github.com/pingcap/tidb/util/printer.TiDBBuildTS=2018-07-03 06:49:15" -X "github.com/pingcap/tidb/util/printer.TiDBGitHash=f6ee36e08c3a11b9c93135f79e4ed984bee9564c" -X "github.com/pingcap/tidb/util/printer.TiDBGitBranch=master" -X "github.com/pingcap/tidb/util/printer.GoVersion=go version go1.9.4 linux/amd64"' -o bin/tidb-server tidb-server/main.go
github.com/pingcap/tidb/statistics
statistics/histogram.go:124:10: undefined: math.Round
make: *** [server] Error 2
use GO 1.10.3 version:
make success