Open Tercus opened 2 months ago
As root,
# chown -R $USER:$USER /usr/local/lib
After CP is compiled,
# chown -R root:root /usr/local/lib
naaw...I don't think I want to do that on my PC. I'll try to recreate the conditions in a VM and try it there....
As root,
# chown -R $USER:$USER /usr/local/lib
After CP is compiled,
# chown -R root:root /usr/local/lib
I setup a VM and got to the exact same problem. Then I did what you mentioned (after all the folder was almost empty anyway) and that actually helped me reach the next step. I am now getting pretty much the same errors as mentioned in #203.
Are you using the distribution's Qt release or the official one?
Haven't tried building 5.x on Linux, but for 4.x I needed to use both Qt's official builds (ie. 5.15.2) and CMake from Qt's Online Installer. Then, after adding Qt's CMake directory (which contains the cmake binary) in front of the PATH variable, worked for me.
I tried installing the cmake from Qt's official builds and it somewhat changed the error message. Right now I still get the following error:
-- Package Projects. -- Package Projects -- 0 -- Configuring done (0.7s) CMake Error at cmake/ConfigureTarget.cmake:334 (target_link_libraries): Target "qtuser_3d" links to:
Qt5::3DRenderPrivate
but the target was not found. Possible reasons include:
* There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing.
Call Stack (most recent call first): cmake/lib.cmake:44 (__add_real_target) qtuser_3d/CMakeLists.txt:21 (__add_common_library)
CMake Error at cmake/ConfigureTarget.cmake:334 (target_link_libraries): Target "shader_entity" links to:
Qt5::3DRenderPrivate
but the target was not found. Possible reasons include:
* There is a typo in the target name. * A find_package call is missing for an IMPORTED target. * An ALIAS target is missing.
Call Stack (most recent call first): cmake/lib.cmake:44 (__add_real_target) shader_entity/CMakeLists.txt:21 (__add_common_library)
-- Generating done (0.4s) CMake Generate step failed. Build files cannot be regenerated correctly. ERROR RUN FAILED.
When I look online, I can barely find any info on this "Qt5::3DRenderPrivate". I then resorted to asking chatgpt and apparently this is a private function not meant to be used by developers directly (basically a system-function?). I just went ahead and removed those from the two CMakeLists.txt that had that reference. I then got the following:
-- Package Projects. -- Package Projects -- 0 -- Configuring done (0.7s) -- Generating done (0.4s) -- Build files have been written to: /home/tobias/repos/CrealityPrint/linux-build/build INFO RUN SUCCESS.
shader binarization begin. project path: /home/
/repos/CrealityPrint/linux-build/build gl3 shader directory: /home/ /repos/CrealityPrint/cmake/ci/../../shader_entity/shaders/gl/3.3 gles shader directory: /home/ /repos/CrealityPrint/cmake/ci/../../shader_entity/shaders/gles/3 output: /home/ /repos/CrealityPrint/linux-build/build/shader_entity/GL.code shader binarization completed.
One step further, I guess? But what do I do now? I checked the /linux-build/build/
folder, but could not find any binaries. Am I getting something wrong?
Are you installing just Qt's cmake or Qt's cmake + Qt 5.15.2 from the Qt Online Installer (you need to toggle the "archived" checkbox to see the 5.15.2 build)? If you have both installed (Qt 5.15.2 with all of its extensions) and have uninstalled the respective system packages, try setting the CMAKE_PREFIX_PATH
environment variable to point to the Qt 5.15.2 binaries folder (inside the gcc_64
folder or something similar).
One step further, I guess? But what do I do now? I checked the /linux-build/build/ folder, but could not find any binaries. Am I getting something wrong?
After building, you need to cd
to the /linux-build/build/
dir and run cmake --build .
. If that command succeeds, you then should obtain the binaries.
Hello, I want to collaborate, but I will use docker to do so. Do you have some base Dockerfile or shoud I create a new one?
@yoprogramo were you able to create the dockerfile, I was going to do the same, create a docker container and play inside of it until find the correct recipe. If you have anything started or an image in a registry, please let me know to suffer a little less than you may have suffer :)
Hello @allangj , I have created a very initial dockerfile to work in, but I have found several problems trying to compile using this method. I clone the repo in the same directory as the Dockerfile / docker-compose and then execute this:
docker compose run --rm myapp bash
conan profile new linux --detect && conan profile update settings.compiler.libcxx=libstdc++11 linux
python ./cmake/ci/cmake.py -c -b -e --channel_name=opensource --cmake_args='-DCMAKE_BUILD_TYPE=Release'
Dockerfile
FROM ubuntu:22.04
# TZ y demás
RUN apt update -y
ENV TZ=Europe/Madrid
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y locales
RUN sed -i -e 's/# es_ES.UTF-8 UTF-8/es_ES.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=es_ES.UTF-8
ENV LANG es_ES.UTF-8
RUN apt-get install -y python3-pip python3-dev \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --upgrade pip
# Actualizamos el sistema y los paquetes
RUN apt-get update && apt-get install -y \
build-essential \
git \
wget \
unzip \
zlib1g-dev \
libicu-dev \
libx11-dev \
libxext-dev \
libxcb1-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libgstreamer1.0-dev \
libqt5serialport5-dev \
libqt5websockets5-dev \
libqt5svg5-dev \
llvm-11-dev \
libomp-dev \
libomp-14-dev \
qttools5-dev \
qtmultimedia5-dev \
qtdeclarative5-dev \
qt3d5-dev \
cmake
# Agrega aquí cualquier otro paquete Qt que necesites
# Instalamos Conan
RUN pip3 install conan==1.64.0
# Configuramos el entorno de Conan
ENV CONAN_USER_HOME=/root/.conan
WORKDIR /app/CrealityPrint
CMD ["bash"]
docker-compose.yml:
version: '3'
services:
myapp:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./CrealityPrint:/app/CrealityPrint
command: bash
I'll try some other base docker (24.04) but I have received lot of errors after compiling long time.
Hi, I compiled what was discussed in this thread into a repo that creates a docker image, bring up a container of that image and you can ssh to it. Initial setup was easy, however I found some things I had to manually do and will work later. The repo: https://github.com/allangj/crealty_devenv Things TODO:
The compilation is extensive so probably you will want to leave the machine there and dont look at it because it will hang, or cry, or do something weird :rofl:
Lastly, something to have in mind, is that the build binary uses dynamic libs to qt5, so you will need to have installed as well on the system you plan to run it. Im trying to review if with the make package
it creates the appImage which is independent. Later will review if that work because so far I have a pretty invisible window that says crealityPrint5 (as I didnt had qt5 installed on the host machine)
UPDATE: I moved to install Qt5 in the host. Installed in my home:
./qt-online-installer-linux-x64-4.8.0.run --root /home/dev/Qt --accept-licenses --default-answer --confirm-command install qt5.15.2-essentials-dev
And I mount it in the container to b used for compilation. Still need to work thru the details of Creality Print finding the libs for compilation.
After installing QT5 with the online installer in my host machine, and trying to execute the binary I do see it going up for a sec, but fail quickly, I will inspect more later:
This is just a snippet as there are a lot of "QML Image: Cannot open:"
[qrc:/CrealityUI/qml/BasicMenuItemStyle.qml:87:9: QML Image: Cannot open: qrc:/UI/photo/submenu.png]
[qrc:/CrealityUI/qml/BasicMenuItemStyle.qml:87:9: QML Image: Cannot open: qrc:/UI/photo/submenu.png]
[onVisibleChanged]
[qrc:/CrealityUI/secondqml/FDMRightPanel.qml:324: TypeError: Cannot call method 'hasModelInsideUseColors' of null]
(CrealityPrint:193303): GLib-CRITICAL **: 18:22:08.284: PCRE library is compiled without UTF8 support
(CrealityPrint:193303): GLib-CRITICAL **: 18:22:08.284: PCRE library is compiled without UTF8 properties support
[qrc:/CrealityUI/qml/BasicMenuItemStyle.qml:87:9: QML Image: Cannot open: qrc:/UI/photo/submenu.png]
[qrc:/CrealityUI/qml/BasicMenuItemStyle.qml:87:9: QML Image: Cannot open: qrc:/UI/photo/submenu.png]
[qrc:/CrealityUI/qml/BasicMenuItemStyle.qml:87:9: QML Image: Cannot open: qrc:/UI/photo/submenu.png]
[qrc:/CrealityUI/qml/BasicMenuItemStyle.qml:87:9: QML Image: Cannot open: qrc:/UI/photo/submenu.png]
[qrc:/CrealityUI/qml/BasicMenuItemStyle.qml:87:9: QML Image: Cannot open: qrc:/UI/photo/submenu.png]
[qrc:/CrealityUI/qml/BasicMenuItemStyle.qml:87:9: QML Image: Cannot open: qrc:/UI/photo/submenu.png]
I'm trying to compile this using Arch Linux and after created a Virtual Env and installed conan 1.64, I'm getting the following errors:
`**** INFO Run: conan create --profile linux -s build_type=Debug /tmp/tmp_kuox9v9 opensource/linux WARN: Conan 1 is legacy and on a deprecation path WARN: Please upgrade to Conan 2 ERROR: Invalid setting '14' is not a valid 'settings.compiler.version' value. Possible values are ['4.1', '4.4', '4.5', '4.6', '4.7', '4.8', '4.9', '5', '5.1', '5.2', '5.3', '5.4', '5.5', '6', '6.1', '6.2', '6.3', '6.4', '6.5', '7', '7.1', '7.2', '7.3', '7.4', '7.5', '8', '8.1', '8.2', '8.3', '8.4', '8.5', '9', '9.1', '9.2', '9.3', '9.4', '9.5', '10', '10.1', '10.2', '10.3', '10.4', '10.5', '11', '11.1', '11.2', '11.3', '11.4', '12', '12.1', '12.2', '12.3', '13', '13.1', '13.2'] Read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-invalid-setting" ERROR RUN FAILED.
`
Oh, @CrealityTech , what about releasing a Linux version ?
@feiticeir0 Initially I was following that approach, and creating the profile that way did not work for me neither. I moved to the recommendation above of doing the following instead
conan profile new --detect linux && conan profile update settings.compiler.libcxx=libstdc++11 linux
That creates the profile for me.
I highly doubt there will be a linux official release soon, as you can from my previous comment, they even have basic compilation errors on the code. I already solved my previous error:
[qrc:/CrealityUI/qml/BasicMenuItemStyle.qml:87:9: QML Image: Cannot open: qrc:/UI/photo/submenu.png]
And now found more missing things. The steps I follow:
`conan profile new --detect linux && conan profile update settings.compiler.libcxx=libstdc++11 linux
python3 ./cmake/ci/cmake.py -c -b -e --channel_name=opensource --cmake_args='-DCMAKE_BUILD_TYPE=Release -DOPENMP_ROOT=/usr/lib/llvm-11 -DCMAKE_PREFIX_PATH=<QT installation path>'
cd linux-build/build/
make install -j8
make package -j8
With that you will get an AppImage. It gives the error I mention before QML Image: Cannot open: qrc:/UI/photo/submenu.png]
Which is because it cannot find the qml directory and it is not package in the appImage.
You can direct to the ones of your Qt directory: export QML2_IMPORT_PATH=<QT PATH>/Qt/5.15.2/gcc_64/qml
Thats my current status, I do see the login and it tries to go up, but a with a symbol error on some QT packages are preventing me to advance more. If all that I mention is happening then I doubt their CIT is running for linux, at least not with the released code
Thank you @allangj , but no cigar.
I'm getting errors with trimesh... :
-- Build files have been written to: /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c [ 5%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/KDtree.cc.o [ 11%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/TriMesh_connectivity.cc.o [ 16%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/TriMesh_io.cc.o [ 22%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/TriMesh_pointareas.cc.o [ 27%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/Vec3Utils.cc.o [ 33%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/TriMesh_tstrips.cc.o [ 38%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/filter.cc.o [ 44%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/TriMesh_bounding.cc.o [ 50%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/TriMesh_curvature.cc.o [ 55%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/TriMesh_grid.cc.o [ 61%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/TriMesh_normals.cc.o [ 72%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/remove.cc.o [ 72%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/TriMesh_stats.cc.o [ 77%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/base/reorder_verts.cc.o [ 83%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/extend/quaternion.cpp.o [ 88%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/extend/extendio.cpp.o [ 94%] Building CXX object trimesh2/CMakeFiles/trimesh2.dir/extend/vertextransform.cpp.o /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/trimesh2/base/TriMesh_io.cc: In function ‘bool trimesh::IsBinarySTL(FILE, unsigned int)’: /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/trimesh2/base/TriMesh_io.cc:1062:9: error: ‘uint32_t’ was not declared in this scope 1062 | uint32_t faceCount(0); | ^
~~~ /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/trimesh2/base/TriMesh_io.cc:21:1: note: ‘uint32_t’ is defined in header ‘’; this is probably fixable by adding ‘#include 50 + 84; | ^’ 20 | #include "ccglobal/log.h" +++ |+#include 21 | /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/trimesh2/base/TriMesh_io.cc:1063:16: error: ‘faceCount’ was not declared in this scope 1063 | fread(&faceCount, sizeof(uint32_t), 1, f); | ^ ~~~~ /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/trimesh2/base/TriMesh_io.cc:1064:15: error: ‘uint32_t’ does not name a type 1064 | const uint32_t expectedBinaryFileSize = faceCount~~~ /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/trimesh2/base/TriMesh_io.cc:1064:15: note: ‘uint32_t’ is defined in header ‘’; this is probably fixable by adding ‘#include ’ /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/trimesh2/base/TriMesh_io.cc:1066:16: error: ‘expectedBinaryFileSize’ was not declared in this scope 1066 | return expectedBinaryFileSize == fileSize; | ^ ~~~~~ /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/trimesh2/base/TriMesh_io.cc: In function ‘bool trimesh::write_obj(TriMesh, FILE, bool)’: /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/trimesh2/base/TriMesh_io.cc:2194:24: warning: ISO C++ forbids converting a string constant to ‘char’ [-Wwrite-strings] 2194 | char vtHead = "vt "; | ^~~~~ /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/trimesh2/base/TriMesh_io.cc:2200:24: warning: ISO C++ forbids converting a string constant to ‘char’ [-Wwrite-strings] 2200 | char vnHead = "vn "; | ^~~~~ /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/trimesh2/base/TriMesh_io.cc:2252:23: warning: ISO C++ forbids converting a string constant to ‘char’ [-Wwrite-strings] 2252 | char fHead = "f "; | ^~~~ /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/trimesh2/base/Vec3Utils.cc: In function ‘float trimesh::vv_angle(const vec3&, const vec3&)’: /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/trimesh2/base/Vec3Utils.cc:13:27: error: ‘INT8_MIN’ was not declared in this scope 13 | if (denominator < INT8_MIN) | ^~~~ make[2]: [trimesh2/CMakeFiles/trimesh2.dir/build.make:216: trimesh2/CMakeFiles/trimesh2.dir/base/Vec3Utils.cc.o] Error 1 make[2]: Waiting for unfinished jobs.... make[2]: [trimesh2/CMakeFiles/trimesh2.dir/build.make:146: trimesh2/CMakeFiles/trimesh2.dir/base/TriMesh_io.cc.o] Error 1 make[1]: [CMakeFiles/Makefile2:98: trimesh2/CMakeFiles/trimesh2.dir/all] Error 2 make: *** [Makefile:136: all] Error 2 trimesh2/0.0.3@opensource/linux: trimesh2/0.0.3@opensource/linux: ERROR: Package '7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c' build failed trimesh2/0.0.3@opensource/linux: WARN: Build folder /home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c ERROR: trimesh2/0.0.3@opensource/linux: Error in build() method, line 100 cmake.build() ConanException: Error 2 while executing cmake --build '/home/feiticeir0/.conan/data/trimesh2/0.0.3/opensource/linux/build/7b80bc46b44f3cd3a482e5e5c0be38a03f2bc84c/.' '--' '-j24' ERROR RUN FAILED.
I've been trying to put the project together in Visual Studio - because Conan wouldn't work for me (never used it - spent ages trying to figure out why the batch couldn't find "conan"). In doing this I've found that while Creality have a version of Trimesh2 available in their GitHub - it is not the Trimesh they use in the CrealityPrint repo.
If you look at the conan recipes the references are largely sourced from a private IP (e.g. "http://172.20.180.12:8050/yanfa4/thirdparty/trimesh2").
When you look through the code that references trimesh - it expects some properties that don't exist. e.g. textureIDs
Personally I'm going to see if I can get Orca working with my Ender-3 Max Neo.
Since @CrealityTech won't give us an answer - never have they answer once - on all the Linux questions - I'm going to find alternatives... Since Creality Slicer is based on Orca, maybe Orca will work fine. Will install the Creality Slicer in my windows, export the profiles and import them all in Orca... At least I'll have an up to date slicer - and if I like it, will stick to it. Will try to sell my K1C and buy a Bambu.. At least their slicer works on Linux !
I am also switching my K1 Max to a Bambulab X1 Carbon due to these inconsistencies. Aside from having to replace 2 times the hotend and now upgraded to the new hotend, K1 Max is still beta when compared to Bambulab's product lines. I was hoping for the launch of K2 Plus but that will be alpha for a while as well, and, loads of anticipated headaches for sure.
Re: trimesh - I found the modified version - it's in the 2.0.0 branch (rather than the default branch)... :|
Has anyone managed to get a Linux build of this yet? I have a K2 Plus coming soon... would be great to be able to actually run the software for it...
Has anyone managed to get a Linux build of this yet? I have a K2 Plus coming soon... would be great to be able to actually run the software for it...
No, currently, the only way to use Creality Print 5 on Linux is through Wine.
Hello there,
I tried to compile CrealityPrint for linux and was getting a lot of errors. I was able to solve SOME of them, but so far have been unsuccessful. Still, I want to document, what I have done so far.
What you need:
pip install conan==1.64.0
)sudo apt install qtbase5-dev libqt5serialport5-dev libqt5websockets5-dev libqt5svg5-dev qttools5-dev qtmultimedia5-dev qtdeclarative5-dev qt3d5-dev
apt install llvm-11-dev
)apt install libomp-dev libomp-11-dev
)PATH=$PATH:/usr/lib/qt5/bin python3 ./cmake/ci/cmake.py -c -b -e --channel_name=opensource
What you do:
git submodule update --init
conan profile new --detect linux
conan profile update settings.compiler.libcxx=libstdc++11 linux
./cmake/ci/cmake.py -c -b -e --channel_name=opensource
Where it fails:
Right now I am getting error messages, because it tries to move some files and lacks permission to do so. At the end I get this:
If anyone has any idea what I could try next, please let me know. I somehow do not want to run it as superuser to check if failing to move the files is the current cause for the failed run.