Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Unable to use QMYSQL driver on ArchLinux after migrating to Qt 5.6.0
Forum Updated to NodeBB v4.3 + New Features

Unable to use QMYSQL driver on ArchLinux after migrating to Qt 5.6.0

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
17 Posts 3 Posters 5.1k Views 2 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    You should run ldd on the MySQL plugin to see if you don't have a library mismatch there.

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

    J 1 Reply Last reply
    0
    • SGaistS SGaist

      Hi,

      You should run ldd on the MySQL plugin to see if you don't have a library mismatch there.

      J Offline
      J Offline
      johnlamericain
      wrote on last edited by
      #3

      @SGaist I did but no obvious error there:

      ldd /usr/lib/qt/plugins/sqldrivers/libqsqlmysql.so
      linux-vdso.so.1 (0x00007fffb9fff000)
      libmysqlclient.so.18 => /usr/lib/libmysqlclient.so.18 (0x00007f24d5eb8000)
      libQt5Sql.so.5 => /usr/lib/libQt5Sql.so.5 (0x00007f24d5c71000)
      libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0x00007f24d55a7000)
      libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f24d5224000)
      libc.so.6 => /usr/lib/libc.so.6 (0x00007f24d4e83000)
      libz.so.1 => /usr/lib/libz.so.1 (0x00007f24d4c6d000)
      libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0x00007f24d49fb000)
      libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007f24d4584000)
      libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f24d4380000)
      libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f24d4162000)
      libm.so.6 => /usr/lib/libm.so.6 (0x00007f24d3e5d000)
      libicui18n.so.56 => /usr/lib/libicui18n.so.56 (0x00007f24d39e1000)
      libicuuc.so.56 => /usr/lib/libicuuc.so.56 (0x00007f24d3649000)
      libpcre16.so.0 => /usr/lib/libpcre16.so.0 (0x00007f24d33e3000)
      libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f24d30d5000)
      librt.so.1 => /usr/lib/librt.so.1 (0x00007f24d2ecc000)
      libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007f24d2e46000)
      libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f24d2c30000)
      /usr/lib64/ld-linux-x86-64.so.2 (0x00007f24d6640000)
      libicudata.so.56 => /usr/lib/libicudata.so.56 (0x00007f24d124c000)
      libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f24d0fdc000)
      libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f24d0dd7000)
      libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f24d0bc0000)
      liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f24d099a000)
      liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f24d0787000)
      libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f24d04a5000)
      libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f24d0291000)
      
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        Which version of MySQL are you running ?

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

        J 1 Reply Last reply
        0
        • SGaistS SGaist

          Which version of MySQL are you running ?

          J Offline
          J Offline
          johnlamericain
          wrote on last edited by
          #5

          @SGaist Is it this you are referring to: libmariadbclient 10.1.13-1 (https://www.archlinux.org/packages/extra/i686/libmariadbclient/)

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

            Did that part also change when you updated your Qt version ?

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

            J 1 Reply Last reply
            0
            • SGaistS SGaist

              Did that part also change when you updated your Qt version ?

              J Offline
              J Offline
              johnlamericain
              wrote on last edited by
              #7

              @SGaist Yes it did the first time from 10.1.12 to 10.1.13.

              But strangely when I rollback only qt5 packages to Qt 5.5.1, then it works again.

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

                Can you check the output you get from your application when running it with QT_DEBUG_PLUGINS=1 defined ?

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

                J 1 Reply Last reply
                0
                • SGaistS SGaist

                  Can you check the output you get from your application when running it with QT_DEBUG_PLUGINS=1 defined ?

                  J Offline
                  J Offline
                  johnlamericain
                  wrote on last edited by
                  #9

                  @SGaist Here is the result:

                  [dev@preprod binserver]$ export QT_DEBUG_PLUGINS=1
                  [dev@preprod binserver]$ ./DSServer
                  QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/sqldrivers" ...
                  QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/sqldrivers/libqsqlibase.so"
                  Found metadata in lib /usr/lib/qt/plugins/sqldrivers/libqsqlibase.so, metadata=
                  {
                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                      "MetaData": {
                          "Keys": [
                              "QIBASE"
                          ]
                      },
                      "className": "QIBaseDriverPlugin",
                      "debug": false,
                      "version": 329216
                  }
                  
                  
                  Got keys from plugin meta data ("QIBASE")
                  QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/sqldrivers/libqsqlite.so"
                  Found metadata in lib /usr/lib/qt/plugins/sqldrivers/libqsqlite.so, metadata=
                  {
                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                      "MetaData": {
                          "Keys": [
                              "QSQLITE"
                          ]
                      },
                      "className": "QSQLiteDriverPlugin",
                      "debug": false,
                      "version": 329216
                  }
                  
                  
                  Got keys from plugin meta data ("QSQLITE")
                  QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/sqldrivers/libqsqlmysql.so"
                  Found metadata in lib /usr/lib/qt/plugins/sqldrivers/libqsqlmysql.so, metadata=
                  {
                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                      "MetaData": {
                          "Keys": [
                              "QMYSQL3",
                              "QMYSQL"
                          ]
                      },
                      "className": "QMYSQLDriverPlugin",
                      "debug": false,
                      "version": 329216
                  }
                  
                  
                  Got keys from plugin meta data ("QMYSQL3", "QMYSQL")
                  QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/sqldrivers/libqsqlodbc.so"
                  Found metadata in lib /usr/lib/qt/plugins/sqldrivers/libqsqlodbc.so, metadata=
                  {
                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                      "MetaData": {
                          "Keys": [
                              "QODBC3",
                              "QODBC"
                          ]
                      },
                      "className": "QODBCDriverPlugin",
                      "debug": false,
                      "version": 329216
                  }
                  
                  
                  Got keys from plugin meta data ("QODBC3", "QODBC")
                  QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/sqldrivers/libqsqlpsql.so"
                  Found metadata in lib /usr/lib/qt/plugins/sqldrivers/libqsqlpsql.so, metadata=
                  {
                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                      "MetaData": {
                          "Keys": [
                              "QPSQL7",
                              "QPSQL"
                          ]
                      },
                      "className": "QPSQLDriverPlugin",
                      "debug": false,
                      "version": 329216
                  }
                  
                  
                  Got keys from plugin meta data ("QPSQL7", "QPSQL")
                  QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/sqldrivers/libqsqltds.so"
                  Found metadata in lib /usr/lib/qt/plugins/sqldrivers/libqsqltds.so, metadata=
                  {
                      "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                      "MetaData": {
                          "Keys": [
                              "QTDS7",
                              "QTDS"
                          ]
                      },
                      "className": "QTDSDriverPlugin",
                      "debug": false,
                      "version": 329216
                  }
                  
                  
                  Got keys from plugin meta data ("QTDS7", "QTDS")
                  QFactoryLoader::QFactoryLoader() checking directory path "/home/dev/binserver/sqldrivers" ...
                  loaded library "/usr/lib/qt/plugins/sqldrivers/libqsqlmysql.so"
                  Found metadata in lib /home/dev/binserver/plugins/libdscommunityserver.so, metadata=
                  {
                      "IID": "com.dsbrowser.DSPluginLoaderInterface",
                      "MetaData": {
                      },
                      "className": "DSPluginCommunityServer",
                      "debug": false,
                      "version": 329216
                  }
                  
                  J 1 Reply Last reply
                  0
                  • J johnlamericain

                    @SGaist Here is the result:

                    [dev@preprod binserver]$ export QT_DEBUG_PLUGINS=1
                    [dev@preprod binserver]$ ./DSServer
                    QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt/plugins/sqldrivers" ...
                    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/sqldrivers/libqsqlibase.so"
                    Found metadata in lib /usr/lib/qt/plugins/sqldrivers/libqsqlibase.so, metadata=
                    {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "QIBASE"
                            ]
                        },
                        "className": "QIBaseDriverPlugin",
                        "debug": false,
                        "version": 329216
                    }
                    
                    
                    Got keys from plugin meta data ("QIBASE")
                    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/sqldrivers/libqsqlite.so"
                    Found metadata in lib /usr/lib/qt/plugins/sqldrivers/libqsqlite.so, metadata=
                    {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "QSQLITE"
                            ]
                        },
                        "className": "QSQLiteDriverPlugin",
                        "debug": false,
                        "version": 329216
                    }
                    
                    
                    Got keys from plugin meta data ("QSQLITE")
                    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/sqldrivers/libqsqlmysql.so"
                    Found metadata in lib /usr/lib/qt/plugins/sqldrivers/libqsqlmysql.so, metadata=
                    {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "QMYSQL3",
                                "QMYSQL"
                            ]
                        },
                        "className": "QMYSQLDriverPlugin",
                        "debug": false,
                        "version": 329216
                    }
                    
                    
                    Got keys from plugin meta data ("QMYSQL3", "QMYSQL")
                    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/sqldrivers/libqsqlodbc.so"
                    Found metadata in lib /usr/lib/qt/plugins/sqldrivers/libqsqlodbc.so, metadata=
                    {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "QODBC3",
                                "QODBC"
                            ]
                        },
                        "className": "QODBCDriverPlugin",
                        "debug": false,
                        "version": 329216
                    }
                    
                    
                    Got keys from plugin meta data ("QODBC3", "QODBC")
                    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/sqldrivers/libqsqlpsql.so"
                    Found metadata in lib /usr/lib/qt/plugins/sqldrivers/libqsqlpsql.so, metadata=
                    {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "QPSQL7",
                                "QPSQL"
                            ]
                        },
                        "className": "QPSQLDriverPlugin",
                        "debug": false,
                        "version": 329216
                    }
                    
                    
                    Got keys from plugin meta data ("QPSQL7", "QPSQL")
                    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt/plugins/sqldrivers/libqsqltds.so"
                    Found metadata in lib /usr/lib/qt/plugins/sqldrivers/libqsqltds.so, metadata=
                    {
                        "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                        "MetaData": {
                            "Keys": [
                                "QTDS7",
                                "QTDS"
                            ]
                        },
                        "className": "QTDSDriverPlugin",
                        "debug": false,
                        "version": 329216
                    }
                    
                    
                    Got keys from plugin meta data ("QTDS7", "QTDS")
                    QFactoryLoader::QFactoryLoader() checking directory path "/home/dev/binserver/sqldrivers" ...
                    loaded library "/usr/lib/qt/plugins/sqldrivers/libqsqlmysql.so"
                    Found metadata in lib /home/dev/binserver/plugins/libdscommunityserver.so, metadata=
                    {
                        "IID": "com.dsbrowser.DSPluginLoaderInterface",
                        "MetaData": {
                        },
                        "className": "DSPluginCommunityServer",
                        "debug": false,
                        "version": 329216
                    }
                    
                    J Offline
                    J Offline
                    johnlamericain
                    wrote on last edited by
                    #10

                    @SGaist Does that seems correct?

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

                      At first sight nothing wrong there.

                      Can you do some test building your own version of the MySQL plugin ?

                      The plugin hasn't had many commits recently so it might be easy to determine if something broke there between 5.5.1 and 5.6.0

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

                      J 2 Replies Last reply
                      0
                      • SGaistS SGaist

                        At first sight nothing wrong there.

                        Can you do some test building your own version of the MySQL plugin ?

                        The plugin hasn't had many commits recently so it might be easy to determine if something broke there between 5.5.1 and 5.6.0

                        J Offline
                        J Offline
                        johnlamericain
                        wrote on last edited by
                        #12

                        @SGaist Well I never done it so I don't know where to start?

                        1 Reply Last reply
                        0
                        • SGaistS SGaist

                          At first sight nothing wrong there.

                          Can you do some test building your own version of the MySQL plugin ?

                          The plugin hasn't had many commits recently so it might be easy to determine if something broke there between 5.5.1 and 5.6.0

                          J Offline
                          J Offline
                          johnlamericain
                          wrote on last edited by
                          #13

                          @SGaist I also posted on Archlinux without much reply, but the maintainer said it works for him on another project: https://bugs.archlinux.org/task/48778

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

                            You have to clone the qtbase module and from there you can either use git bisect or since there's only handful of commits, checkout the commit before any that changed the plugin code.

                            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
                            • J Offline
                              J Offline
                              johnlamericain
                              wrote on last edited by
                              #15

                              After further investigation today, this appears to be a bug in Qt, QSqlQuery doesn't work with UNSIGNED values: https://bugreports.qt.io/browse/QTBUG-53237

                              1 Reply Last reply
                              0
                              • Hamed.MasafiH Offline
                                Hamed.MasafiH Offline
                                Hamed.Masafi
                                wrote on last edited by
                                #16

                                This error occurs due to binary intolerance of libmysqlclient version 1.8 and 1.6. Qt used version 1.6 to compile but you have version 1.6 installed.
                                Solution: make MySql plugin manually.

                                Remote object sharing (OO RPC)
                                http://forum.qt.io/topic/60680/remote-object-sharing-oo-rpc-solved

                                Advanced, Powerful and easy to use ORM for Qt5
                                https://forum.qt.io/topic/67417/advanced-powerful-and-easy-to-use-orm-for-qt5

                                J 1 Reply Last reply
                                0
                                • Hamed.MasafiH Hamed.Masafi

                                  This error occurs due to binary intolerance of libmysqlclient version 1.8 and 1.6. Qt used version 1.6 to compile but you have version 1.6 installed.
                                  Solution: make MySql plugin manually.

                                  J Offline
                                  J Offline
                                  johnlamericain
                                  wrote on last edited by
                                  #17

                                  @Hamed.Masafi I'm on Archlinux which is a Rolling release, so indeed the version of libmysqlclient update quickly, but I would assume that the people that package qt5-base are compiling Qt with the current version available: https://www.archlinux.org/packages/extra/x86_64/qt5-base/ & https://www.archlinux.org/packages/extra/x86_64/libmariadbclient/

                                  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