epics-base / p4p

Python bindings for the PVAccess network client and server.
BSD 3-Clause "New" or "Revised" License
27 stars 38 forks source link

release binaries for apple silicon #88

Open juanfem opened 2 years ago

juanfem commented 2 years ago

I recently got a MacBook with the M1 chip, and it would be nice to have the binaries for aarch64.

It is not a big issue, since pip can compile from sources and it works fine, but when building Docker images you need to find a way to make gcc and g++ available, at least during the build process.

Probably aarch64 binaries for epicscorelibs and pvxs would also be needed.

mdavidsaver commented 2 years ago

I agree that binaries for additional archs would be nice to have. (eg. I make use of piwheels for ARMv7)

I have some hint that recent OSX images + python releases will build with -arch arm64.

Do you know if wheels built like this on apple/x86_64 can be used on apple/arm64?

This will probably entail figuring out what the correct python wheel target name should be. (something "universal2"?) Currently the uploaded osx wheels are named as *-macosx_10_9_intel.whl regardless of -arch.

Ideally, native arm64 builders seem like the way to go. However, I don't think these are available at present from any of the free CI services.

juanfem commented 2 years ago

The wheel that would interest me the most is in fact linux/aarch64, which is the one I need to install on Docker images.

I tried building the wheel from a linux amd64 machine but I didn't succeed. I haven't even managed for the host machine, so I should keep trying... I tried to follow the pipeline you use on GHA.

mdavidsaver commented 2 years ago

linux/aarch64 would be of some interest to me as well.

My past attempts to cross-build .whl files have not be successful. As I recall, the most success I had was using a mangled raspbian disk image, qemu-arm-static, and systemd-nspawn. I could compile (very slowly!), but the tests failed as QEMU process emulation doesn't handle some of the obscure ioctl() calls that CA and PVA use. I stopped at that point because the idea of trying to automate that process was... intimidating.