-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Go] Cross Build Failures with version 12.0.1 #36052
Comments
So I'm confused by this failure, we have CI builds which build on darwin arm64 successfully with go1.18. I'm not familiar with the |
In the meantime, can you try building with the |
@zeroshade I revisited the build process in our CI and the failures seem to occur with x86 platforms linux/386 and windows/386 github.com/apache/arrow/go/v12/parquet/internal/utils
/go/pkg/mod/github.com/apache/arrow/go/v12@v12.0.1-0.20230605094802-c153c6d36ccf/parquet/internal/utils/bit_reader.go:230:18: undefined: unpack32
/go/pkg/mod/github.com/apache/arrow/go/v12@v12.0.1-0.20230605094802-c153c6d36ccf/parquet/internal/utils/bit_reader.go:274:3: undefined: BytesToBools
/go/pkg/mod/github.com/apache/arrow/go/v12@v12.0.1-0.20230605094802-c153c6d36ccf/parquet/internal/utils/bit_reader.go:318:18: undefined: unpack32
note: module requires Go 1.20
Error: running "go build -o build/golang-crossbuild/filebeat-linux-386 -buildmode pie -trimpath -tags=withjournald -ldflags -s -X github.com/elastic/beats/v7/libbeat/version.buildTime=2023-06-14T10:33:13Z -X github.com/elastic/beats/v7/libbeat/version.commit=4b458e0fa9888c53f02193fac70661e5c7c0d30a" failed with exit code 2
Error: failed building for linux/386: exit status 2
failed building for linux/386: exit status 2
github.com/apache/arrow/go/v12/parquet/internal/utils
/go/pkg/mod/github.com/apache/arrow/go/v12@v12.0.1-0.20230605094802-c153c6d36ccf/parquet/internal/utils/bit_reader.go:230:18: undefined: unpack32
/go/pkg/mod/github.com/apache/arrow/go/v12@v12.0.1-0.20230605094802-c153c6d36ccf/parquet/internal/utils/bit_reader.go:274:3: undefined: BytesToBools
/go/pkg/mod/github.com/apache/arrow/go/v12@v12.0.1-0.20230605094802-c153c6d36ccf/parquet/internal/utils/bit_reader.go:318:18: undefined: unpack32
note: module requires Go 1.20
Error: running "go build -o build/golang-crossbuild/filebeat-windows-386.exe -buildmode pie -trimpath -ldflags -s -extldflags=-Wl,--nxcompat -X github.com/elastic/beats/v7/libbeat/version.buildTime=2023-06-13T20:51:44Z -X github.com/elastic/beats/v7/libbeat/version.commit=c92bf31abdfba69df79cf64aea36cfc425b305f0" failed with exit code 2
Error: failed building for windows/386: exit status 2
failed building for windows/386: exit status 2 So my initial assumption of the build failing on linux/amd64 platforms was wrong. Even after upgrading to v13 of the library did not seem to resolve this build failure. Seems like some issue on 32 bit systems. |
### Rationale for this change It looks like #35133 only addressed 32-bit build failures in the Arrow library but didn't address the Parquet library failing to build on 32-bit systems. So this fixes building the Go Parquet library for GOARCH=386 ### What changes are included in this PR? Simplify and clean up build tags and specialized asm in Go Parquet library so that we don't need to keep adding new files explicitly for architectures that we didn't generate optimized assembly for. So we set up the appropriate defaults so that those architectures will default to the pure go implementation properly. Also fixes the usage of `math.Uint32` so that it isn't seen as an untyped int constant which would overflow on 32-bit architectures. ### Are these changes tested? Yes, added a small workflow that builds the Go arrow and parquet libraries with `GOARCH=386`. * Closes: #36052 Authored-by: Matt Topol <zotthewizard@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
Describe the bug, including details regarding any error messages, version, and platform.
We are trying to use the arrow go library to create a custom parquet reader but encountering cross build errors in CI even after upgrading to version 12.0.1 .
errors:
The stack is using go 1.19 currently. Is there any way to fix these issues without upgrading to Go 1.20 ?
Component(s)
Go
The text was updated successfully, but these errors were encountered: