Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request – Download for Apple Silicon / aarch64 #2073

Open
obitwrite opened this issue Nov 28, 2024 · 22 comments
Open

Feature request – Download for Apple Silicon / aarch64 #2073

obitwrite opened this issue Nov 28, 2024 · 22 comments

Comments

@obitwrite
Copy link

obitwrite commented Nov 28, 2024

Hydrogen version * : 1.2.3
Operating system + version : macOS Sonoma / Sequoia
Audio driver + version : Not relevant


Dear all, I've looked everywhere, on the website and on this Github, but couldn't find if someone already asked this – or if this has been answered. With more and more Macs moving away from Intel-processors, would it be possible to provide an Apple Silicon/aarch64 download of Hydrogen?

@cme
Copy link
Contributor

cme commented Nov 28, 2024

It's not currently possible with the CI/CD system we use to produce the release images (Appveyor) because it uses Homebrew to supply libraries and Homebrew doesn't support universal binaries at the moment.

@cme
Copy link
Contributor

cme commented Nov 28, 2024

Although, I could easily contribute AArch64 macOS builds.... hmm.

@obitwrite
Copy link
Author

I see, thanks for the quick reply. Reading your second comment: so, a aarch64 macOS build that is separate from Homebrew is possible? If so, that would be great!

@cme
Copy link
Contributor

cme commented Nov 28, 2024

I see, thanks for the quick reply. Reading your second comment: so, a aarch64 macOS build that is separate from Homebrew is possible? If so, that would be great!

Not separate from Homebrew, just using native AArch64 Homebrew on an Apple Silicon build host

@obitwrite
Copy link
Author

Ah, I understand! Would be great if a aarch64 macOS build is possible this way!

@theGreatWhiteShark
Copy link
Contributor

Homebrew doesn't support universal binaries at the moment

Does this mean it would be in general possible to compile a macOS binary which could run on both x86_64 and AArch64?

@obitwrite
Copy link
Author

I guess a universal binary would be the ideal situation @theGreatWhiteShark – would this be possible @cme ?

@cme
Copy link
Contributor

cme commented Dec 3, 2024

Homebrew doesn't support universal binaries at the moment

Does this mean it would be in general possible to compile a macOS binary which could run on both x86_64 and AArch64?

Yep. It's not supported by Homebrew though as it builds only native binaries, we'd have to compile all dependencies from it, including Qt

@theGreatWhiteShark
Copy link
Contributor

we'd have to compile all dependencies from it, including Qt

Hmm. That's a lot. Maybe we can convince Homebrew to use the precomiled version of Qt provided by AppVeyor. Or maybe MacPorts would do a better job.

@obitwrite
Copy link
Author

Thanks for all the replies! So, there's 3 options, if I can sum up your comments @theGreatWhiteShark @cme. Correct me if I'm wrong.

  1. Homebrew on a native Apple Silicon build host. This requires that all depedencies are built from it, because they need to also be aarch64?
  2. Homebrew with precompiled version of qt provided by AppVeyor. But is this version of qt aarch64 / Apple Silicon compatible or x86? Or doesn't that matter?
  3. Macports. Any downsides?

@cme
Copy link
Contributor

cme commented Dec 14, 2024

I've just spent a frustrating hour or so trying to build working AArch64 macos binaries for 1.2.4. It seems that the combination of Qt, Howebrew and Sonoma somehow causes macdeplopqt to build broken apps. I haven't built a dmg in a long time, certainly not since upgrading to Sonoma, and it previously Just Worked but now is broken. Grr. I shall check if an Appveyor Sonoma image can build working dmgs for x86_64 tomorrow, as well as dig into macdeployqt.

As for universal binaries, I think it needs a move to Qt6. @theGreatWhiteShark do you think it's viable (in future) to support building with Qt5 for legacy targets and Qt6 for up-to-date systems?

@cme
Copy link
Contributor

cme commented Dec 15, 2024

Okay, turns out it just needed signing after the deploy. Grr.

