-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
pkgsStatic.buildPackages.haskell.compiler.ghc96 fail to build #208959
Comments
|
GHC 9.6 doesn't build with static rts etc. with hadrian: #208959 Using GHC 9.4 is a bit safer than 9.8, since packages are generally more likely to build with the older GHC.
We probably need to use a newer ghc for bootstrapping. |
Your welcome to try that, I believe it's probably a bug in hadrian for 9.6. |
How could I reproduce this locally? I'm not very familiar with nix. |
Build |
Reproducing this outside of nixpkgs may be difficult if that's what you are asking, since you won't have My currently inclination is that the bug would show itself like this:
This issue is somehow solved in 9.8, so maybe looking at the commit history for hadrian may also have some hints. If there are no plans for a 9.6.5, I don't think it is worth investigating though. |
@sternenseemann this is the default ghc for |
Static builds via the intended interface ( |
@sternenseemann that would require me to support two different ghc versions depending on whether I want to statically link. |
I found that this works and does what I want, but I have no idea why:
Edit: Actually that doesn't work when using template haskell so I still need a real fix. |
The magic/hacky solution for static TemplateHaskell no longer works with GHC >= 9.6, probably due to Hadrian as well. Hence, we are using GHC 9.4 by default which has none of these problems. We have some leads (#275304), but no solution has presented itself so far. |
@sternenseemann are you sure it's not |
I don't know. It seems likely though that were it possible to build 9.6 without dynamic libs, the same sort of problem would crop up as with 9.8. |
I wasn't going to say anything, but there is a small chance it's relevant. I have a devenv (not pure nix) project I was trying to build with ghc 9.8 today and despite having postgresql in the dependencies I get:
It seems possible this is related to dynamic/static libs, but I haven't tried reproducing with vanilla nix to verify. |
I just got it working with 9.6.5 in #316850 (comment) Can we backport this fix? |
That patch seems like a no-brainer build system bug fix, so it would be acceptable to backport. |
@sternenseemann How would I go about applying that ? I've only had terrible experiences with nixpkgs contributions and I don't have commit access. Could you apply it? |
While we're working on fixing this in #317175, you can work around this problem like this:
|
Should this be closed by the merged #317175 ? |
#275304 remains. |
Full log:
static-ghc-head-log.txt
The text was updated successfully, but these errors were encountered: