-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add Apple Silicon native support #14379
Comments
Good question |
Ignore, Irrelevant - asked in wrong issue. |
@xavier2k6 I think they are requesting a native version i.e an arm version of qbittorrent. |
Ya, I already tagged as |
So will there be a eta on universal build? |
We have to wait at least until Qt supports M1 Macs. |
successfully compiled master branch commit ab6141e for Apple M1 ! you can download experimental build here (link to Dropbox) P.S> I DON'T own an Apple Silicon based MacBook, laptop used for building I got from office due to my work responsibilities. I just used it because it has suitable development environment and I was curios. P.P.S> I'll try to produce arm64 binaries using Intel-based MacBook, but this is later. it should be possible, at least because I saw x86 binaries produced on this Apple M1 on first try... |
Unofficial qBittorrent 4.3.4.1 release for Apple M1compiled using the same libraries versions as official |
@Kolcha How did you handle Qt? I thought that Qt would only get support for M1 in a future release. Surprised to see that Qt 5.15.2 works out of the box. |
@FranciscoPombal even 5.12.x works :) but not exactly "out of the box" :) I'll share all my work later, when I find the way to build Qt' arm64 binaries on x86 host (anything else I think should not cause serious issues), but this looks like even harder challenge that compiling Qt 4.8 with VisualStudio 2017 (especially when I'm even not experienced Windows user...) that I did few years ago... |
Thanks for the details.
I'm happy that you're looking into cross-compiling with x86-64 hosts - this means that we can create a GitHub Actions workflow for the procedure and get macOS ARM test builds working even before (if ever) GitHub introduces native macOS ARM runners. Still, I would suggest documenting the current build procedure (native compilation) on a wiki page and link it here, at your convenience. This will give ARM macOS users something to chew on before the cross-compiling workflow is ready. |
Unofficial qBittorrent 4.3.5 release for Apple M1no any source code changes, 063844e >>>download release 4.3.5<<< P.S> still no any documentation / tips & tricks for build process on M1, neither any progress on cross-compiling from x86_64 to M1 (even did not any research on this yet). sorry, I'm too busy now... and after work I'm too tired and just don't want to work on something else so energy-consuming... but build and publish new release requires only few minutes and no thinking. |
finally, I had some free time when I was not so tired. and there are some good news - I got arm64 qBittorrent executable on my x86_64 host! but there is one very inconvenient thing - Qt' very convinient tool called some tricks were also required to cross-compile Qt to M1, there is NO any presets/configurations/options for that, but in general Qt is ready for it. my experience with Qt 4.8 compilation using MSVC 2017 and a lot of experience in cross-compiling on Linux helped me a lot here :) but process is still different from usual cross-compilation, because you are using the same compiler... this is unusual... also I would like to add few words about so-called "universal (or fat) binaries". such kind of binaries are extremely easy to build, but ... only if code is really cross-platform (i.e. rely on only standard library). so in such cases as Qt (and moreover OpenSSL) it is unacceptable, because their code rely on specific CPU instructions which are completely different for x86_64 and arm64, and code doesn't not have platform-dependent switches, decisions what to use are made only on "configure" stage, i.e. the same code will be tried to be compiled for each architecture, and this doomed to fail (tested with Qt, I even didn't thought that it so much depend on certain CPU instructions). so, now I see the "whole picture" and have some thoughts what to do next, and the end is near. in few days I'll publish at least guide describing all tricks used to make build possible on native M1. cross-compiling manual will appear later, I have to solve few more issues to make this process smooth and easy to automate. so, wait for updates, very likely native Apple Silicon builds will be officially available with next qBittorrent release :) |
Great news all around, nice work.
Is there any advantage in providing fat binaries as opposed to one build for each architecture? If not, you don't need to worry about them if you don't want to, because I doubt anyone else has strong opinions about this. |
there is only one advantage - developers ship only one binary and end users don't need to think what to download. technically there are no any benefits, only head ache for developers in case of non-trivial code :) I don't worry about fat binaries and I don't want to provide them, I prefer to ship 2 different builds, users will be able to choose one (I think users are not so stupid to do not know is their Mac based on Apple Silicon or Intel chip, IMO). |
@FranciscoPombal also I published totally new and much more "developer friendly" fully automated script for qBittorent building in any variant (even with easy way for switching dependencies versions). there is the link. script is not big and very simple. the most interesting parts of it is pretty well commented too (and most of that comments became a part of documentation). you may use it as starting point for GitHub Actions workflow. |
@monotheist dialog you see is expected - app is not signed, I don't have extra 100$+ to pay Apple for signing certificate, even more such certificates are expire in a year. so, as for many other free and/or open source apps, just go to the settings and press "Open Anyway". you will be not prompted next time. |
Thank you |
According to this: https://www.qt.io/blog/qt-on-apple-silicon |
qBittorrent-master-macOS-arm64.dmg.zip |
Well, Qt 5.15 LTS is only for commercial users......so the only way is Qt6 :) |
That's garbage! Boo on the Qt Company for not supporting open source. Qt 6 cuts out support for Windows 7, Windows 8, macOS 10.13, and Ubuntu 19.10 and earlier, all of which are reasonable to still be using on older hardware or simply because users don't agree with the direction the operating systems have gone in. (I'm looking at you, Windows 10 and macOS Big Sur.) I hope the developers of qBittorrent opt to maintain at least Qt 5.15 compatibility for a while longer and not drop these users. |
Any updates here, perchance? |
Sadly I don't have any news about the official release of 4.4.x version for macOS. |
what is the issue you are talking about? is it mac-specific or cross-platform? maybe I can fix it. I can find interesting parts in code pretty quickly regardless of codebase size (consider such huge project like Android for example). moreover, I'm familiar with Qt' codebase, and in this particular case with code corresponding to progress bar painting... long time ago I made changes in Qt to fix progress bar displaying torrent progress download misplacement. see #9096 (comment) and #9096 (comment) so, new issue with progress bar is not completely new to me, but the fix/workaround may require the changes inside Qt itself. this should not be a problem, because Qt is compiled from sources, so it can be patched before compilation. also, if bug is reproducible on any other apps, patch can be submitted to Qt (I did this already, so know that's possible). so, please give some details where to look and for what. very likely this will be also pretty easy to fix |
The progress bar looks like this: |
solution for progress bar was found! it was harder than previous issue I looked (sadly, it is still exists) and it took pretty much time - I spent about 4 hours on it. I used previously created demo app for debugging. so, to fix this progress bar bug in qBittorrent, just patch Qt before building it. applying any of these patches will give desired result (numbers are visible). to apply patches from some script, any of the following lines can be used:
corresponding Qt bugreport was opened - QTBUG-101474 |
I built the 4.4.1 release with the fix patch and it works fine, the issue is gone. The build upload has been updated, so the old link probably doesn't work for the patched version. I also updated my fork of the script with the patch, if you want to build it yourself. |
I am trying to compile Qt6 on Big Sur. But I am getting this error:
Has anyone encountered it?
I have read Kolcha's script but it doesn't seem to do something different than me. |
I don't have BigSur anymore to test this, due to work responsibilities I have to upgrade to Monterey because Xcode 13 was required... in any case, the problem somewhere in the system libraries, very likely there is some version affected by this, you likely have this. just from my experience, I recommend to not use standalone command line tools for Qt-based (and Qt itself) code building, I had no luck with it each time I tried. looks like SDKs shipped with Command Line Tools are different comparing to their equivalents shipped with Xcode. so, recommend just to reset "developer tools path" to Xcode and try again. also, I recommend just to upgrade everything if this is acceptable for you. but this is only my thoughts, I'm not pro in macOS development, I just have to use some its developer tools. |
I just finished testing. |
Can someone test the following DMG? It is supposed to be universal. Can you confirm that it runs natively on Apple Silicon? |
I can confirm it runs natively on M1 but the progress bar issue is still here. |
Running natively on M1. |
I am not planning to distribute a patched Qt6. |
I still get occasional freezes in qbittorrent running on my M1 Pro - is no one really experiencing this? |
Ditto |
Actually it does not always regain responsiveness after 20'ish seconds - sometimes it looses responsiveness all together and the rainbow like round loading bar continues and eventually I am forced to force-quit the appplication. @sledgehammer999 how do we even begin to diagnose this? I want to help but I am unsure on what to provide in order to find out why the occasional freezes keeps happening. This is so bad that I am forced to use Transmission until this is solved :/ |
I got a crash today, maybe the crashlog helps somewhat (I did use the patch and built it myself with Kolcha's script) in the investigations.
|
so which version is recommended currently for m1 macs ? im a bit confused |
I have released 4.4.2 with an official universal DMG for macOS. |
edit: nope, false alarm, sorry, I had Rosetta enabled for qbittorrent by mistake. |
Also a thank you to @Kolcha because his research/script helped me better understand the universal DMGs. |
I have installed it on an M1 machine and can confirm that it shows up as Apple kind when running (in Activity Monitor). |
Known Issue(all platforms): The text on the progress bar may have wrong color or not appear at all when using the Qt6 version. You may switch to the Qt5 version(if available) until it is resolved. Qt6 has fixed the issue upstream but hasn't made a release with it yet. Sadly as it is a Qt 6 bug and not a qBittorrent bug, you need to wait for The Qt Company to publish a new Qt version. |
Please provide the following information
qBittorrent version and Operating System
macOS Big Sur (arm64)
If on linux, libtorrent-rasterbar and Qt version
(type here)
What is the problem
Native support on apple silicon
What is the expected behavior
(type here)
Steps to reproduce
(type here)
Extra info(if any)
Hey, Does the team have plans to release binary that would run natively on apple silicon?
The text was updated successfully, but these errors were encountered: