Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Error while loading shared libraries: libQt5Bluetooth.so.5
Forum Updated to NodeBB v4.3 + New Features

Error while loading shared libraries: libQt5Bluetooth.so.5

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
12 Posts 4 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • YaldizY Yaldiz

    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.2

    When 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 directory

    NOTE: I added
    Qt += bluetooth
    LIBS += -L/opt/tdx-xwayland/5.6.0/sysroots/armv7at2hf-neon-tdx-linux-gnueabi/usr/include -lbluetooth

    How can i use bluetooth libraries?

    Best Regards.

    sierdzioS Offline
    sierdzioS Offline
    sierdzio
    Moderators
    wrote on last edited by
    #2

    @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.

    (Z(:^

    1 Reply Last reply
    1
    • YaldizY Offline
      YaldizY Offline
      Yaldiz
      wrote on last edited by Yaldiz
      #3

      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/QtBluetooth

      I tried like this gives same error.

      NOTE: Project compiling succesfully but when i try to run executable file on the target gives this error.

      sierdzioS 1 Reply Last reply
      0
      • YaldizY Yaldiz

        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/QtBluetooth

        I tried like this gives same error.

        NOTE: Project compiling succesfully but when i try to run executable file on the target gives this error.

        sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #4

        @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/ to LD_LIBRARY_PATH, then.

        (Z(:^

        1 Reply Last reply
        0
        • YaldizY Offline
          YaldizY Offline
          Yaldiz
          wrote on last edited by
          #5

          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.

          1 Reply Last reply
          0
          • JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by JoeCFD
            #6

            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.

            1 Reply Last reply
            0
            • YaldizY Offline
              YaldizY Offline
              Yaldiz
              wrote on last edited by
              #7

              Yes, i understand it but i tried theese rules ;
              Qt += bluetooth and mentioned way theese gives same errors.

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #8

                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, run qmake and make 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
                

                (Z(:^

                1 Reply Last reply
                1
                • YaldizY Offline
                  YaldizY Offline
                  Yaldiz
                  wrote on last edited by Yaldiz
                  #9

                  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 -lsqlite3

                  Project 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 - ignoring

                  Best Regards.

                  1 Reply Last reply
                  0
                  • sierdzioS Offline
                    sierdzioS Offline
                    sierdzio
                    Moderators
                    wrote on last edited by
                    #10

                    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 :-(

                    (Z(:^

                    1 Reply Last reply
                    0
                    • YaldizY Offline
                      YaldizY Offline
                      Yaldiz
                      wrote on last edited by
                      #11

                      Thanks for the help and for your time :)

                      1 Reply Last reply
                      0
                      • P Offline
                        P Offline
                        pasi
                        wrote on last edited by
                        #12

                        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.

                        1 Reply Last reply
                        1

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved