You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this issue I'm writing up 3 problems that broke GHC on musl (e.g. pkgsMusl.ghc, and all of static-haskell-nix on current nixpkgs) during the last half year.
We started investigating these at ZuriHac, but didn't get to the bottom; with some more weekends sunk into it, I've now figured them out.
check_match: Assertion `version->filename == NULL error due to mismatching versions of ncurses in the GHC bindists (link)
ghc-8.6.5-binary.nix compilation fails with recompile with -fPIE (explained in this issue)
The challenging part about these problems are that they (and some fixes) were introduced in roughly the same time, such that one had to fix all 3 of them to actually get pkgsMusl.ghc to compile again, and making bisection much harder.
This meant that we were unable to make any real progress during ZuriHac 2021, and a lot more contributor free time had to be spent to figure it out.
lobby time:
An always-green Hydra that builds pkgsMusl.ghc would have saved multiple workdays of multiple people here.
If you are interested in these topics, here is the table of contents of problems plus their fixes, with links to the detail investigations:
I bisected this (writeup here to a musl change that suggests that our current way to use glibc bindists from GHC HQ, and patch musl in so that there are 2 different libcs used in the same program, only worked out of luck so far.
I plan to fix it by using the newer musl/Alpine based bindists from GHC HQ that exist for GHC > 8.10.
ghc-8.6.5-binary.nix compilation fails with recompile with -fPIE
A new issue introduced when nixpkgs started to enable "pie" hardeningfor musl only. Works fine for C, but GHC cannot yet emit outputs that are ready for pie hardening.
Explained in detail in this issue.
Conflated by the fact that the nixpkgs manual doesn't make clear that pie hardening is disabled by default for glibc, because, the heading structure of that manual section is poor, making it easy to read it as part of the enabled-by-default hardening options.
I plan to fix it by disabling pie hardening for Haskell builds, but found is already done in master by 830ef64 via PR Haskell updates #123682.
This issue can be closed when all above problems are addressed on nixpkgs master.
In this issue I'm writing up 3 problems that broke GHC on
musl(e.g.pkgsMusl.ghc, and all ofstatic-haskell-nixon current nixpkgs) during the last half year.We started investigating these at ZuriHac, but didn't get to the bottom; with some more weekends sunk into it, I've now figured them out.
The key problems:
check_match: Assertion `version->filename == NULLerror due to mismatching versions ofncursesin the GHC bindists (link)ghc-8.6.5-binary.nixcompilation fails withrecompile with -fPIE(explained in this issue)The challenging part about these problems are that they (and some fixes) were introduced in roughly the same time, such that one had to fix all 3 of them to actually get
pkgsMusl.ghcto compile again, and making bisection much harder.This meant that we were unable to make any real progress during ZuriHac 2021, and a lot more contributor free time had to be spent to figure it out.
lobby time:
An always-green Hydra that builds
pkgsMusl.ghcwould have saved multiple workdays of multiple people here.If you are interested in these topics, here is the table of contents of problems plus their fixes, with links to the detail investigations:
glibcbindists from GHC HQ, and patchmuslin so that there are 2 different libcs used in the same program, only worked out of luck so far.check_match: Assertionversion->filename == NULLerror due to mismatching versions ofncurses` in the GHC bindists (pkgsMusl.haskell.compiler.ghc883 is broken (bootstrap with ghc865-binary fails) #85924)ncurses; fixed by Fix GHC bootstrap in pkgsMusl and include patch for binutils/16177 #103183. Explained in there.ghc-8.6.5-binary.nixcompilation fails withrecompile with -fPIE"pie"hardening formuslonly. Works fine for C, but GHC cannot yet emit outputs that are ready forpiehardening.piehardening is disabled by default forglibc, because, the heading structure of that manual section is poor, making it easy to read it as part of the enabled-by-default hardening options.piehardening for Haskell builds, but found is already done inmasterby 830ef64 via PR Haskell updates #123682.This issue can be closed when all above problems are addressed on nixpkgs
master.CC the people involved in these topics: @expipiplus1 @bgamari @nomeata @domenkozar @dtzWill @lunaris @NorfairKing @maralorn @sternenseemann
Special thanks to @aveltras and
tristanCwho helped me debug a lot during ZuriHac.