Unsolved Error while loading shared libraries: libQt5Bluetooth.so.5
-
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. -
I tried following rule;
LD_LIBRARY_PATH=/opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/lib/:${LD_LIBRARY_PATH}
same error still exist.
-
Since bluetooth is a Qt component, you do not need to add it to LIBS. Just like core gui widgets, right? They are added automatically.
-
Yes, i understand it but i tried theese rules ;
Qt += bluetooth and mentioned way theese gives same errors. -
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 :-(
-
Thanks for the help and for your time :)
-
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.