-
Notifications
You must be signed in to change notification settings - Fork 570
Consider ghc-musl for building fully static binaries #4572
Description
Summary
Consider using https://github.com/benz0li/ghc-musl to build fully static binaries. This project is notably used by Pandoc, Stack, and Juvix to provide fully static binaries.
Motivation
From time to time, we've seen libtinfo appear here and there on our builds, typically when we update dependencies. So far, we've managed to avoid it by putting a hard dependency on haskeline ==0.8.2, the last version that we've confirmed to not cause our builds to depend on libtinfo. #4253
Making sure that it does not appear allows the compiler to run in contexts where the dependency is unavailable, and in general improves the installation process.
However, time marches on and with it comes less active support for older versions of GHC and the libraries that we depend upon. Parts of the toolchain that we don't have full control over (like LLVM) will continue to be updated and will eventually break compilation on older GHC versions (like #4567)
Figuring out how to build a fully static PureScript would give us more confidence in keeping the compiler up to date with the overarching Haskell ecosystem.
Proposal
Build static binaries in CI using https://github.com/benz0li/ghc-musl
Examples
Stack is a fully static binary