Build static executable for linux aarch64 (w/ TH) - #4193
Conversation
Sure, I can look into that. I'll put this in my backlog. Is nixpkgs dropping support for GHC 9.4 anytime soon? |
I don't think so, no. Pretty sure that this will not happen before November this year, but maybe even not well into next year. So a lot of time there :) |
2998546 to
612dfec
Compare
0ddeff4 to
b4e6060
Compare
|
Moved the update to the latest nixpkgs-unstable version to #4826.
This will be taken care of in #4797, I think. |
b4e6060 to
e667e2b
Compare
e667e2b to
10fddc9
Compare
10fddc9 to
957f5ea
Compare
Jumping past GHC 9.6, 9.8 and 9.10 immediately, because these versions do not successfully build the static binary with TemplateHaskell and iserv-proxy, yet. Michal wrote the changes to hsie. Co-authored-by: Michal Kleczek <michal@kleczek.org>
Also makes the aarch64 variant of the docker image consist of a single static executable, similar to the x86_64 variant.
957f5ea to
5d3911b
Compare
|
All jobs passed on the last run, just rebased to resolve a trivial (comment-only) merge conflict. Will merge this now, but will only know whether the actual changes to the release job for the aarch64 artifact work, when the release job on the main branch has run through. Will iterate from there, if that's not the case. |
|
Had to fix something after merge, but the release has then worked fine. We now have a docker image with both tiny layers consisting of a single executable only. No big ubuntu image for arm anymore. |
Compared to #3866, this also enables building the static executable for Linux aarch64, but keeping Template Haskell around. This is based on upstream work to make Template Haskell work with GHC 9.6+ in Nixpkgs. It's currently based off my personal branch, which is subject to change and disappear eventually. Thus, this is not ready to merge, yet. But it works.
Also, the release process around the docker image still needs to be tested.
Note: This does not mean we can suddenly start using Template Haskell everywhere again. The main problem of Template Haskell is still there: We can't cross-compile it. And we'll still want to cross-compile static executables to FreeBSD, eventually. And maybe even Windows. So the long-term goal should still be to get rid of Template Haskell.
Also, we can only do this update here, because we pin
hsieto use GHC 9.4 in the second commit. We will fall over this eventually, when GHC 9.4 is not supported in Nixpkgs anymore - or when we start using syntax that is GHC 9.6+ only at some point.hsieis tightly coupled to internal GHC APIs to do its thing, so non-trivial to update. @taimoorzaeem maybe you can look into that? Since we can separate the pin forhsieeasily, it might make sense - depending on the required changes - to just jump to e.g. GHC 9.12 immediately and don't even work with the intermediate versions. Or, if it's easier do it one version at a time - whatever works best, I guess.