Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constant overflows int on GO for Windows #225

Open
vortex314 opened this issue May 19, 2021 · 1 comment
Open

constant overflows int on GO for Windows #225

vortex314 opened this issue May 19, 2021 · 1 comment

Comments

@vortex314
Copy link

vortex314 commented May 19, 2021

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/goavro@v2.1.0+incompatible/array.go:48:34: constant -9223372036854775808 overflows int
/go/pkg/mod/github.com/linkedin/goavro@v2.1.0+incompatible/array.go:86:35: constant -9223372036854775808 overflows int
/go/pkg/mod/github.com/linkedin/goavro@v2.1.0+incompatible/binaryReader.go:96:27: constant -9223372036854775808 overflows int
/go/pkg/mod/github.com/linkedin/goavro@v2.1.0+incompatible/binaryReader.go:144:28: constant -9223372036854775808 overflows int
/go/pkg/mod/github.com/linkedin/goavro@v2.1.0+incompatible/map.go:50:34: constant -9223372036854775808 overflows int
/go/pkg/mod/github.com/linkedin/goavro@v2.1.0+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 : golang/go#23086

@graipher
Copy link

graipher commented Aug 12, 2021

This also happens on a raspberry pi running linux (arm 32bit).
According to golang/go#23086 (comment) 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants