As am new to this I thought and used same dockerfile and I copied my GUI App and tried running it.
I got the below error:
/lib/x86_64-linux-gnu/libQt6Qml.so.6: no version information available (required by ./<GUI_App>)
/lib/x86_64-linux-gnu/libQt6Core.so.6: version `Qt_6.8’ not found (required by ./<GUI_App>)
Letr I used below lines inside the dockerfile then the first error fixed.
RUN export LD_LIBRARY_PATH=/opt/qtcreator/lib/Qt/lib/:$LD_LIBRARY_PATH
RUN echo ‘export LD_LIBRARY_PATH=/opt/qtcreator/lib/Qt/lib/:$LD_LIBRARY_PATH’ >> ~/.bashrc
But now when I try to run the app again the second/below error I got:
/lib/x86_64-linux-gnu/libQt6Core.so.6: version `Qt_6.8’ not found (required by ./<GUI_App>)
I understood it is version missmatch issue. But since 2 days I have tried many things that i can still issue persists. I failed to fix. Can anyone help m eon this please?
When I see the lib present inside the container it shows below libs :
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello Siddhartha,
Thank you for reaching out with your question. It sounds like you’re encountering a version mismatch issue with your Qt GUI application inside a Docker container. Let’s work through this step-by-step to resolve the problem.
Verify Installed Qt Version: First, confirm the version of Qt installed in your Docker container. You can do this by running qmake --version or checking the library files directly. Ensure it matches the required version, Qt 6.8.2.
Install the Correct Qt Version: If the required version isn’t installed, you’ll need to add the appropriate Qt repository to your Dockerfile and install the specific version. For Debian-based images, you might use:
RUN apt-get update && apt-get install -y qt6-base-dev
Ensure this installs the correct version by specifying the version number if necessary.
Set LD_LIBRARY_PATH: Make sure the LD_LIBRARY_PATH environment variable includes the path to the Qt libraries. You can set this in your Dockerfile:
Replace /path/to/qt/lib with the actual path where the Qt libraries are installed.
Rebuild Your Docker Image: After making these changes, rebuild your Docker image to apply them:
docker build -t your_image_name .
Run the Container with Correct Settings: When running the container, ensure you map the display correctly:
docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -it your_image_name
By following these steps, you should be able to resolve the version mismatch and run your Qt GUI application successfully. If you continue to experience issues, double-check the library paths and ensure all dependencies are correctly installed.
I hope this helps! Feel free to reach out if you have any more questions.
Best regards,
Toradex AI Assistant
Please, also check if these links can help you solve your problem:
Thanks for providing these details. The recommended approach for Qt development on a Torizon system is to start from our Qt based (currently using Qt 6.4.2) template on the VSCode IDE extension for Torizon. This template should already provide you with the Dockerfiles you need for deploying the project in debug and release modes. We plan to upgrade the Qt containers to 6.8.2 in the future but I do not have a concrete timeline at the moment.