Error After Compilation and Deployment QGroundControl [QGC version: Stable 4.3] using Qt 5.15.2 GCC 64bit
-
/tmp/.mount_QGroundsh0atR/usr/bin/QGroundControl: error while loading share libraries: libQt5Location.so.5: cannot open shared object file: No such file or directory
but when I run
file -L /path_to_directory/QGroundControl.AppDir/usr/bin/Qt/libs/libQt5Location.so.5
terminal output: /path_to_directory/QGroundControl.AppDir/usr/bin/Qt/libs/libQt5Location.so.5: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=446930eb757fbfb14bf9d2c1f957d95cf2fa3d59, not stripped
I also ran
ldd /path_to_directory/QGroundControl.AppDir/usr/bin/Qt/libs/libQt5Location.so.5
and noting seemed to be missingWhat could be possible error or what should I do?
-
The libs are not in the same folder as the executable, so the loader can't find them.
Set LD_LIBRARY_PATH so that it points to /path_to_directory/QGroundControl.AppDir/usr/bin/Qt/libs before you start the app. -
@jsulm now this error has come
/tmp/.mount_QGrounxnBuDz/usr/bin/QGroundControl: symbol lookup error: /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: undefined symbol: _ZN22QWindowSystemInterface24setPlatformFiltersEventsEb, version Qt_5_PRIVATE_API -
@VIDYUL-SHAH said in Error After Compilation and Deployment QGroundControl [QGC version: Stable 4.3] using Qt 5.15.2 GCC 64bit:
/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
It looks like the loader is trying to load libs from /lib/x86_64-linux-gnu/ (which is default location on Linux).
Do you have libQt5XcbQpa.so.5 in /path_to_directory/QGroundControl.AppDir/usr/bin/Qt/libs ?
Did you read https://doc.qt.io/qt-6/linux-deployment.html ?
You can also use https://github.com/probonopd/linuxdeployqt to deploy Qt applications. -
This post is deleted!
-
@jsulm Even I observed that when I run build option and run ./staging/QGroundControl before I create a AppImage, IT also gave me this error:
./staging/QGroundControl: symbol lookup error: /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: undefined symbol: _ZN22QWindowSystemInterface24setPlatformFiltersEventsEb, version Qt_5_PRIVATE_APIIs it that it is unable to detect this file which is necessary? But I can see something like this in my system that I have provided in the screenshot.
-
This post is deleted!
-
-
This post is deleted!
-
@jsulm
Question. Do you have libQt5XcbQpa.so.5 in /path_to_directory/QGroundControl.AppDir/usr/bin/Qt/libs ?
Answer. Yes it is present at the particular location.
Question. Did you read https://doc.qt.io/qt-6/linux-deployment.html ?
Answer. Yes I am following both the links you provided and then too it is giving me that error.Even I observed that when I run build option and run ./staging/QGroundControl before I create a AppImage, IT also gave me this error:
./staging/QGroundControl: symbol lookup error: /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: undefined symbol: _ZN22QWindowSystemInterface24setPlatformFiltersEventsEb, version Qt_5_PRIVATE_API
Is it that it is unable to detect this file which is necessary? But I can see something like this in my system that I have provided in the screenshot.
https://ddgobkiprc33d.cloudfront.net/becb3159-e8ac-4c8b-a158-25b37ee7341c.pngI reinstalled qt but same error message pops up
./staging/QGroundControl: symbol lookup error: /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: undefined symbol: _ZN22QWindowSystemInterface24setPlatformFiltersEventsEb, version Qt_5_PRIVATE_APIhttps://forum.qt.io/topic/126011/symbol-lookup-error-lib-x86_64-linux-gnu-libqt5xcbqpa-so-5-undefined-symbol-_zn22qwindowsysteminterface24setplatformfilterseventseb-version-qt_5_private_api/6
I saw one of the qt forum post here and i am able to build the system properly and it runs fine in my system.
Now I get the error when I run the AppImage in another PC which is of my Teammate.
$ /tmp/.mount_QGrounWV8Tcc/usr/bin/QGroundControl: error while loading shared libraries: libQt5Location.so.5: cannot open shared object file: No such file or directory
I am using Ubuntu 20.04 and he is using 22.04.
There might be problem in restructuring while forming an AppImage or something else? -
@jsulm I would like to know the significance of writing these line for creating the Appmage.
The below lines I had to write in the AppRun file#!/bin/sh HERE="$(dirname "$(readlink -f "${0}")")" export LD_LIBRARY_PATH="${HERE}/Qt/libs":$LD_LIBRARY_PATH export QML2_IMPORT_PATH="${HERE}/Qt/qml" export QT_PLUGIN_PATH="${HERE}/Qt/plugins" mkdir -p ~/.icons && cp "${HERE}/yottec.png" ~/.icons EXEC="${HERE}/usr/bin/QGroundControl" exec "${EXEC}"
Why is writing those 3 export lines important
these lines have solved