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. qsqlite driver not loaded but available drivers: QSQLITE
Forum Updated to NodeBB v4.3 + New Features

qsqlite driver not loaded but available drivers: QSQLITE

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
9 Posts 2 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.
  • M Offline
    M Offline
    Mihan
    wrote on 26 Feb 2020, 03:56 last edited by
    #1

    Hi
    I'm using IMX6 system but there is no libqsqlite.so in plugins/sqldrivers, so I cross-compiled the open source(Qt 5.6.2) to get it.

    SQL drivers:
        DB2..............................no
        .
        .
        SQLlite..........................yes(plugin, using bundled copy)
    

    after make && make install and copying the plugin into the embedded system, when running the project, it will show:

    QSqlDatabase: QSQLITE driver not loaded
    QSqlDatabase: available drivers: QSQLITE
    

    whst's the problem?

    J 1 Reply Last reply 26 Feb 2020, 05:39
    0
    • M Mihan
      26 Feb 2020, 03:56

      Hi
      I'm using IMX6 system but there is no libqsqlite.so in plugins/sqldrivers, so I cross-compiled the open source(Qt 5.6.2) to get it.

      SQL drivers:
          DB2..............................no
          .
          .
          SQLlite..........................yes(plugin, using bundled copy)
      

      after make && make install and copying the plugin into the embedded system, when running the project, it will show:

      QSqlDatabase: QSQLITE driver not loaded
      QSqlDatabase: available drivers: QSQLITE
      

      whst's the problem?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 26 Feb 2020, 05:39 last edited by
      #2

      @Mihan What is the output of

      ldd PATH_TO_QT/plugins/sqldrivers/libqsqlite.so
      

      on your device?
      Also set QT_DEBUG_PLUGINS before starting your app and check the output (see https://doc.qt.io/qt-5/debug.html).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • M Offline
        M Offline
        Mihan
        wrote on 26 Feb 2020, 09:28 last edited by Mihan
        #3

        Hi
        The output of ldd libqsqlite.so is not a dynamic executable, here is the configuration.

        ./configure -prefix /home/Qt5.6-arm -release -opensource -make libs -xplatform linux-arm-gnueabi-g++ -optimized-qmake -pch -qt-libjpeg -qt-zlib -no-opengl -skip qt3d -skip qtcanvas3d -no-sse2 -no-openssl -no-cups -no-glib -no-iconv -nomake examples -nomake tools -no-android-style-assets -no-securetransport -no-lgmon -no-pps -no-slog2 -no-directfb -no-largefile -no-optimized-tools -no-tslib -no-evdev -no-cups -no-icu -no-dbus -no-xcb
        
        
        #and change opensource DIR/qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf
        
        #
        # qmake configuration for building with arm-linux-gnueabi-g++
        #
        
        MAKEFILE_GENERATOR      = UNIX
        CONFIG                 += incremental
        QMAKE_INCREMENTAL_STYLE = sublib
        QT_QPA_DEFAULT_PLATFORM = linuxfb:fb=/dev/fb0
        QMAKE_CFLAGS_RELEASE += -O2
        QMAKE_CXXFLAGS_RELEASE += -O2
        
        include(../common/linux.conf)
        include(../common/gcc-base-unix.conf)
        include(../common/g++-unix.conf)
        
        # modifications to g++.conf
        QMAKE_CC                = arm-none-linux-gnueabi-gcc
        QMAKE_CXX               = arm-none-linux-gnueabi-g++
        QMAKE_LINK              = arm-none-linux-gnueabi-g++
        QMAKE_LINK_SHLIB        = arm-none-linux-gnueabi-g++
        
        # modifications to linux.conf
        QMAKE_AR                = arm-none-linux-gnueabi-ar cqs
        QMAKE_OBJCOPY           = arm-none-linux-gnueabi-objcopy
        QMAKE_NM                = arm-none-linux-gnueabi-nm -P
        QMAKE_STRIP             = arm-none-linux-gnueabi-strip
        load(qt_config)
        
        

        output of configure

        Running configuration tests (phase 1)...
        Done running configuration tests.
        Creating qmake...
        .Done.
        Running configuration tests (phase 2)...
        Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set and
        the host's .pc files would be used (even if you set PKG_CONFIG_PATH).
        Set this variable to the directory that contains target .pc files
        for pkg-config to function correctly when cross-compiling or
        use -pkg-config to override this test.
        Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set.
        Set this variable to your sysroot for pkg-config to function correctly when
        cross-compiling or use -pkg-config to override this test.
        checking for C++11...  yes.
        checking for C++14...  no.
        checking for default C++ standard edition...  yes.
        checking for 64-bit std::atomic...  yes.
        checking for ipc_sysv...  yes.
        checking for mtdev...  no.
        checking for libpng...  no.
        checking for dlopen...  no.
        checking for libdl...  yes.
        checking for DB2...  no.
        checking for InterBase...  no.
        checking for MySQL (thread-safe)...  no.
        checking for MySQL (thread-unsafe)...  no.
        checking for OCI...  no.
        checking for ODBC...  no.
        checking for iODBC...  no.
        checking for PostgreSQL...  no.
        checking for SQLite2...  no.
        checking for TDS...  no.
        checking for libproxy...  no.
        checking for PulseAudio...  no.
        checking for FontConfig...  no.
        checking for libudev...  no.
        checking for xkbcommon...  no.
        checking for XLib...  no.
        checking for Xrender...  no.
        checking for XInput2...  no.
        checking for GBM...  no.
        checking for LinuxFB...  yes.
        checking for KMS...  no.
        checking for Mir client...  no.
        checking for EGL...  no.
        checking for FreeType...  no.
        checking for STL...  yes.
        checking for POSIX clock_gettime()...  yes.
        checking for POSIX Monotonic Clock...  yes.
        checking for posix_fallocate...  yes.
        checking for mremap...  yes.
        checking for getaddrinfo...  yes.
        checking for inotify...  yes.
        checking for eventfd...  yes.
        checking for IPv6 interface name...  yes.
        checking for getifaddrs...  yes.
        checking for cloexec...  yes.
        checking for PCRE...  no.
        checking for OpenVG...  no.
        checking for OpenVG...  no.
        checking for OpenVG (lc includes)...  no.
        checking for OpenVG (lc includes)...  no.
        checking for alsa...  no.
        checking for GStreamer 1.0...  no.
        checking for GStreamer 0.10...  no.
        Done running configuration tests.
        
           Configure summary
        
        Building on:   linux-g++ (x86_64, CPU features: mmx sse sse2)
        Building for:  linux-arm-gnueabi-g++ (arm, CPU features: none detected)
        Platform notes:
        
                    - Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx
                
        Build options:
          Configuration .......... accessibility audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile enable_new_dtags eventfd freetype full-config getaddrinfo getifaddrs harfbuzz inotify ipv6ifname large-config linuxfb medium-config minimal-config mremap no-pkg-config pcre png posix_fallocate precompile_header qpa qpa reduce_exports release rpath shared small-config threadsafe-cloexec zlib 
          Build parts ............  libs
          Mode ................... release
          Using sanitizer(s)...... none
          Using C++ standard ..... c++11
          Using gold linker....... no
          Using new DTAGS ........ yes
          Using PCH .............. yes
          Using LTCG ............. no
          Target compiler supports:
            Neon ................. no
        
        Qt modules and options:
          Qt D-Bus ............... no
          Qt Concurrent .......... yes
          Qt GUI ................. yes
          Qt Widgets ............. yes
          Large File ............. no
          QML debugging .......... yes
          Use system proxies ..... no
        
        Support enabled for:
          Accessibility .......... yes
          ALSA ................... no
          CUPS ................... no
          Evdev .................. no
          FontConfig ............. no
          FreeType ............... yes (bundled copy)
          Glib ................... no
          GStreamer .............. no
          GTK theme .............. no
          HarfBuzz ............... yes (bundled copy)
          Iconv .................. no
          ICU .................... no
          Image formats: 
            GIF .................. yes (plugin, using bundled copy)
            JPEG ................. yes (plugin, using bundled copy)
            PNG .................. yes (in QtGui, using bundled copy)
          libinput................ no
          Logging backends: 
            journald ............... no
            syslog   ............... no
          mtdev .................. no
          Networking: 
            getaddrinfo .......... yes
            getifaddrs ........... yes
            IPv6 ifname .......... yes
            libproxy.............. no
            OpenSSL .............. no
          OpenGL / OpenVG: 
            EGL .................. no
            OpenGL ............... no
            OpenVG ............... no
          PCRE ................... yes (bundled copy)
          pkg-config ............. no 
          PulseAudio ............. no
          QPA backends: 
            DirectFB ............. no
            EGLFS ................ no
              EGLFS i.MX6 ........ no
              EGLFS i.MX6 Wayland. no
              EGLFS EGLDevice .... no
              EGLFS GBM .......... no
              EGLFS Mali ......... no
              EGLFS Raspberry Pi . no
              EGLFS X11 .......... no
            LinuxFB .............. yes
            Mir client............ no
            XCB .................. no
          Session management ..... yes
          SQL drivers: 
            DB2 .................. no
            InterBase ............ no
            MySQL ................ no
            OCI .................. no
            ODBC ................. no
            PostgreSQL ........... no
            SQLite 2 ............. no
            SQLite ............... yes (plugin, using bundled copy)
            TDS .................. no
          tslib .................. no
          udev ................... no
          xkbcommon-x11........... no
          xkbcommon-evdev......... no
          zlib ................... yes (bundled copy)
        
        
        NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1.
        Configure with '-qreal float' to create a build that is binary compatible with 5.1.
        
        Qt is now configured for building. Just run 'make'.
        Once everything is built, you must run 'make install'.
        Qt will be installed into /home/Qt5.6-arm
        
        Prior to reconfiguration, make sure you remove any leftovers from
        the previous build.
        

        the libqsqlite.so shows not a dynamic executable both on ubuntu and on the device.

        the cross-compile tool's version is arm-2014.05

        what's the meaning of the warning above?

        J 1 Reply Last reply 26 Feb 2020, 09:54
        0
        • M Mihan
          26 Feb 2020, 09:28

          Hi
          The output of ldd libqsqlite.so is not a dynamic executable, here is the configuration.

          ./configure -prefix /home/Qt5.6-arm -release -opensource -make libs -xplatform linux-arm-gnueabi-g++ -optimized-qmake -pch -qt-libjpeg -qt-zlib -no-opengl -skip qt3d -skip qtcanvas3d -no-sse2 -no-openssl -no-cups -no-glib -no-iconv -nomake examples -nomake tools -no-android-style-assets -no-securetransport -no-lgmon -no-pps -no-slog2 -no-directfb -no-largefile -no-optimized-tools -no-tslib -no-evdev -no-cups -no-icu -no-dbus -no-xcb
          
          
          #and change opensource DIR/qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf
          
          #
          # qmake configuration for building with arm-linux-gnueabi-g++
          #
          
          MAKEFILE_GENERATOR      = UNIX
          CONFIG                 += incremental
          QMAKE_INCREMENTAL_STYLE = sublib
          QT_QPA_DEFAULT_PLATFORM = linuxfb:fb=/dev/fb0
          QMAKE_CFLAGS_RELEASE += -O2
          QMAKE_CXXFLAGS_RELEASE += -O2
          
          include(../common/linux.conf)
          include(../common/gcc-base-unix.conf)
          include(../common/g++-unix.conf)
          
          # modifications to g++.conf
          QMAKE_CC                = arm-none-linux-gnueabi-gcc
          QMAKE_CXX               = arm-none-linux-gnueabi-g++
          QMAKE_LINK              = arm-none-linux-gnueabi-g++
          QMAKE_LINK_SHLIB        = arm-none-linux-gnueabi-g++
          
          # modifications to linux.conf
          QMAKE_AR                = arm-none-linux-gnueabi-ar cqs
          QMAKE_OBJCOPY           = arm-none-linux-gnueabi-objcopy
          QMAKE_NM                = arm-none-linux-gnueabi-nm -P
          QMAKE_STRIP             = arm-none-linux-gnueabi-strip
          load(qt_config)
          
          

          output of configure

          Running configuration tests (phase 1)...
          Done running configuration tests.
          Creating qmake...
          .Done.
          Running configuration tests (phase 2)...
          Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set and
          the host's .pc files would be used (even if you set PKG_CONFIG_PATH).
          Set this variable to the directory that contains target .pc files
          for pkg-config to function correctly when cross-compiling or
          use -pkg-config to override this test.
          Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set.
          Set this variable to your sysroot for pkg-config to function correctly when
          cross-compiling or use -pkg-config to override this test.
          checking for C++11...  yes.
          checking for C++14...  no.
          checking for default C++ standard edition...  yes.
          checking for 64-bit std::atomic...  yes.
          checking for ipc_sysv...  yes.
          checking for mtdev...  no.
          checking for libpng...  no.
          checking for dlopen...  no.
          checking for libdl...  yes.
          checking for DB2...  no.
          checking for InterBase...  no.
          checking for MySQL (thread-safe)...  no.
          checking for MySQL (thread-unsafe)...  no.
          checking for OCI...  no.
          checking for ODBC...  no.
          checking for iODBC...  no.
          checking for PostgreSQL...  no.
          checking for SQLite2...  no.
          checking for TDS...  no.
          checking for libproxy...  no.
          checking for PulseAudio...  no.
          checking for FontConfig...  no.
          checking for libudev...  no.
          checking for xkbcommon...  no.
          checking for XLib...  no.
          checking for Xrender...  no.
          checking for XInput2...  no.
          checking for GBM...  no.
          checking for LinuxFB...  yes.
          checking for KMS...  no.
          checking for Mir client...  no.
          checking for EGL...  no.
          checking for FreeType...  no.
          checking for STL...  yes.
          checking for POSIX clock_gettime()...  yes.
          checking for POSIX Monotonic Clock...  yes.
          checking for posix_fallocate...  yes.
          checking for mremap...  yes.
          checking for getaddrinfo...  yes.
          checking for inotify...  yes.
          checking for eventfd...  yes.
          checking for IPv6 interface name...  yes.
          checking for getifaddrs...  yes.
          checking for cloexec...  yes.
          checking for PCRE...  no.
          checking for OpenVG...  no.
          checking for OpenVG...  no.
          checking for OpenVG (lc includes)...  no.
          checking for OpenVG (lc includes)...  no.
          checking for alsa...  no.
          checking for GStreamer 1.0...  no.
          checking for GStreamer 0.10...  no.
          Done running configuration tests.
          
             Configure summary
          
          Building on:   linux-g++ (x86_64, CPU features: mmx sse sse2)
          Building for:  linux-arm-gnueabi-g++ (arm, CPU features: none detected)
          Platform notes:
          
                      - Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx
                  
          Build options:
            Configuration .......... accessibility audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile enable_new_dtags eventfd freetype full-config getaddrinfo getifaddrs harfbuzz inotify ipv6ifname large-config linuxfb medium-config minimal-config mremap no-pkg-config pcre png posix_fallocate precompile_header qpa qpa reduce_exports release rpath shared small-config threadsafe-cloexec zlib 
            Build parts ............  libs
            Mode ................... release
            Using sanitizer(s)...... none
            Using C++ standard ..... c++11
            Using gold linker....... no
            Using new DTAGS ........ yes
            Using PCH .............. yes
            Using LTCG ............. no
            Target compiler supports:
              Neon ................. no
          
          Qt modules and options:
            Qt D-Bus ............... no
            Qt Concurrent .......... yes
            Qt GUI ................. yes
            Qt Widgets ............. yes
            Large File ............. no
            QML debugging .......... yes
            Use system proxies ..... no
          
          Support enabled for:
            Accessibility .......... yes
            ALSA ................... no
            CUPS ................... no
            Evdev .................. no
            FontConfig ............. no
            FreeType ............... yes (bundled copy)
            Glib ................... no
            GStreamer .............. no
            GTK theme .............. no
            HarfBuzz ............... yes (bundled copy)
            Iconv .................. no
            ICU .................... no
            Image formats: 
              GIF .................. yes (plugin, using bundled copy)
              JPEG ................. yes (plugin, using bundled copy)
              PNG .................. yes (in QtGui, using bundled copy)
            libinput................ no
            Logging backends: 
              journald ............... no
              syslog   ............... no
            mtdev .................. no
            Networking: 
              getaddrinfo .......... yes
              getifaddrs ........... yes
              IPv6 ifname .......... yes
              libproxy.............. no
              OpenSSL .............. no
            OpenGL / OpenVG: 
              EGL .................. no
              OpenGL ............... no
              OpenVG ............... no
            PCRE ................... yes (bundled copy)
            pkg-config ............. no 
            PulseAudio ............. no
            QPA backends: 
              DirectFB ............. no
              EGLFS ................ no
                EGLFS i.MX6 ........ no
                EGLFS i.MX6 Wayland. no
                EGLFS EGLDevice .... no
                EGLFS GBM .......... no
                EGLFS Mali ......... no
                EGLFS Raspberry Pi . no
                EGLFS X11 .......... no
              LinuxFB .............. yes
              Mir client............ no
              XCB .................. no
            Session management ..... yes
            SQL drivers: 
              DB2 .................. no
              InterBase ............ no
              MySQL ................ no
              OCI .................. no
              ODBC ................. no
              PostgreSQL ........... no
              SQLite 2 ............. no
              SQLite ............... yes (plugin, using bundled copy)
              TDS .................. no
            tslib .................. no
            udev ................... no
            xkbcommon-x11........... no
            xkbcommon-evdev......... no
            zlib ................... yes (bundled copy)
          
          
          NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1.
          Configure with '-qreal float' to create a build that is binary compatible with 5.1.
          
          Qt is now configured for building. Just run 'make'.
          Once everything is built, you must run 'make install'.
          Qt will be installed into /home/Qt5.6-arm
          
          Prior to reconfiguration, make sure you remove any leftovers from
          the previous build.
          

          the libqsqlite.so shows not a dynamic executable both on ubuntu and on the device.

          the cross-compile tool's version is arm-2014.05

          what's the meaning of the warning above?

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 26 Feb 2020, 09:54 last edited by
          #4

          @Mihan This is strange.
          What about "Also set QT_DEBUG_PLUGINS before starting your app and check the output"?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          M 1 Reply Last reply 27 Feb 2020, 01:07
          0
          • J jsulm
            26 Feb 2020, 09:54

            @Mihan This is strange.
            What about "Also set QT_DEBUG_PLUGINS before starting your app and check the output"?

            M Offline
            M Offline
            Mihan
            wrote on 27 Feb 2020, 01:07 last edited by
            #5

            @jsulm
            uh, I set QT_DEBUG_PLUGINS then it shows

            QLibraryPrivate::loadPlugin failed on "/usr/lib/qt5/plugins/sqldrivers/libqsqlite.so" : "Cannot load library /usr/lib/qt5/plugins/sqldrivers/libqsqlite.so: (/usr/lib/qt5/plugins/sqldrivers/libqsqlite.so: internal error)"
            

            how to check this internal error

            J 1 Reply Last reply 27 Feb 2020, 05:25
            0
            • M Mihan
              27 Feb 2020, 01:07

              @jsulm
              uh, I set QT_DEBUG_PLUGINS then it shows

              QLibraryPrivate::loadPlugin failed on "/usr/lib/qt5/plugins/sqldrivers/libqsqlite.so" : "Cannot load library /usr/lib/qt5/plugins/sqldrivers/libqsqlite.so: (/usr/lib/qt5/plugins/sqldrivers/libqsqlite.so: internal error)"
              

              how to check this internal error

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 27 Feb 2020, 05:25 last edited by
              #6

              @Mihan To be sure: this is happening on your device and you compiled these libs for your device?
              What does

              file /usr/lib/qt5/plugins/sqldrivers/libqsqlite.so
              

              output?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              M 1 Reply Last reply 27 Feb 2020, 06:03
              0
              • J jsulm
                27 Feb 2020, 05:25

                @Mihan To be sure: this is happening on your device and you compiled these libs for your device?
                What does

                file /usr/lib/qt5/plugins/sqldrivers/libqsqlite.so
                

                output?

                M Offline
                M Offline
                Mihan
                wrote on 27 Feb 2020, 06:03 last edited by
                #7

                @jsulm
                happening on device but the lib is cross-compiled on ubuntu.

                The output of the command above is:

                /usr/lib/qt5/plugins/sqldrivers/libqsqlite.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, stripped
                
                J 1 Reply Last reply 27 Feb 2020, 06:04
                0
                • M Mihan
                  27 Feb 2020, 06:03

                  @jsulm
                  happening on device but the lib is cross-compiled on ubuntu.

                  The output of the command above is:

                  /usr/lib/qt5/plugins/sqldrivers/libqsqlite.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, stripped
                  
                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 27 Feb 2020, 06:04 last edited by
                  #8

                  @Mihan Then I don't know. Maybe libqsqlite.so is corrupted?

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  M 1 Reply Last reply 27 Feb 2020, 06:09
                  0
                  • J jsulm
                    27 Feb 2020, 06:04

                    @Mihan Then I don't know. Maybe libqsqlite.so is corrupted?

                    M Offline
                    M Offline
                    Mihan
                    wrote on 27 Feb 2020, 06:09 last edited by
                    #9

                    @jsulm I have no idea too :( , now I reinstall a new ubuntu 32bit for rebuilding them

                    1 Reply Last reply
                    0

                    2/9

                    26 Feb 2020, 05:39

                    7 unread
                    • Login

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