[Backport release-25.05] haskell.compiler.ghc902Binary: fix (system) libffi header discovery #421836
Merged
wolfgangwalther merged 2 commits intorelease-25.05from Jul 3, 2025
Merged
Conversation
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)
13 tasks
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bot-based backport to
release-25.05, triggered by a label in #421477.