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: libQtSql.so.4 on embedded system
QtWS25 Last Chance

Error: libQtSql.so.4 on embedded system

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
errorembedded linuxti-sdk-am335x-elib
7 Posts 5 Posters 2.7k 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.
  • T Offline
    T Offline
    TMJJ001
    wrote on 5 Jun 2018, 07:57 last edited by
    #1

    Dear all,

    I want to run an application which runs and connects with a database on embedded linux. (TI AM3358)
    When I try to cross-compile the Qt-code I get the following error:

    error while loading shared libraries: libQtSql.so.4: cannot open shared object file: No such file or directory
    

    I started to look online for this file. I found it here: http://www.rpmfind.net/linux/rpm2html/search.php?query=libQtSql.so.4
    I downloaded the first file. After I extracted it and copied to /usr/lib/libQtSql.so.4.

    When I try to compile the code I get the following error:

    error while loading shared libraries: libQtSql.so.4: internal error
    

    Isn't this the correct file? Or should I first compile this somehow?
    As you can see, I'm a beginner ;).

    Thanks in advance,
    Kind regards

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 5 Jun 2018, 20:53 last edited by
      #2

      Hi,

      What Linux distribution is your target running ?
      How did you cross-compile Qt ?

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

      T 1 Reply Last reply 5 Jun 2018, 21:34
      1
      • S SGaist
        5 Jun 2018, 20:53

        Hi,

        What Linux distribution is your target running ?
        How did you cross-compile Qt ?

        T Offline
        T Offline
        TMJJ
        wrote on 5 Jun 2018, 21:34 last edited by
        #3

        @SGaist

        Thanks for the reply.

        So, Linux distribution of the target: Embedded Linux --> output of uname -a

        Linux goembed 3.2.0 #1 Sat Oct 14 10:02:32 CST 2017 armv7l GNU/Linux
        

        I'm using the image from from the vendor GOEMBED. I have builded the image it with buildroot. (all info of the image can be found here: http://www.goembed.com/index.php/Community/post/tpoId/127)

        On the embedded system, when I navigate to /usr/lib I get the following libraries:

        0_1528234230520_6c9ae265-0b72-4280-9fec-0d092fe23595-image.png

        After I just added :

        • libQtSql.so.4
        • libQtSql.so.4.8
        • libQtSql.so.4.8.7

        0_1528234370076_771d1d83-8c44-42ce-80d8-360d8f8c3920-image.png

        So Qt was builded when building the image with buildroot. But I was missing this library.

        Kind regards.

        A 1 Reply Last reply 6 Jun 2018, 04:48
        0
        • T TMJJ
          5 Jun 2018, 21:34

          @SGaist

          Thanks for the reply.

          So, Linux distribution of the target: Embedded Linux --> output of uname -a

          Linux goembed 3.2.0 #1 Sat Oct 14 10:02:32 CST 2017 armv7l GNU/Linux
          

          I'm using the image from from the vendor GOEMBED. I have builded the image it with buildroot. (all info of the image can be found here: http://www.goembed.com/index.php/Community/post/tpoId/127)

          On the embedded system, when I navigate to /usr/lib I get the following libraries:

          0_1528234230520_6c9ae265-0b72-4280-9fec-0d092fe23595-image.png

          After I just added :

          • libQtSql.so.4
          • libQtSql.so.4.8
          • libQtSql.so.4.8.7

          0_1528234370076_771d1d83-8c44-42ce-80d8-360d8f8c3920-image.png

          So Qt was builded when building the image with buildroot. But I was missing this library.

          Kind regards.

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 6 Jun 2018, 04:48 last edited by
          #4

          @TMJJ you need to build the sql lib exactly as you built the other Qt libs.

          otherwise it will 99% crash ;)

          Qt has to stay free or it will die.

          T 1 Reply Last reply 6 Jun 2018, 06:03
          1
          • A aha_1980
            6 Jun 2018, 04:48

            @TMJJ you need to build the sql lib exactly as you built the other Qt libs.

            otherwise it will 99% crash ;)

            T Offline
            T Offline
            TMJJ001
            wrote on 6 Jun 2018, 06:03 last edited by
            #5

            @aha_1980

            Oooh that's a pitty! I was affraid of this.

            So I need to find a way to add this library to buildroot, so I can recompile it completely.

            Kind regards

            1 Reply Last reply
            0
            • C Offline
              C Offline
              Cleiton Bueno
              wrote on 11 Jun 2018, 14:54 last edited by
              #6

              Talk to GoEmbed support, request the toolchain for this Linux you are using, download and configure.

              Then sync the Qt4.8.6 repository:
              $ git clone -b v4.8.6 https://code.qt.io/cgit/qt/qt.git qt4.8.6

              Using the toolchain you downloaded, perform cross-compiling, when you finish copying the library libQt4Sql * to the card.

              This would be a way if GoEmbed support does not have a version with libQt4Sql ready.

              Here's the Readme of how to cross-compile in the SQL part:
              https://code.qt.io/cgit/qt/qt.git/tree/src/sql/README.module?h=v4.8.6

              Run the ./configure and see the options to enable SQL support:

               -qt-sql- <driver> ... Enable to SQL <driver> in the QtSql library, by default
               -plugin-sql- <driver> Enable SQL <driver> as a plugin to be linked to
                                    [db2 ibase mysql oci odbc psql sqlite sqlite2 sqlite_symbian symsql tds]
              

              Cleiton Bueno

              Blog | Linkedin | B2Open

              1 Reply Last reply
              1
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 11 Jun 2018, 21:37 last edited by
                #7

                Just case: the latest version of Qt 4 is Qt 4.8.7.

                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

                1/7

                5 Jun 2018, 07:57

                • Login

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