doronbehar/pistol

GitHub release for ARM64/`aarch64` binary

latipun7 opened this issue · 13 comments

Currently GitHub Release only has single binary for amd64 architecture. I prefer to download binary from there so I don't need to compile/build it myself.

But I can't use this in my raspberryPI with the aarch64 architecture. Does this tool can be build on aarch64? If so, please make automated build for aarch64 as well and released on GitHub Release.

Thank you very much 🙏

See also #77 and #78.

Another option is to setup github actions to compile pistol on a VM inside Github's x86_64 docker instances. I just had some small and incomplete but good experience with this GitHub action.

Yes. GitHub Actions is what I thought for easy CI/CD. I don't know golang yet, but I think goreleaser action is more simple.
I'll try to help with this if I can do something. Let's see ...

I too considered goreleaser, but I encountered issues with it because pistol depends on file the C library..

I'd try to run plain go build commands in that GitHub action.

Ahh... right. Tried with goreleaser too, but encountered error because failed to build to another arch. So this is really the issue about golang cross compiling. I don't have any experience with golang, TBH.

Read their documentations, it seems really the limitation of goreleaser, and they provide hacky ways to do cross compiling using goreleaser.

Thanks for the links, I will not approve the usage of executables generated by https://github.com/goreleaser/goreleaser-cross-example-sysroot - these are plain precompiled files that are not reproducible. (https://github.com/goreleaser/goreleaser-cross-example uses that repository as a submodule)

I tested the new release for my aarch64 Raspberry Pi from https://github.com/doronbehar/pistol/releases/download/v0.4.0/pistol-aarch64.aarch64

That binary works 👍 Since that file is the exact request of this thread, you could close this issue. Thanks for your support 🙏

Now, I suggest that release binaries don't change the name, so I can automate downloading the file for the future release. Thank you very much ✨

I'm sorry to flood in here. The latest release aarch64 binary works on aarch64, but break for x86_64 machine for that binary (https://github.com/doronbehar/pistol/releases/download/v0.4.0/pistol)

❯ uname -a
Linux ArchROG 6.2.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 07 Apr 2023 02:10:43 +0000 x86_64 GNU/Linux

❯ wget https://github.com/doronbehar/pistol/releases/download/v0.4.0/pistol
--2023-04-13 15:21:24--  https://github.com/doronbehar/pistol/releases/download/v0.4.0/pistol
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/183596103/92971c2a-b37a-49b4-9bd3-6deca4f726aa?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230413%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230413T082125Z&X-Amz-Expires=300&X-Amz-Signature=a673ca84fd01c7cf1b3278d7bc8c9938dd5eff18c72566f447872740d796b4e7&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=183596103&response-content-disposition=attachment%3B%20filename%3Dpistol&response-content-type=application%2Foctet-stream [following]
--2023-04-13 15:21:25--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/183596103/92971c2a-b37a-49b4-9bd3-6deca4f726aa?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230413%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230413T082125Z&X-Amz-Expires=300&X-Amz-Signature=a673ca84fd01c7cf1b3278d7bc8c9938dd5eff18c72566f447872740d796b4e7&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=183596103&response-content-disposition=attachment%3B%20filename%3Dpistol&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16421568 (16M) [application/octet-stream]
Saving to: ‘pistol’

pistol                                         100%[====================================================================================================>]  15,66M  1,44MB/s    in 12s

2023-04-13 15:21:38 (1,28 MB/s) - ‘pistol’ saved [16421568/16421568]

❯ ./pistol --help
zsh: exec format error: ./pistol

Hey, thanks for noticing the new release and trying it out. Indeed I had some mess with the release assets. Now the 0.4.1 release should include the correct files, with perhaps even more expected file names.

I'll close this for now, feel free to open a new issue if there's anything wrong with those binaries (I haven't tested them myself).

Hello, I'm currently on M1 mac and v0.4.1 aarch64 build fails on this error.
zsh: exec format error: pistol

Hello, these aarch64 builds are not meant for darwin, but for Linux only. I should have noted that in the file name. Now I updated the README to mention that, and added a -linux to the file names in the latest release.