QSqlDatabase: QSQLITE driver not loaded (Yocto / Qt5.6)



  • I am working on Nitrogen6x board that runs on Yocto 2.1 with Qt 5.6.2 support. I have developed a Qt application that reads data from a Sql database, but I started noticing the below error when I launch my application on target.

    QSQLITE driver not loaded 
    QSqlDatabase: available drivers:
    

    As I understand it, this means that I do not have the QSQLITE driver (plugin) built and installed on my target system. I did a simple search to find sql plugin on my target machine and I got the below dump:

    ~ # find / -name *sql*
    /usr/bin/sqlite3
    /usr/lib/rpm/qf/wdj_l10n_sqlite
    /usr/lib/rpm/qf/yum_primary_sqlite
    /usr/lib/rpm/qf/yum_other_sqlite
    /usr/lib/rpm/qf/yum_filelists_sqlite
    /usr/lib/libsqlite3.so.0.8.6
    /usr/lib/libsqlite3.so.0
    /usr/lib/libsqlite3.so
    /usr/share/mime/application/x-sqlite3.xml
    /usr/share/mime/application/x-kexiproject-sqlite3.xml
    /usr/share/mime/application/x-sqlite2.xml
    /usr/share/mime/application/sql.xml
    /usr/share/mime/application/x-kexiproject-sqlite2.xml
    /opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/libsqlite3.so
    /opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/libsqlite3.so.0
    /opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/.debug/libsqlite3.so.0.8.6
    /opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/libsqlite3.la
    /opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/modules/qt_lib_sql.pri
    /opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/modules/qt_lib_sql_private.pri
    /opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/libsqlite3.so.0.8.6
    /opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/pkgconfig/sqlite3.pc
    /opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/python2.7/lib-dynload/.debug/_sqlite3.so
    

    I read through some online posts and as I understand I would expect something like sqldrivers/libqsqlite.so to be present under

    /opt/poky/2.1.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/qt5/plugins
    

    to resolve this error ?

    I have added PACKAGECONFIG_append_pn-qtbase = " sql-sqlite" in my local.conf. And tried to do bitbake meta-toolchain-qt5 the build was successful, BUT after extracting the SDK I still don't find the /sqldrivers/ under plugings

    I wanted to set my yocto build to create the QSQLITE driver plugin for the target file system. Any help on this is deeply appreciated. Thanks in advance.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.