Set-up MariaDB library file location programmatically?
-
This is the real error:
@SPlatten said in Set-up MariaDB library file location programmatically?:
Undefined symbols for architecture x86_64:
"_mysql_get_client_version"
-
This is the real error:
@SPlatten said in Set-up MariaDB library file location programmatically?:
Undefined symbols for architecture x86_64:
"_mysql_get_client_version"
@SGaist , After seeing the output and its recommendation I edited sqldrivers.pro and added:
TEMPLATE = subdirs sqldrivers_standalone { _QMAKE_CACHE_ = $$shadowed($$SQLDRV_SRC_TREE)/.qmake.conf load(qt_configure) } qtConfig(sql-psql) : SUBDIRS += psql qtConfig(sql-mysql) : SUBDIRS += mysql qtConfig(sql-odbc) : SUBDIRS += odbc qtConfig(sql-tds) : SUBDIRS += tds qtConfig(sql-oci) : SUBDIRS += oci qtConfig(sql-db2) : SUBDIRS += db2 qtConfig(sql-sqlite) : SUBDIRS += sqlite qtConfig(sql-sqlite2) : SUBDIRS += sqlite2 qtConfig(sql-ibase) : SUBDIRS += ibase CONFIG+=sdk_no_version_check
I then removed all the config files including the cache with:
rm -R config.*
Then executed:
$QTDIRBIN/qmake -- MYSQL_INCDIR="/usr/local/Cellar/mariadb/10.5.7/include/mysql" "MYSQL_LIBDIR=/usr/local/Cellar/mariadb/10.5.7/lib" MYSQL_LIBS="-lmariadb"
All this as in:
/Users/sy/Qt/5.15.1/Src/qtbase/src/plugins/sqldrivers
The result was config.log:
Running configuration tests... Checking for DB2 (IBM)... no Checking for InterBase... no Checking for MySQL... no Checking for OCI (Oracle)... no Checking for ODBC... no Checking for PostgreSQL... no Checking for SQLite (version 2)... no Checking for TDS (Sybase)... no Done running configuration tests. Configure summary: Qt Sql Drivers: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. no OCI (Oracle) ........................... no ODBC ................................... no PostgreSQL ............................. no SQLite2 ................................ no SQLite ................................. yes Using system provided SQLite ......... no TDS (Sybase) ........................... no Qt is now configured for building. Just run 'make'. Once everything is built, you must run 'make install'. Qt will be installed into '/Users/sy/Qt/5.15.1/clang_64'. Prior to reconfiguration, make sure you remove any leftovers from the previous build.
I then executed make:
cd sqlite/ && ( test -e Makefile || /Users/sy/Qt/5.15.1/clang_64/bin/qmake -o Makefile /Users/sy/Qt/5.15.1/Src/qtbase/src/plugins/sqldrivers/sqlite/sqlite.pro ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile make[1]: Nothing to be done for `first'.
Then make install:
cd sqlite/ && ( test -e Makefile || /Users/sy/Qt/5.15.1/clang_64/bin/qmake -o Makefile /Users/sy/Qt/5.15.1/Src/qtbase/src/plugins/sqldrivers/sqlite/sqlite.pro ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile install /Users/sy/Qt/5.15.1/clang_64/bin/qmake -install qinstall -exe ../plugins/sqldrivers/libqsqlite.dylib /Users/sy/Qt/5.15.1/clang_64/plugins/sqldrivers/libqsqlite.dylib /Users/sy/Qt/5.15.1/clang_64/bin/qmake -install qinstall /Users/sy/Qt/5.15.1/Src/qtbase/src/plugins/sqldrivers/plugins/sqldrivers/libqsqlite.dylib.dSYM/Contents/Info.plist /Users/sy/Qt/5.15.1/clang_64/plugins/sqldrivers/libqsqlite.dylib.dSYM/Contents/Info.plist /Users/sy/Qt/5.15.1/clang_64/bin/qmake -install qinstall /Users/sy/Qt/5.15.1/Src/qtbase/src/plugins/sqldrivers/plugins/sqldrivers/libqsqlite.dylib.dSYM/Contents/Resources/DWARF/libqsqlite.dylib /Users/sy/Qt/5.15.1/clang_64/plugins/sqldrivers/libqsqlite.dylib.dSYM/Contents/Resources/DWARF/libqsqlite.dylib /Users/sy/Qt/5.15.1/clang_64/bin/qmake -install qinstall /Users/sy/Qt/5.15.1/Src/qtbase/src/plugins/sqldrivers/lib/cmake/Qt5Sql/Qt5Sql_QSQLiteDriverPlugin.cmake /Users/sy/Qt/5.15.1/clang_64/lib/cmake/Qt5Sql/Qt5Sql_QSQLiteDriverPlugin.cmake
I've also tried to mysql.pro:
CONFIG+=sdk_no_version_check TARGET = qsqlmysql HEADERS += $$PWD/qsql_mysql_p.h SOURCES += $$PWD/qsql_mysql.cpp $$PWD/main.cpp QMAKE_USE += mysql OTHER_FILES += mysql.json PLUGIN_CLASS_NAME = QMYSQLDriverPlugin include(../qsqldriverbase.pri)
Then repeated the above steps, still mysql shows no??? and same results. Is it looking for a mysql library because MariaDB mostly uses the name mysql as it is based on that but I've notice that there are a few folders where the name is actually mairadb and not mysql?
-
Serious question: do you realise that you just silenced a warning unrelated to the actual error ?
I already pointed you to the real issue: a symbol is missing:
_mysql_get_client_version
.In any case, Qt 5.15.2, MariaDB 10.5.8 is a working combo using the same
qmake
line you have with just the versions updated. -
Serious question: do you realise that you just silenced a warning unrelated to the actual error ?
I already pointed you to the real issue: a symbol is missing:
_mysql_get_client_version
.In any case, Qt 5.15.2, MariaDB 10.5.8 is a working combo using the same
qmake
line you have with just the versions updated. -
Serious question: do you realise that you just silenced a warning unrelated to the actual error ?
I already pointed you to the real issue: a symbol is missing:
_mysql_get_client_version
.In any case, Qt 5.15.2, MariaDB 10.5.8 is a working combo using the same
qmake
line you have with just the versions updated.