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

No cgo zstd support on ARM? #655

Open
tylerd-canva opened this issue Apr 27, 2023 · 4 comments
Open

No cgo zstd support on ARM? #655

tylerd-canva opened this issue Apr 27, 2023 · 4 comments

Comments

@tylerd-canva
Copy link

I'm currently using using version 2.3.9 on linux/amd64 with zstd_implementation: cgo with no issues. I'm just testing out a new ARM CI instance and running into this error:

Unrecognized ZSTD implementation: cgo, supported: map[go:{}]

Is this a known issue? I wonder if it has something to do with cross-compiling for ARM which then maybe disables CGO? I couldn't find anything indicating one way or the other in the GitHub actions steps.

I'll give it a shot with 2.4.1 and report back.

@mostynb
Copy link
Collaborator

mostynb commented Apr 27, 2023

Hmm, it works when I make a local build, but the release binary looks like it wasn't built with this enabled. I will try to fix this and replace the binaries tomorrow.

@tylerd-canva
Copy link
Author

I tested with 2.4.1 as well and noticed the same issue. Is CGO used anywhere else in the codebase? I have never had good luck with cross-compiling Go when using CGO so I suspect to get this working with CI we would need GitHub Actions to support ARM runners.

@mostynb
Copy link
Collaborator

mostynb commented Apr 29, 2023

I rebuilt and re-uploaded this, and confirmed that --zstd_implementation cgo works:
https://github.com/buchgr/bazel-remote/releases/download/v2.4.1/bazel-remote-2.4.1-linux-arm64

Can you try that and let me know how it goes?

I will keep this issue open until I figure out how to make this work automatically for the next release.

@tylerd-canva
Copy link
Author

Yep, seems to be working. Thanks!

mostynb added a commit to mostynb/bazel-remote that referenced this issue May 7, 2023
This might make cross compiling a bit more difficult, but it is less
surprising when you know cgo will be enabled if it builds.

Background in buchgr#655.
mostynb added a commit to mostynb/bazel-remote that referenced this issue May 7, 2023
This might make cross compiling a bit more difficult, but it is less
surprising when you know cgo will be enabled if it builds.

Background in buchgr#655.
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