Closed albertov closed 5 years ago
@albertov, I just noticed that you are trying build a completely static system with
$ nix-build '<nixpkgs>' -A pkgsMusl.haskell.compiler.ghc822Binary --no-out-link
instead of cross-compiling using musl, where you would use, say, nix-build -A pkgsCross.musl64.hello
. The latter would not try to build a static GHC, but use the normal GHC to build static executables.
Is that what you intended?
@nomeata yes this is intended. I was trying to upgrade an existing project which builds static haskell exes to 19.03 which failed on this step. Just posted the failing derivation to ease reproduction. It should be possible to reproduce by trying to build any haskell executable through the pksMusl attribute (static or dynamic)
Ok, just checking (and to let possible readers know that they can also get static Haskell executables through pkgsCross.musl64
)
I should also mention that I managed to fix my build by overriding musl to undo the changes done in the failing commit, namely, downgrading musl from 1.1.21 to 1.1.20. with the previos musl version i can build static musl haskell exes with 19.03 and unstable. So it seems like for some reason the ghc binary needed to bootstrap the musl ghc breaks with newest musl.
GHC can no longer be built with the Musl libc because the
ghc822Binary
compiler needed to bootstrap no longer passes the install test. This prevents fully static executables from being produced with this tool chain.I've
git bisect
ed and 0450d28a (cc @dtzWill) was the commit that introduced the regression. To reproduce:The previous commit, b262be32, works: