Only use -race when -race is also given to build.go on the command line: x86_64 musl targets do not support the Go race runtime. diff -Nru a/build.go b/build.go --- a/build.go 2017-04-15 07:38:23.000000000 +0000 +++ b/build.go 2017-05-12 19:26:36.982569748 +0000 @@ -379,7 +379,7 @@ func test(pkgs ...string) { lazyRebuildAssets() - useRace := runtime.GOARCH == "amd64" + useRace := race && runtime.GOARCH == "amd64" switch runtime.GOOS { case "darwin", "linux", "freebsd", "windows": default: