Unsolved Unable to use QMYSQL driver on ArchLinux after migrating to Qt 5.6.0
-
Which version of MySQL are you running ?
-
@SGaist Is it this you are referring to: libmariadbclient 10.1.13-1 (https://www.archlinux.org/packages/extra/i686/libmariadbclient/)
-
Did that part also change when you updated your Qt version ?
-
@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.
-
Can you check the output you get from your application when running it with
QT_DEBUG_PLUGINS=1
defined ? -
@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 }
-
@SGaist Does that seems correct?
-
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
-
@SGaist Well I never done it so I don't know where to start?
-
@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
-
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. -
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
-
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. -
@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/