update libffi dependency for arm64 to release v3.4.2 and add scripts to generate static libffi static library
The patch updates the libffi dependency for arm64 to v3.4.2 and contains a script to generate libffi from sources.
This patch also uses static library for libffi instead of the import library and shared object previously used to be independent of the libffi DLLs provided within python.
Merge request reports
Activity
@arigo / @nitzmahone - Could you review the patch please?
requested review from @arigo
removed review request for @arigo
I did some late-night experiments a few weeks ago with Windows 11/arm64 ephemeral GHA runners: using the Intel runner but doing all the build work in an arm64 process chain hanging off it, ala what we do for M1 Macs right now (it was actually running in VMs on an M1 Mac). I had to build my own windows/arm64 Python to make it work, but once I did, it worked great. The full test suite was also passing on arm64 as well, so thanks @sait-linaro for all the work on this!
I see CPython actually has a Windows/arm64 buildbot going now, so with any luck, CPython 3.11 might actually ship an official build. I might be willing to consider shipping Windows/arm64 wheels even earlier than that if I can make the builder image setup easily automatable (good thing I work for Ansible and am used to such things
😆 ).I'll try to find a bit of time in the next week or so to fire that env up again and play with this, but at a glance, looks good. Thanks for including the bits to regenerate the static libffi for Windows/arm64 as well. I dislike including static lib artifacts in the main source tree, but it's much more palatable when they weren't just copied in from some arbitrary place. I'd actually love to update the Intel Windows stuff to work the same way- it's one of those real-world compromises that acknowledges the average Windows Python user probably won't have the necessary knowledge/tools to build the whole stack themselves while still making it easy to keep everything on updated code.
Thanks, @nitzmahone for looking into it.
Glad to hear that you have managed to add win/arm64 runners to the build system through a VM running on M1 Mac.
It will be great to see wheel for win/arm64 earlier than the official python 3.11 release. As CFFI is one of the core dependencies for many other packages, it will help to enable other python packages as well.
FYI: if you want pre-built python for win/arm64 you can download it from nuget. There are multiple versions available there. You might have to rename the package to zip extension and can extract the contents.
Ah, that's great to know about nuget- the only win/arm64 binaries I'd found laying around had some problems with the libraries that prevented cffi from building properly. I was hoping the CPython buildbot might have artifacts from its nightlies publicly available, but didn't look to be the case when poking around over there.
@nitzmahone Could we try to get this closed out before the next release please ?
Edited by Niyas Saitping @nitzmahone
Sorry for the delay- had to re-create a Windows ARM64 dev env to be able to actually verify this. I was initially like "cygwin?! ew, no way", but after looking into alternatives, it's definitely the best choice at the moment. :(
I made one little tweak to the script (missed a hardcoded path), but was otherwise able to get it to work and build everything properly, with the resultant cffi binary also passing all the tests it was before. Thanks @sait-linaro so much for getting that squared away! I might also try to adapt this for the x86/x64 side of the house so we can be on a modern libffi there as well.
added 11 commits
-
9b34f706...9e73a063 - 9 commits from branch
branch/default
- e10a2dabf712 - update from default
- f0396a714fd0 - updated whatsnew.rst
-
9b34f706...9e73a063 - 9 commits from branch
mentioned in commit f0e44562c1f9