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. shared libraries file too short
QtWS25 Last Chance

shared libraries file too short

Scheduled Pinned Locked Moved Mobile and Embedded
8 Posts 2 Posters 7.0k Views
  • 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.
  • D Offline
    D Offline
    driehl
    wrote on last edited by
    #1

    Hi,
    I want to use QtSerialPort on an embedded Linux device which only supports Qt 4.8.5.
    So I followed the wiki and this.
    I have added the library to my Crosscompiler and compiling now works.

    When I want to start the programm on my device I get this error:
    error while loading shared libraries: /opt/qt-cross-hf/lib/libQtSerialPort.so.1: file too short

    The files in the /opt/qt-cross-hf/lib/ are the same as in my crosscompiler and at the same path.

    Any ideas how to fix this ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Check the file with ldd to see if it points to a valid library

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        driehl
        wrote on last edited by
        #3

        Thank you.
        My Device does not know ldd.
        On my PC ldd says "Das Programm ist nicht dynamisch gelinkt" The programm isn't linked dynamic.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          ldd is a script that will load and do some processing on your libraries, so you can't call it on a library that's built for a different architecture.

          Then if you don't have it on your target (you can copy ldd on your target) you can use the file command to see what type of file is libQtSerialPort.so.1

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • D Offline
            D Offline
            driehl
            wrote on last edited by
            #5

            It seems I don't have file too. How can I copy ldd ?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              What OS are you running on your target ?

              Then what does ls -la return ?

              The same way you copy your other files on your target

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • D Offline
                D Offline
                driehl
                wrote on last edited by
                #7

                The OS is:
                NAME=PTXdist
                VERSION="2013.01.0"
                ID=ptxdist
                VERSION_ID="2013.01.0"
                PRETTY_NAME="PTXdist / PHYTEC-phyBOARD-MAIA-AM335x"
                ANSI_COLOR="1;34"

                PTXDIST_VERSION="2013.01.0"
                PTXDIST_BSP_VENDOR="PHYTEC"
                PTXDIST_BSP_NAME="phyBOARD-MAIA-AM335x"
                PTXDIST_BSP_VERSION="-PD14.0.0"
                PTXDIST_PLATFORM_NAME="phyBOARD-MAIA-AM335x"
                PTXDIST_PLATFORM_VERSION="-PD14.0.0"
                PTXDIST_BUILD_DATE="2014-02-12T15:27:59+0100"

                ldd returns this:
                root@phyBOARD-MAIA-AM335x:~ ./AirMonTool
                ./AirMonTool: error while loading shared libraries: /opt/qt-cross-hf/lib/libQtSerialPort.so.1: file too short
                root@phyBOARD-MAIA-AM335x:~ ldd AirMonTool
                $ not a dynamic executable

                and ls returns:
                root@phyBOARD-MAIA-AM335x:/opt/qt-cross-hf/lib ls -la
                drwxr-xr-x 2 root root 640 Jan 1 1970 .
                drwxrwxrwx 3 root root 224 Jan 1 1970 ..
                -rw-r--r-- 1 root root 452 Jan 1 1970 libQtSerialPort.prl
                -rw-r--r-- 1 root root 24 Jan 1 1970 libQtSerialPort.so
                -rw-r--r-- 1 root root 24 Jan 1 1970 libQtSerialPort.so.1
                -rw-r--r-- 1 root root 24 Jan 1 1970 libQtSerialPort.so.1.0

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Looks like your files are corrupted. and that you have 3 copies of libQtSerialPort rather than one and two symbolic links

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0

                  • Login

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