Set-up MariaDB library file location programmatically?
-
@Bonnie , that looks like its done the trick.
simonplatten@Simons-iMac sqldrivers % $QTDIRBIN/qmake -- MYSQL_INCDIR="/usr/local/Cellar/mariadb/10.4.13/include/mysql" "MYSQL_LIBDIR=/usr/local/Cellar/mariadb/10.4.13/lib" MYSQL_LIBS="-lmariadb" Running configuration tests... Checking for DB2 (IBM)... no Checking for InterBase... no Checking for MySQL... yes 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 .................................. yes 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/simonplatten/Qt/5.14.2/clang_64'. Prior to reconfiguration, make sure you remove any leftovers from the previous build.
-
@SPlatten
It is actually in the doc:If something goes wrong and you want qmake to recheck your available drivers, you must remove config.cache in <QTDIR>/qtbase/src/plugins/sqldrivers - otherwise qmake will not search for the available drivers again.
I think the doc should make that sentence more sight-catching.
Many people who had their first qmake command unsuccessful would be stucked there, with a never-changing config.log. -
@Bonnie , Hello, I'm trying to rebuild the library again and from my notes:
$QTDIRBIN/qmake -- MYSQL_INCDIR="/usr/local/Cellar/mariadb/10.4.13/include/mysql" "MYSQL_LIBDIR=/usr/local/Cellar/mariadb/10.4.13/lib" MYSQL_LIBS="-lmariadb"
This results in:
Usage: /Users/sy/Qt/5.15.1/clang_64/bin/qmake [mode] [options] [files] QMake has two modes, one mode for generating project files based on some heuristics, and the other for generating makefiles. Normally you shouldn't need to specify a mode, as makefile generation is the default mode for qmake, but you may use this to test qmake on an existing project Mode: -project Put qmake into project file generation mode In this mode qmake interprets [files] as files to be added to the .pro file. By default, all files with known source extensions are added. Note: The created .pro file probably will need to be edited. For example add the QT variable to specify what modules are required. -makefile Put qmake into makefile generation mode (default) In this mode qmake interprets files as project files to be processed, if skipped qmake will try to find a project file in your current working directory Warnings Options: -Wnone Turn off all warnings; specific ones may be re-enabled by later -W options -Wall Turn on all warnings -Wparser Turn on parser warnings -Wlogic Turn on logic warnings (on by default) -Wdeprecated Turn on deprecation warnings (on by default) Options: * You can place any variable assignment in options and it will be * * processed as if it was in [files]. These assignments will be * * processed before [files] by default. * -o file Write output to file -d Increase debug level -t templ Overrides TEMPLATE as templ -tp prefix Overrides TEMPLATE so that prefix is prefixed into the value -help This help -v Version information -early All subsequent variable assignments will be parsed right before default_pre.prf -before All subsequent variable assignments will be parsed right before [files] (the default) -after All subsequent variable assignments will be parsed after [files] -late All subsequent variable assignments will be parsed right after default_post.prf -norecursive Don't do a recursive search -recursive Do a recursive search -set <prop> <value> Set persistent property -unset <prop> Unset persistent property -query <prop> Query persistent property. Show all if <prop> is empty. -qtconf file Use file instead of looking for qt.conf -cache file Use file as cache [makefile mode only] -spec spec Use spec as QMAKESPEC [makefile mode only] -nocache Don't use a cache file [makefile mode only] -nodepend Don't generate dependencies [makefile mode only] -nomoc Don't generate moc targets [makefile mode only] -nopwd Don't look for files in pwd [project mode only]
I've checked $QTDIRBIN, which contains:
QTDIRBIN=/Users/sy/Qt/5.15.1/clang_64/bin
MariaDB is installed in:
/usr/local/Cellar/mariadb/10.5.7
Can you help?
-
@SPlatten said in Set-up MariaDB library file location programmatically?:
the path of make is specified by the QTDIRBIN environment variable and I've checked the qmake application is in that location
That is not what I asked.
In which directory are you when you call qmake? -
@jsulm , Ok, thank you, that was part of the problem. I am in:
/Users/sy/Qt/5.15.1/Src/qtbase/src/plugins/sqldrivers
The output now is:
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.
How do I get MySql set to yes ?
I've removed config.cache and re-run qmake, still the same results.
-
@SPlatten said in Set-up MariaDB library file location programmatically?:
How do I get MySql set to yes ?
As always in such a situation: check config.log for failed MySQL test and see what exactly the problem was...
-
-
@SPlatten said in Set-up MariaDB library file location programmatically?:
sybfront.h
Google says that header file is part of freetds-dev package (on Ubuntu).
-
Since you want to build the MariaDB backend, what does the checks related to that backend say ?
-
@SGaist , can you explain what you mean please? This is the content of the config.log:
Command line: MYSQL_INCDIR=/usr/local/Cellar/mariadb/10.5.7/include/mysql MYSQL_LIBDIR=/usr/local/Cellar/mariadb/10.5.7/lib MYSQL_LIBS=-lmariadb Global lib dirs: [] [/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/lib] Global inc dirs: [/usr/local/opt/openssl/include] [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include] looking for library db2 Trying source 0 (type inline) of library db2 ... => source failed condition 'config.win32'. Trying source 1 (type inline) of library db2 ... sqlcli.h not found in [] and global paths. sqlcli1.h not found in [] and global paths. => source produced no result. test config.sqldrivers.libraries.db2 FAILED looking for library ibase Trying source 0 (type inline) of library ibase ... => source failed condition 'config.win32'. Trying source 1 (type inline) of library ibase ... ibase.h not found in [] and global paths.
I've no idea why there is mention of win32, I'm on an iMAC running:
macOS Big Sur Version 11.1