python3Packages.cffi: fix missing ffi_prep_closure_loc() on macos < 10.15 #280546
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.
In the course of testing out the fix that ultimately landed in #278945, I ran into the following missing-function error in cffi's test suite:
The missing function is in turn caused by these defines: https://github.com/python-cffi/cffi/blame/feaff378873d8a3f52bbb63f7d5e24f9ab18f1e9/src/c/_cffi_backend.c#L106-L113
If I understand correctly (I may not), cffi is assuming the system libffi here, which doesn't apply in our case. (cc @reckenrode)
(The underlying defines (which affect macOS before 10.15) have been in cffi for 4+ years now, so I'm not quite sure how we haven't picked up on it already.)
Description of changes
I edited the patch for this behavior (pkgs/development/python-modules/cffi/darwin-use-libffi-closures.diff) to remove the version check.
I went ahead and did this for all 3 checks, even though I suspect we didn't technically need all of them to pass the test failure above.
Things done
I was able to successfully build and use
nix
with this patch present.nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-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.