python-build-standalone icon indicating copy to clipboard operation
python-build-standalone copied to clipboard

WIP: Windows arm64 builds - help needed

Open adiantek opened this issue 3 years ago • 4 comments

Hello,

I'm trying to add Windows ARM64 compatibility in your python-build-standalone. I started working with it. OpenSSL is compiled, libffi checks done, but https://github.com/adiantek/python-build-standalone/runs/3770671733?check_suite_focus=true#step:7:7470 why -march64 is ignored?

And I don't know why build system is 32-bit... Build system should be x86_64-w64-cygwin, and host/target aarch64:

checking build system type... i686-pc-cygwin
checking host system type... aarch64-w64-cygwin
checking target system type... aarch64-w64-cygwin

adiantek avatar Oct 01 '21 18:10 adiantek

The problem here is that the msvc.sh script in the version of libffi we are using doesn't recognize the -arm64 argument. It looks like the newer source of libffi in https://github.com/python/cpython-source-deps/tree/libffi does support this.

We should upgrade to the latest libffi and in a separate commit/PR add support for arm/arm64 builds. I'll start looking into upgrading libffi now.

indygreg avatar Oct 17 '21 19:10 indygreg

I pushed a commit to the main branch to update libffi to version 3.4.2 on Windows. After this change, I'm able to build an arm64 libffi. So you should be unblocked from finishing this PR. (It currently fails in CPython's build when handling OpenSSL when I build locally.)

Also, if we're going to implement ARM64, what do you think about doing ARM as well? I feel like it should be trivial to do both once you get 1 working? If you don't want to deal with the scope bloat, I can work on ARM once you get ARM64 working.

indygreg avatar Oct 17 '21 20:10 indygreg

Thanks for help. Unfortunately, this week I've busy, so I could look into it next week. I've Surface Pro X, so I can test it on the real device and that's why I would like to have python3 for arm64. ARM32 should run too.

adiantek avatar Oct 17 '21 20:10 adiantek

Also, if we're going to implement ARM64, what do you think about doing ARM as well? I feel like it should be trivial to do both once you get 1 working? If you don't want to deal with the scope bloat, I can work on ARM once you get ARM64 working.

Only do this if you're keen - it seems like ARM is not going to be an important user or server platform anytime soon, and the IoT applications aren't as compelling as they once were. ARM64 is the main priority for everyone.

zooba avatar Jan 19 '22 19:01 zooba