Error while loading shared libraries: libQt5Bluetooth.so.5
-
Hi,
Following libraries exist in Embedded Device SDKs;
-rw-r--r-- 1 root root 1218 Mar 23 21:52 libQt5Bluetooth.prl
lrwxrwxrwx 1 root root 25 Mar 23 21:52 libQt5Bluetooth.so -> libQt5Bluetooth.so.5.14.2
lrwxrwxrwx 1 root root 25 Mar 23 21:52 libQt5Bluetooth.so.5 -> libQt5Bluetooth.so.5.14.2
lrwxrwxrwx 1 root root 25 Mar 23 21:53 libQt5Bluetooth.so.5.14 -> libQt5Bluetooth.so.5.14.2
-rwxr-xr-x 1 root root 750964 Mar 23 21:52 libQt5Bluetooth.so.5.14.2When i run the application on the target device gives this error:
error while loading shared libraries: libQt5Bluetooth.so.5: cannot open shared object file: No such file or directoryNOTE: I added
Qt += bluetooth
LIBS += -L/opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include -lbluetoothHow can i use bluetooth libraries?
Best Regards.
-
Hi,
Following libraries exist in Embedded Device SDKs;
-rw-r--r-- 1 root root 1218 Mar 23 21:52 libQt5Bluetooth.prl
lrwxrwxrwx 1 root root 25 Mar 23 21:52 libQt5Bluetooth.so -> libQt5Bluetooth.so.5.14.2
lrwxrwxrwx 1 root root 25 Mar 23 21:52 libQt5Bluetooth.so.5 -> libQt5Bluetooth.so.5.14.2
lrwxrwxrwx 1 root root 25 Mar 23 21:53 libQt5Bluetooth.so.5.14 -> libQt5Bluetooth.so.5.14.2
-rwxr-xr-x 1 root root 750964 Mar 23 21:52 libQt5Bluetooth.so.5.14.2When i run the application on the target device gives this error:
error while loading shared libraries: libQt5Bluetooth.so.5: cannot open shared object file: No such file or directoryNOTE: I added
Qt += bluetooth
LIBS += -L/opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include -lbluetoothHow can i use bluetooth libraries?
Best Regards.
@Yaldiz said in Error while loading shared libraries: libQt5Bluetooth.so.5:
Qt += bluetooth
This needs to be
QT
LIBS += -L/opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include -lbluetooth
Library in
/include
folder? Looks suspicious, check if it's a good path. -
unix:!macx: LIBS += -L$$PWD/../../../../../opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/lib/ -lQt5Bluetooth
INCLUDEPATH += $$PWD/../../../../../opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include/QtBluetooth
DEPENDPATH += $$PWD/../../../../../opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include/QtBluetoothI tried like this gives same error.
NOTE: Project compiling succesfully but when i try to run executable file on the target gives this error.
-
unix:!macx: LIBS += -L$$PWD/../../../../../opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/lib/ -lQt5Bluetooth
INCLUDEPATH += $$PWD/../../../../../opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include/QtBluetooth
DEPENDPATH += $$PWD/../../../../../opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include/QtBluetoothI tried like this gives same error.
NOTE: Project compiling succesfully but when i try to run executable file on the target gives this error.
@Yaldiz said in Error while loading shared libraries: libQt5Bluetooth.so.5:
NOTE: Project compiling succesfully but when i try to run executable file on the target gives this error.
Add
/opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/lib/
toLD_LIBRARY_PATH
, then. -
As mentioned, it HAS TO BE
QT
(both letters capital).Qt
won't do! And after you change anything in .pro file, it's best to make a full rebuild - remove build dir, runqmake
andmake
again.Other libs (core, gui, etc.) link correctly right?
It's a long shot, but maybe check if your bluetooth lib is compiled for correct architecture:
readelf -h /opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/lib/libQt5Bluetooth.so.5.14.2
-
core, gui, dbus, network linked correctly.
I can use sqlite3 with following rule.
LIBS += -L/opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include -lsqlite3Project compiled for correct architecture(ARM).
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: ARM
Version: 0x1
Entry point address: 0x19bf8
Start of program headers: 52 (bytes into file)
Start of section headers: 749924 (bytes into file)
Flags: 0x5000400, Version5 EABI, hard-float ABI
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 6
Size of section headers: 40 (bytes)
Number of section headers: 26
Section header string table index: 25
readelf: Warning: Separate debug info file /opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/lib/libQt5Bluetooth.so.5.14.2 found, but CRC does not match - ignoringBest Regards.
-
Yep, looks correct.
libQt5Bluetooth.so.5.14.2 found, but CRC does not match
Is this only about the symlink or the file is corrupt?
Anyway, I've run out of ideas, sorry :-(
-
It does not help if the bluetooth library is in the SDK. Error clearly states that it's not found in actual device. Also very suspicious that in the SDK path you have Qt version 5.6.0 but then bluetooth library is version 5.14.2. So do you actually have Qt 5.6.0 and you've just replaced/added bluetooth library from newer Qt5 version? That would explain the readelf warning.