Native Apple M1 releases (arm64)
Has this feature been discussed and generally agreed?
Apple M1 is currently supported via Rosetta 2. There is demand for native builds. This issue tracks the required work.
Describe the solution you'd like
- [x] #2299
- [x] #2207
- [x] #2672
- [x] #2682
- [ ] Optional: As macOS 11 on M1 requires signing, we should consider signing our Mac CI builds with a temporary key (but still keep the proper signing for releases by @emlynmac , of course). As far as I understand, such "self-signatures" are sufficient to improve the situation.
- [ ] Optionally consider providing universal binaries using
lipo
Describe alternatives that have been considered
There've been no reports about problems with running the x86_64 builds via Rosetta 2 on M1. Still, running something latency-critical as Jamulus via potentially avoidable translation layers sounds non-optimal.
I‘d prefer universal builds. Why should we provide 3 macOS binaries? Doesn’t that confuse people?
How much work are universal builds?
I‘d prefer universal builds. Why should we provide 3 macOS binaries? Doesn’t that confuse people?
Yep, a single build would be best (+ legacy...).
How much work are universal builds?
I can't judge. I think it's possible (lipo seems to be the tool to make that happen). I'm not opposed (the only downsides might be download sizes and longer build times for a single target) at all, it's just that it's one step more which is why I've listed it as an individual item. If we can't do it along with the other stuff, it should not be blocking.
My initial tests were done on macos-11 with latest Xcode. While we can do that if we have a dedicated M1 build, we decided against updating to those versions for the existing build (see #2463). However, if we aim for a universal build in the end, we should probably try it on the currently configured versions.
Per the docs, it should be sufficient:
To build a universal binary, you need Xcode 12 or a later version, which adds arm64 to the standard list of build architectures for macOS binaries.
@hoffie is this likely to make 3.9.0?
@pljones I think this would need macOS builds with Qt 6
Moved to 3.9.1.
Qt is supposed to have rather good support for universal binaries (QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64). Sadly, this doesn't play well with our opus build which contains arch-specific code paths: https://github.com/hoffie/jamulus/runs/7139920524?check_suite_focus=true
Raw lipo usage might be an option, but I'm not sure if it works on .app files.
Re-Opening as the universal build is something for the next version.
I've opened new issues for the two remaining items of this issue (universal binaries, signing). I'm therefore closing this issue.