yacreader
yacreader copied to clipboard
Add ARM64 MacOS builds
The current release of YACReader for MacOS is only compiled for Intel CPUs. While it does work, it takes about 4 seconds for it to load. When I built YACReader as an ARM64 build on my M1 Mac, it took less than a second to launch. Now that all the new Mac products Apple will be producing use ARM64, I think it would be great if YACReader added a download for them.
All I had to do to make it work was recompile libpdfium.so and libunarr.a for ARM64, and then compile YACReader like normal. It launches significantly faster, and probably uses less battery.
Hi and thanks for taking the time to test this. An ARM64 build will most certainly come, but I can't promise that we will be able to ship it with the next release as our CI has no support for ARM64 builds yet, so this is all "build by hand" and @luisangelsm is the only one on the team who has access to M1 hardware (I think). The current Mac builds as @luisangelsm has configured them use different libraries (7zip and pdfkit), but that should not be an issue. We also ship libqrencode, so that one needs to be built for ARM64 too.
The real question here is the state of M1 support in the Qt5 toolkit. Maybe you could share your experiences on this front with us?
I don't really know much about Qt, all I can tell you is that I downloaded Qt@5 from Homebrew, compiled the pdf/compression libraries for ARM64, and then just built YACReader. It didn't require any special tweaks or anything, and it just works. A quick Google search says that you might be able to define a custom "kit" in Qt Creator to cross-compile here, although I'm not sure how much of this applies to YACReader.
The current release of YACReader for MacOS is only compiled for Intel CPUs. While it does work, it takes about 4 seconds for it to load. When I built YACReader as an ARM64 build on my M1 Mac, it took less than a second to launch. Now that all the new Mac products Apple will be producing use ARM64, I think it would be great if YACReader added a download for them.
All I had to do to make it work was recompile libpdfium.so and libunarr.a for ARM64, and then compile YACReader like normal. It launches significantly faster, and probably uses less battery.
Could you please share your build?
The current release of YACReader for MacOS is only compiled for Intel CPUs. While it does work, it takes about 4 seconds for it to load. When I built YACReader as an ARM64 build on my M1 Mac, it took less than a second to launch. Now that all the new Mac products Apple will be producing use ARM64, I think it would be great if YACReader added a download for them. All I had to do to make it work was recompile libpdfium.so and libunarr.a for ARM64, and then compile YACReader like normal. It launches significantly faster, and probably uses less battery.
Could you please share your build?
https://drive.google.com/file/d/13KaqA3LAKYdthLSXjrBQgczGKZ3Eby1H/view?usp=sharing You might have to codesign it or something, IDK
The current release of YACReader for MacOS is only compiled for Intel CPUs. While it does work, it takes about 4 seconds for it to load. When I built YACReader as an ARM64 build on my M1 Mac, it took less than a second to launch. Now that all the new Mac products Apple will be producing use ARM64, I think it would be great if YACReader added a download for them. All I had to do to make it work was recompile libpdfium.so and libunarr.a for ARM64, and then compile YACReader like normal. It launches significantly faster, and probably uses less battery.
Could you please share your build?
https://drive.google.com/file/d/13KaqA3LAKYdthLSXjrBQgczGKZ3Eby1H/view?usp=sharing You might have to codesign it or something, IDK
Thanks a lot ! Unfortunately no luck, even with codesign and de-quarantine. Termination Reason: DYLD, [0x1] Library missing
I'll wait for an official release...
Sadly there are multiple problems we need to resolve to provide an official build and not all solutions are up to us. The preferred technical solution for this would be an universal binary which supports both M1 ARM64 and Intel x64 architectures on Mac, but this would require support by our toolchain, namely the Qt5 framework, which does not support this yet. A native build would require M1 support from our CI provider, Azure Pipelines, which is not available yet.
From what I could gather, universal binary support for Qt is in the making but will most likely only be available for Qt 6.2 and onward, which our current codebase does not support yet.
This does not mean it is impossible - there are some third party solutions (hacks) floating around the web to create universal binaries. But that would require lots of messing around and testing with our current build process to integrate those solutions we'd likely throw out as soon as proper support is available.
As you can see, it is complicated.
From my point of view, the best solution would be if the community could step up with native M1 builds (preferable as a homebrew formula) until we are able to properly close the gaps. @Randomblock1 , @frantz2mars if you could contribute to this goal or even just file a request at homebrew, this would help a lot :)
Hello, Is there any news ?
@ChaG06 most of the tooling should support (cross)compiling a universal binary by now. Basically, what is left is to replace our bundled libraries for macOS with universal binary variants and enable the required environment variables to build.
Could the universal build be expected as 9.13? Qt6 is supported A homebrew formula also will suffice
hello there :) thought it was silicon ready, but just saw the process was running under rosetta
just giving this issue a push, not to pressurize anybody though :)
Starting with this dev release, apple silicon builds are available https://github.com/YACReader/yacreader-dev-builds/releases/tag/9.13.1.2307193
You can get the latest dev build here: https://github.com/YACReader/yacreader-dev-builds/releases
I always forget to close issues :)
Starting with this dev release, apple silicon builds are available https://github.com/YACReader/yacreader-dev-builds/releases/tag/9.13.1.2307193
You can get the latest dev build here: https://github.com/YACReader/yacreader-dev-builds/releases
I always forget to close issues :)
Thanks :) no worries hahaha
If I prefer to remain on stable, will I get arm64 stable update when it's ready ? Or will you make 2 separate packages instead of double binary in one package ?
I don't have universal binaries for one dependency 7z.so, so for now it is going to be two separate packages.
If anyone finds a way to build a universal version of 7z.so please give me a shout.
Actually......I was convinced that lipo was not going to work with so files but it seems it does, so hopefully there will be a universal build after all, let's see how CI goes here https://github.com/YACReader/yacreader/pull/393