goavro
goavro copied to clipboard
constant overflows int on GO for Windows
Status: Downloaded newer image for docker.elastic.co/beats-dev/golang-crossbuild:1.15.9-arm
Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++, GOARCH=arm64, GOARM=, GOOS=linux, PLATFORM_ID=linux-arm64] # github.com/linkedin/goavro /go/pkg/mod/github.com/linkedin/[email protected]+incompatible/array.go:48:34: constant -9223372036854775808 overflows int /go/pkg/mod/github.com/linkedin/[email protected]+incompatible/array.go:86:35: constant -9223372036854775808 overflows int /go/pkg/mod/github.com/linkedin/[email protected]+incompatible/binaryReader.go:96:27: constant -9223372036854775808 overflows int /go/pkg/mod/github.com/linkedin/[email protected]+incompatible/binaryReader.go:144:28: constant -9223372036854775808 overflows int /go/pkg/mod/github.com/linkedin/[email protected]+incompatible/map.go:50:34: constant -9223372036854775808 overflows int /go/pkg/mod/github.com/linkedin/[email protected]+incompatible/map.go:97:35: constant -9223372036854775808 overflows int Error: running "go build -o build/golang-crossbuild/filebeat-windows-386.exe -ldflags -s -extldflags=-Wl,--nxcompat -X github.com/elastic/beats/v7/libbeat/version.buildTime=2021-05-19T13:50:32Z -X github.com/elastic/beats/v7/libbeat/version.commit=651a2ad1225f3d4420a22eba847de385b71f711d" failed with exit code 2
See also : https://github.com/golang/go/issues/23086
This also happens on a raspberry pi running linux (arm 32bit). According to https://github.com/golang/go/issues/23086#issuecomment-371017565 it should be an easy fix:
return nil, fmt.Errorf("cannot read map with block count: %d", int64(math.MinInt64))
instead of
return nil, fmt.Errorf("cannot read map with block count: %d", math.MinInt64)
But at least for me, this issue is fixed in the most recent release (2.10.0), although I did not try any between 2.1.0 (where it was not working) and this one.