-
Notifications
You must be signed in to change notification settings - Fork 843
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
Alternatives to a self-hosted runner to build statically-linked Stack for Linux/AArch64? #6531
Comments
I have runners for aarch64 linux that are not based on NixOS. They are currently hooked up to:
I'm already building stack binaries there and it works. The problem is you can't share runners across repos/orgs. So you have to start a separate agent on the same machine and they don't know about each other, potentially leading to resource exhaustion if they happen to run at the same time. |
My experiment is not succeeding, so far, with:
To investigate: (1) what is the source of that (2) can it be overcome? EDIT: Perhaps it is that I need to start the Docker daemon manually: https://docker-docs.uclv.cu/config/daemon/#start-the-daemon-manually EDIT2: That part of the Docker documentation appears to be misleading: moby/moby#27102 EDIT3: It seems possible that it is simply not possible to connect to the Docker daemon on macOS from the command line:
EDIT4: These blog posts may be of assistance: |
Using https://github.com/abiosoft/colima seemed promising, but
This is a known problem: the |
However,
built executable files but, understandably, failed when the Haskell script came to test them in macOS:
EDIT: If I create an Alpine Linux VM on my Mac mini with UTM and share the relevant directory with the VM, I can, however, test the executable:
|
The private beta is enabled in the haskell org. But those runners are not free. |
@benz0li, may I ask - the (statically-linked?) GHC for Alpine Linux/AArch64 that you build - are the binary distributions separately available for use on the OS, or are they only published as part of a Docker image? |
Re #6531 Create release-linux-aarch64.hs for use on macOS/AArch64
I implemented my 'local' macOS/AArch64 solution as a separate experimental Haskell script |
They are dynamically-linked
and only available as part of the docker images. ℹ️ I have no plans to upload the bindists to a permanent public storage. That is the reason for
in the Dev Containers. Use Cross Reference: #6141 (comment) ff |
@benz0li, noted. My reason for asking is that I tried to use the GHC project's own GHC 9.8.2 for Alpine Linux 3.18/AArch64 in an Alpine Linux 3.19.1 VM on macOS/AArch64 to build a statically-linked Stack, but it fell over. (It worked fine when building a dynamically-linked Stack.) However, I can now build a statically-linked Stack for Linux/AArch64 if I use your Docker images on a Mac mini/M1 locally. |
I was hoping that the official Alpine Linux[/AArch64] releases would work correctly1 – and make my project obsolete. As long as this is not the case I will continue to maintain https://github.com/benz0li/ghc-musl. Footnotes |
Re #6531 Allow cross-OS use of `release.hs`
An alternative might be building the image under emulation with QEMU. Cross references:
This allows building
|
ℹ️ I may start building and releasing unofficial and untested RISC-V (64-bit) release assets at https://gitlab.b-data.ch/commercialhaskell/stack/-/releases until official RISC-V release assets are available. |
@mpilgrem Due to https://gitlab.haskell.org/ghc/ghc/-/issues/25093? |
Unofficial and untested RISC-V release assets are now available at https://gitlab.b-data.ch/commercialhaskell/stack/-/releases. |
Stack currently uses a GitHub workflow and a self-hosted runner to build a statically-linked Stack for Linux/AArch64.
Historically, the runner has been provided by FP Complete. It provides Ubuntu 20.04.2 LTS on AArch64. The statically-linked Stack is then built in an Docker container providing Alpine Linux, with:
The Docker image being specified (currently) by:
@benz0li having managed to compile versions of GHC that work on Alpine Linux/AArch64.
The Haskell Foundation tried to provide a replacement runner but its machine provides NixOS on AArch64 and, as @chreekat has explained elsewhere, exposure to that environment is not good for building binaries.
I am thinking about possible alternatives. One thing I am going to explore - it may fail - is that GitHub runner
macos-14
provides an AArch64 machine architecture and Docker is available for macOS/AArch64.The text was updated successfully, but these errors were encountered: