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

32-bit test failures in libgv/utf16chunk/chunkreader_test.go #2

Open
fossdd opened this issue Sep 11, 2024 · 0 comments
Open

32-bit test failures in libgv/utf16chunk/chunkreader_test.go #2

fossdd opened this issue Sep 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@fossdd
Copy link

fossdd commented Sep 11, 2024

go test fails on common 32-bit architectures like armhf, armv7, x86.

# go.mau.fi/mautrix-gvoice/pkg/libgv/utf16chunk_test [go.mau.fi/mautrix-gvoice/pkg/libgv/utf16chunk.test]
pkg/libgv/utf16chunk/chunkreader_test.go:111:51: cannot use 1 << 31 (untyped int constant 2147483648) as int value in argument to utf16chunk.UTF16Length (overflows)

The related line:

got, _ := utf16chunk.UTF16Length([]byte(input), 1<<31)

I guess that's not a a high priority but nice to fix. Thanks for all the mautrix-* stuff, really makes me happy!

BTW, to setup a armv7 build environment you could use docker if you don't have real hardware handy:

$ doas docker run --platform linux/arm/v7 -it -v .:/gvoice arm32v7/alpine
# apk add go
# cd gvoice
# go test -v ./pkg/libgv/utf16chunk/
@fossdd fossdd added the bug Something isn't working label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant