Skip to content

[Backport release-25.05] haskell.compiler.ghc902Binary: fix (system) libffi header discovery #421836

Merged
wolfgangwalther merged 2 commits intorelease-25.05from
backport-421477-to-release-25.05
Jul 3, 2025
Merged

[Backport release-25.05] haskell.compiler.ghc902Binary: fix (system) libffi header discovery #421836
wolfgangwalther merged 2 commits intorelease-25.05from
backport-421477-to-release-25.05

Conversation

@nixpkgs-ci
Copy link
Contributor

@nixpkgs-ci nixpkgs-ci bot commented Jul 2, 2025

Bot-based backport to release-25.05, triggered by a label in #421477.

  • Before merging, ensure that this backport is acceptable for the release.
    • Even as a non-committer, if you find that it is not acceptable, leave a comment.

Interestingly, this did not break anything super obvious before, but now
paths between GHC and separate libraries match.

(cherry picked from commit 190346e)
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.

(cherry picked from commit fbbdcdd)
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: haskell General-purpose, statically typed, purely functional programming language 4.workflow: backport This targets a stable branch labels Jul 2, 2025
@nix-owners nix-owners bot requested a review from cdepillabout July 2, 2025 16:26
@wolfgangwalther
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 421836
Commit: 3d36014d7c614592447a42fb26e42f0de7108a67


aarch64-darwin

❌ 1 package failed to build:
  • haskell.packages.ghc94.haskell-language-server
✅ 10 packages built:
  • elmPackages.elm-format
  • haskell.compiler.ghc902Binary
  • haskell.compiler.ghc94 (haskell.compiler.ghc948)
  • haskell.compiler.ghc94.doc (haskell.compiler.ghc948.doc)
  • haskell.compiler.ghc947
  • haskell.compiler.ghc947.doc
  • haskell.compiler.native-bignum.ghc94 (haskell.compiler.native-bignum.ghc948)
  • haskell.compiler.native-bignum.ghc94.doc (haskell.compiler.native-bignum.ghc948.doc)
  • haskell.compiler.native-bignum.ghc947
  • haskell.compiler.native-bignum.ghc947.doc

Couldn't build HLS, because of a sandbox issue down the dependency chain, not a blocker.

@wolfgangwalther wolfgangwalther merged commit 7bc4a2b into release-25.05 Jul 3, 2025
29 of 31 checks passed
@wolfgangwalther wolfgangwalther deleted the backport-421477-to-release-25.05 branch July 3, 2025 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.workflow: backport This targets a stable branch 6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants