Open castlec opened 11 months ago
Sharing this for the benefit of others.
I have now managed to run Cura 5.6.0 from source on jammy/armbian/aarch64/rk3588. It required the following.
--config-settings --confirm-license --verbose
must be passed to pip install PyQt6
. If this is not done, the build will hang forever. pip install -r requirements.txt
does not accept the additional arguments. Install must be called on the package itself.I have yet to have success with app image packaging. There are multiple reasons for this.
pip install appimage-builder
. It seems like using the python distribution rather than the .AppImage
distribution will meet the needs of the system generically and relieve the CI of some of the funny embedded bashery. Use export APPIMAGEBUILDER_LOCATION
in environment to utilize different install location.ubuntu
made this work.I was hoping to be able to post an appimage build for others to test but that's not going to happen for a while as it stands. Maybe tomorrow's adventures will bring something forward there.
Now that I understand enough of what's going on, I may try to find success with a cross compile. That seems like it's the best way to have arm packages in the existing github actions based CI system. Regardless, distribution needs to be figured out whether it exists as a fork or as a main Cura distribution.
Hi!
Can you put some details about building cura?
I have tried several times to build cura but failed to get it running. I would like to use 5+ version as now I'm using 4.13...
Thanks, Miika
I'm away from home for the next three weeks so I can't go pull more information for you.
Here's what I can tell you:
I think that's all of it.
If you want to post up a build log, I can have a look at it.
Thanks for the quick reply!
I think my biggest problem is installing Qt. I have managed to build Cura but when I run it, it complains about missing Qt packages. Do you remember from where you downloaded the sources and how did you exactly build them? Should it done in venv or just system wide etc.?
Find your dependency version here. https://download.qt.io/archive/qt/
Be sure to read about configuration options. That will help you ensure you're not missing packages. https://doc.qt.io/qt-6/configure-options.html
Ok, today managed to build Cura 5.7.0 on Orange Pi 5 Pro 16GB board running Ubuntu Jammy (Orange Pi OS version). Here are the steps that I did, some might be unnecessary but these should get build complete and Cura running.
In this build Cura git clone is made in ~/Development so build dir is ~/Development/Cura and Qt6 is installed in /opt/Qt (Online installer needs to run with sudo)
https://www.qt.io/download-qt-installer-oss
At least under additional libraries all should be checked.
pip install conan==1.64
conan config install https://github.com/ultimaker/conan-config.git
conan profile new default --detect --force
In .conan/conan.conf change level-option in [log]-section, this helps to see when build will wait for license input. If not stopped, it stays there waiting forever and consumes all RAM and in the end, your machines is not responsive anymore.
[log]
run_to_output = True # environment CONAN_LOG_RUN_TO_OUTPUT
run_to_file = False # environment CONAN_LOG_RUN_TO_FILE
level = 10 # environment CONAN_LOGGING_LEVEL, default is warn
print_run_commands = True # environment CONAN_PRINT_RUN_COMMANDS
git clone https://github.com/Ultimaker/Cura.git
cd Cura
export PATH=/opt/Qt/6.7.0/gcc_arm64/bin:/opt/Qt/6.7.0/gcc_arm64/lib:$PATH
export MAKEFLAGS="-j$(nproc)"
conan install . --build=missing --update -o cura:devtools=True -g VirtualPythonEnv
Once build hangs on PyQt6 license checking, stop building with 'Ctrl+C'
~/Development/Cura/venv/bin/python -m pip install --upgrade pip
First, remove/comment out all PyQt6 modules except PyQt6 itself and PyQt6-sip from Cura and Uranium requirements.txt files
~/Development/Cura/requirements.txt
find ~/.conan/ -name requirements.txt # I have this at path ~/.conan/data/uranium/5.7.0/_/_/package/e541e632dd3ca870d37dab822cdf6eaa3df15dca/pip_requirements/requirements.txt
--hash=sha256:3d31b2c59dc378ee26e16586d9469842483588142fc377280aad22aaf2fa6235
sudo rm -r venv/lib/python3.10/site-packages/PyQt6*
~/Development/Cura/venv/bin/pip cache purge
~/Development/Cura/venv/bin/pip install PyQt6==6.7.0 --force-reinstall --config-settings --confirm-license= --verbose
conan install . --build=missing --update -o cura:devtools=True -g VirtualPythonEnv
source venv/bin/activate
python cura_app.py
Tested with:
cd ~/Development/Cura
pyinstaller venv/conan/UltiMaker-Cura.spec
If you get error message about Qt5 you need to exclude it in 'Analysis' section in the end of UltiMaker-Cura.spec-file
excludes=['PyQt5'],
PyInstaller will create folder 'dist/UltiMaker-Cura' where all files will be. Now you can test if it is working
dist/UltiMaker-Cura/UltiMaker-Cura
Next we need also to add cura.desktop-file and cura-icon.png before building AppImage.
cd dist/
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage
cp ~/Development/Cura/resources/images/cura-icon.png UltiMaker-Cura/
nano UltiMaker-Cura/cura.desktop
[Desktop Entry]
Name=UltiMaker Cura
Name[de]=UltiMaker Cura
GenericName=3D Printing Software
GenericName[de]=3D-Druck-Software
GenericName[nl]=3D-Print Software
Comment=Cura converts 3D models into paths for a 3D printer. It prepares your print for maximum accuracy, minimum printing time and good reliability with many extra features that make your print come out great.
Exec=UltiMaker-Cura %F
Icon=cura-icon
Terminal=false
Type=Application
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;image/bmp;image/gif;image/jpeg;image/png;text/x-gcode;application/x-amf;application/x-ply;application/x-ctm;model/vnd.collada+xml;model/gltf-binary;model/gltf+json;model/vnd.collada+xml+zip;
Categories=Graphics;
Keywords=3D;Printing;
X-AppImage-Version=5.7.0
Path=
StartupNotify=false
ln -sf UltiMaker-Cura/UltiMaker-Cura UltiMaker-Cura/AppRun
ARCH=aarch64 ./appimagetool-aarch64.AppImage UltiMaker-Cura
That's it! Now you can copy/move AppImage to somewhere and use .desktop file to launch AppImage!
Is your feature request related to a problem?
In the past, the community provided arm builds for Cura. Those are now becoming quite outdated. Linux X86 is supported through app image, as are Mac x86 and Mac Arm. With larger SBCs commonly being utilized as desktop devices, Cura on Linux Arm would close a gap in that ecosystem.
Describe the solution you'd like
I'd like Linux/Arm added to the supported platforms.
Describe alternatives you've considered
I've attempted using older builds. The newest build available is 5.3.0 in Fedora. I would be interested in helping to produce the new builds; however, I have not been able to get conan based builds to complete in x86 as I haven't been able to successfully reproduce the build environment.
Affected users and/or printers
anyone using linux on arm. there are arm chromebooks and multiple SBC that are capable of running the software.
Additional information & file uploads
No response