Closed

Description
What version of Go are you using (go version
)?
$ go version go version go1.11 darwin/amd64
Does this issue reproduce with the latest release?
No
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GOARCH="amd64" GOBIN="/Users/evan.zeller/go/bin" GOCACHE="/Users/evan.zeller/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/evan.zeller/go" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.11/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.11/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" 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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4l/fg606zhd2b51yn6bdrg0pd4m0000gq/T/go-build195799974=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
Built my project with a custom make target that executes go build. The full go build command is:
@CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s" -a -installsuffix cgo -i -v -o ${OUT_DIR}/${OUT_FILE} ${PKG}/cmd/...
$ make build errors internal/race unicode/utf8 math/bits runtime/internal/sys runtime/internal/atomic sync/atomic internal/cpu encoding unicode unicode/utf16 golang_org/x/net/dns/dnsmessage internal/nettrace container/list crypto/internal/subtle internal/testlog internal/bytealg crypto/subtle math golang_org/x/crypto/cryptobyte/asn1 google.golang.org/grpc/resolver golang_org/x/crypto/curve25519 google.golang.org/grpc/resolver/passthrough runtime strconv crypto/rc4 sync internal/singleflight google.golang.org/grpc/internal/grpcsync io math/rand reflect syscall hash crypto/internal/randutil bytes text/tabwriter strings crypto/cipher crypto hash/crc32 crypto/hmac crypto/sha512 crypto/md5 crypto/sha1 crypto/aes crypto/sha256 bufio html golang_org/x/text/transform path google.golang.org/grpc/encoding golang.org/x/text/transform internal/syscall/unix time google.golang.org/grpc/internal/grpcrand google.golang.org/grpc/keepalive internal/poll google.golang.org/grpc/internal/backoff encoding/binary sort os regexp/syntax golang_org/x/crypto/poly1305 golang_org/x/crypto/internal/chacha20 encoding/base64 crypto/des encoding/pem golang_org/x/crypto/chacha20poly1305 google.golang.org/grpc/internal/envconfig path/filepath fmt io/ioutil regexp github.com/grpc-ecosystem/grpc-gateway/utilities log context net/url flag text/template/parse compress/flate encoding/json encoding/hex golang.org/x/net/internal/timeseries golang.org/x/net/context math/big golang_org/x/text/unicode/bidi compress/gzip golang_org/x/text/unicode/norm golang_org/x/net/http2/hpack net mime mime/quotedprintable net/http/internal text/template google.golang.org/grpc/grpclog google.golang.org/grpc/internal google.golang.org/grpc/metadata google.golang.org/grpc/connectivity google.golang.org/grpc/codes golang.org/x/text/unicode/bidi golang_org/x/text/secure/bidirule golang.org/x/text/unicode/norm golang.org/x/net/http2/hpack github.com/golang/protobuf/proto google.golang.org/grpc/tap go/token golang.org/x/text/secure/bidirule os/exec go/scanner github.com/golang/protobuf/protoc-gen-go/generator/internal/remap go/ast html/template golang.org/x/net/idna golang_org/x/net/idna crypto/rand crypto/elliptic encoding/asn1 crypto/rsa crypto/dsa crypto/ecdsa crypto/x509/pkix golang_org/x/crypto/cryptobyte go/parser go/doc go/printer go/build google.golang.org/grpc/credentials/internal golang_org/x/net/http/httpproxy google.golang.org/grpc/stats net/textproto crypto/x509 golang.org/x/sys/unix go build golang.org/x/sys/unix: module requires Go 1.12 google.golang.org/grpc/naming google.golang.org/grpc/resolver/dns golang_org/x/net/http/httpguts mime/multipart golang.org/x/net/http/httpguts github.com/golang/protobuf/ptypes/empty google.golang.org/grpc/encoding/proto github.com/golang/protobuf/ptypes/duration github.com/golang/protobuf/ptypes/timestamp github.com/golang/protobuf/ptypes/any github.com/golang/protobuf/ptypes/struct github.com/golang/protobuf/protoc-gen-go/descriptor github.com/golang/protobuf/ptypes/wrappers crypto/tls google.golang.org/genproto/protobuf/field_mask google.golang.org/genproto/googleapis/rpc/status github.com/golang/protobuf/jsonpb google.golang.org/grpc/binarylog/grpc_binarylog_v1 github.com/golang/protobuf/ptypes github.com/grpc-ecosystem/grpc-gateway/internal google.golang.org/grpc/status github.com/golang/protobuf/protoc-gen-go/plugin google.golang.org/genproto/googleapis/api/annotations google.golang.org/grpc/internal/binarylog github.com/golang/protobuf/protoc-gen-go/generator net/http/httptrace google.golang.org/grpc/credentials google.golang.org/grpc/peer google.golang.org/grpc/balancer net/http google.golang.org/grpc/balancer/base google.golang.org/grpc/balancer/roundrobin net/http/httputil golang.org/x/net/trace github.com/grpc-ecosystem/grpc-gateway/runtime golang.org/x/net/http2 make: *** [build] Error 1
Note the outputs:
go build golang.org/x/sys/unix: module requires Go 1.12
and
make: *** [build] Error 1
What did you expect to see?
No errors, successful build.
What did you see instead?
Error code 1 returned by the compiler.
This is due to the commit merged yesterday: https://go-review.googlesource.com/c/sys/+/165751
While it is true the compilation does not actually fail, the compiler still outputs an error code of 1 breaking any higher level build systems (make, jenkins, etc).