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

Support Linux ARM64 #128

Open
dpaulat opened this issue Jan 14, 2024 · 9 comments
Open

Support Linux ARM64 #128

dpaulat opened this issue Jan 14, 2024 · 9 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dpaulat
Copy link
Owner

dpaulat commented Jan 14, 2024

Qt 6.7, currently in beta, will include ARM64 binaries. ARM64 should be added as a target to support small form factor Linux devices.

This should be able to be worked once aqtinstall supports the 6.7 ARM64 binaries.

Primarily, this is expected to involve setting up an additional target in .github/workflows/ci.yml for ARM64 builds, using a cross compiler.

@dpaulat dpaulat added enhancement New feature or request good first issue Good for newcomers labels Jan 14, 2024
@dpaulat
Copy link
Owner Author

dpaulat commented Apr 14, 2024

This should be implementable now. Qt 6.7 has been released, and aqtinstall now supports the Arm architecture.

@dpaulat dpaulat mentioned this issue May 13, 2024
@jshg46
Copy link

jshg46 commented May 18, 2024

Cant wait for this!

@derzahla
Copy link

Just tried, latest aqtinstall with v6.7.1 still only offers x86_64

@dpaulat
Copy link
Owner Author

dpaulat commented May 22, 2024

I haven't gone through the install yet, but it appears to show up with the latest version (3.1.15):

$ aqt list-qt linux_arm64 desktop
6.7.0 6.7.1

$ aqt list-qt linux desktop
5.9.0 5.9.1 5.9.2 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9
5.10.0 5.10.1
5.11.0 5.11.1 5.11.2 5.11.3
5.12.0 5.12.1 5.12.2 5.12.3 5.12.4 5.12.5 5.12.6 5.12.7 5.12.8 5.12.9 5.12.10 5.12.11 5.12.12
5.13.0 5.13.1 5.13.2
5.14.0 5.14.1 5.14.2
5.15.0 5.15.1 5.15.2
6.0.0 6.0.1 6.0.2 6.0.3 6.0.4
6.1.0 6.1.1 6.1.2 6.1.3
6.2.0 6.2.1 6.2.2 6.2.3 6.2.4
6.3.0 6.3.1 6.3.2
6.4.0 6.4.1 6.4.2 6.4.3
6.5.0 6.5.1 6.5.2 6.5.3
6.6.0 6.6.1 6.6.2 6.6.3
6.7.0 6.7.1

As a side note, I have some minor rendering artifacts with Qt 6.7.x (at least on Windows) that I want to resolve before updating CI. However, the develop branch at least builds with 6.7 (x86_64). This behavior isn't present in Qt 6.6.2. I'm concerned I may have to file a bug report with Qt and wait for a later release. It's most visible in the Debug > ImGui Debug window (requires Debug enabled from settings):

supercell-wx_RRlfiIbKy7.mp4

@jshg46
Copy link

jshg46 commented May 22, 2024

Armv8 would be great for this program. I hope you get it figured out on linux soon.

@jshg46
Copy link

jshg46 commented May 26, 2024

The hard part is finding QT for any raspberry pi 4 distro. If we was looking at QT5 it wouldn't be an issue at all. Debian experimental has QT6 and its the correct version, but giving me errors on the PI trying to install it. I might play around with the Odroid some tomorrow and see if I can get something out of it.

@dpaulat
Copy link
Owner Author

dpaulat commented May 26, 2024

It'll only help you if you're developing, because the rest of the software still needs built for Arm64, or if you're checking it out for another reason. I do not rely on the OS-provided Qt packages, but rather ship with my own. Qt has supported Arm for awhile now, but only recently has provided binaries themselves. These are the same ones that you can grab from the installer:

https://www.qt.io/download-qt-installer-oss

@dpaulat
Copy link
Owner Author

dpaulat commented Jun 5, 2024

Qt 6.7.x issues were fixed a week or 2 ago, removing that blocker. To make this happen, one of two things needs to be done:

I expect a manual compile of arm64 would work at this point if anyone wants to start wringing out issues. I have a Raspberry Pi I am able to test with after working alert enhancements.

@AdenKoperczak
Copy link
Contributor

I have successfully compiled on a Raspberry Pi 3B and 4B (4GB) on Raspberry Pi OS. The only big issue is that Raspberry Pis only support older versions of OpenGL. I believe hardware wise they only go up to OpenGL 2.1, but software wise they can be made to run OpenGL 3.3, but it is a bit slow and not enabled by default. I had to use MESA_GL_VERSION_OVERRIDE=3.3 environmental variable to get it to work.
It is also complaining about not having audio codecs. I have ffmpeg installed and it can play the ogg file, so I am not sure what codec it is talking about.

For anyone who is wanting to replicate, here are some recommendations.
You need to install Qt for arm64. This can be done using aqt, as explained on the developer setup page. You will also need to modify the location of the Qt install in the setup-*.sh scripts.
During compilation, the Pis are usually limited by their RAM. I found that only running one job at a time was the most stable, but running multiple jobs could work depending how much RAM you have or if you do not mind watching it. There is at least one file which used around 1.3GB of RAM in MapLibre. I would recommend using a Pi with at least 2GB of memory. 1GB mostly works, but you need a lot of swap space (around 1-2GB), and it is very slow. With an 8GB Pi, you could probably do 3-4 jobs.
I moved my home directory and swap space to an external USB3.0 HDD. SD cards can be quite slow, so this may or may not help with compilation speed.
It took about 2-3 hours to compile supercell-wx on my Raspberry Pi 4 (4GB). (not including conan packages)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

4 participants