haskell.compiler.ghc902Binary: fix (system) libffi header discovery #421477
haskell.compiler.ghc902Binary: fix (system) libffi header discovery #421477wolfgangwalther merged 2 commits intoNixOS:stagingfrom
Conversation
Interestingly, this did not break anything super obvious before, but now paths between GHC and separate libraries match.
The GHC 9.0.2 bindist expects the headers of libffi to be found under /Applications/XCode.app instead of /Library (which is the case for later GHC bindists which I copied the code from). Correctly substituting this path will prevent GHC from using the bundled and thus outdated libffi headers that are broken for some reason or other. That these bundled headers were installed was actually a bug in hadrian which created the bindists because it ignored use-system-libffi before GHC 9.2. (This was actually the issue I noticed first because it hides the actual problem: Because GHC installed these headers, GHC found some version of ffi.h and ffitarget.h instead of correctly failing due to missing headers which would indicate that package db is broken.) For the sake of completeness, we can also solve this problem by deleting these headers in postInstall.
fb415fc to
fbbdcdd
Compare
|
haskell.packages.ghc94.random succeeds on aarch64-darwin. |
There was a problem hiding this comment.
Changes LGTM.
Did some more testing and all good, so far. x86_64-darwin build still pending, but I don't expect any surprises. Edit: Ah, I see you did that already by now. Will skip that.
There was one surprise, though: This is the first time, I think, that I was able to build pkgsStatic.haskell.packages.ghc94.hello successfully on darwin. Did pkgsStatic ever work on darwin before? I might be mistaken, but I think the last few times I tried it didn't work.
Now, whether that's because of this PR or not is a different question, but this is massive!
(I was not able to build th-orphans as a random TH package, yet, but that was gmp-related, so I am currently trying with native-bignum)
|
Building I certainly have never made it actually into the static PostgREST build on darwin. Even though I haven't fully made it, yet, this is 🚀! |
|
In any case, |
|
Successfully created backport PR for |
(GHC 9.4 test build is still running)
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.