Apple Silicon images added to the release assets: https://github.com/hydrogen-music/hydrogen/releases/tag/1.2.4

I should look at automating this...

@theGreatWhiteShark
Copy link
Contributor

As for universal binaries, I think it needs a move to Qt6. @theGreatWhiteShark do you think it's viable (in future) to support building with Qt5 for legacy targets and Qt6 for up-to-date systems?

I think this is no problem at all (given backward-compatibility of our Qt code). If I'm not mistaking we are already shipping all required Qt shared libraries as part of the .AppImage, .dmg, and .exe. We only have to ensure the code still builds with older Qt versions since probably a couple of Linux OSs have not moved to Qt6. But this is no problem either. We can just make the default Linux test pipeline stick to an older Qt version.

Which version should do you need? 6.8 right away?

Okay, turns out it just needed signing after the deploy. Grr.

Yeah. Windows folks are complaining too that Windows Defender prevents them from installing the application. But, honestly, with so many things on my short list, open tickets, and so much ground still to cover for 2.0 I have not found any motivation for investing resources in complying with Microsoft stuff yet.

@theGreatWhiteShark
Copy link
Contributor

Apple Silicon images added to the release assets: https://github.com/hydrogen-music/hydrogen/releases/tag/1.2.4

Nice! I just added it to SourceForge too.

Since we provide a range of supported OS versions on our hydrogen-music.org download page: does it have the same limitations as the AppVeyor artifact (OS X 10.14 and above)?

@obitwrite
Copy link
Author

Thanks very much for your work @cme on this Apple Silicon build – and of course @theGreatWhiteShark on all your work on Hydrogen. I'm going to check it out. I'll let you know if I run into anything. But this really helps me to transfer all my creative tools over from a really old Macbook, to an Apple Silicon one.

I guess the question remaining is how to optimize and automate the build. And perhaps work toward a universal build, which would make separate x86/aarch64 builds unnecessary.

@cme
Copy link
Contributor

cme commented Dec 17, 2024

Thanks very much for your work @cme on this Apple Silicon build – and of course @theGreatWhiteShark on all your work on Hydrogen. I'm going to check it out. I'll let you know if I run into anything. But this really helps me to transfer all my creative tools over from a really old Macbook, to an Apple Silicon one.

I always found x86_64 binaries under Rosetta2 to be imressively fast, and Hydrogen in particular was entirely satisfactory for my use with it. But, of course, native is always better :)

@cme
Copy link
Contributor

cme commented Dec 17, 2024

Since we provide a range of supported OS versions on our hydrogen-music.org download page: does it have the same limitations as the AppVeyor artifact (OS X 10.14 and above)?

No, there haven't been any ABI-breaking changes since Apple Silicon appeared, so they should run on any macOS that Apple Silicon will run on. I've tested it on a Monterey VM, will create a Big Sur (the earliest macOS to support Apple Silicon) VM and check that just in case.

@obitwrite
Copy link
Author

I always found x86_64 binaries under Rosetta2 to be imressively fast, and Hydrogen in particular was entirely satisfactory for my use with it. But, of course, native is always better :)

I've also heard great stories about Rosetta2. It works wonders. And I hope Apple will support it for a long time, but I've also known Apple for suddenly removing stuff that they think is no longer needed. So I'd rather go future-proof with native apps. So it's great that Hydrogen is now future-proof on Mac 😎👍. Thanks again!

@theGreatWhiteShark
Copy link
Contributor

Do we keep this one open until we found a way to automate it?

@obitwrite
Copy link
Author

If you want, I could edit the Title to include the automation (and perhaps also the universal binary).

@cme
Copy link
Contributor

cme commented Dec 19, 2024

Which version should do you need? 6.8 right away?

Looks like all the Qt6 versions installed on the Appveyor images are already universal, it's just all the other libraries to figure out now...

There's another route which is to replace the Homebrew Hydrogen package so that it builds in Homebrew so would get the same native libraries as anything else built in Homebrew.

@theGreatWhiteShark
Copy link
Contributor

so that it builds in Homebrew

Does it build on server or client side?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants