Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Set-up MariaDB library file location programmatically?
Forum Updated to NodeBB v4.3 + New Features

Set-up MariaDB library file location programmatically?

Scheduled Pinned Locked Moved Solved General and Desktop
85 Posts 7 Posters 36.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.
  • hskoglundH Offline
    hskoglundH Offline
    hskoglund
    wrote on last edited by hskoglund
    #53

    But then homebrew update should give you mariadb 10.4.13...
    Edit: even better: brew upgrade mariadb

    SPlattenS 1 Reply Last reply
    1
    • hskoglundH hskoglund

      But then homebrew update should give you mariadb 10.4.13...
      Edit: even better: brew upgrade mariadb

      SPlattenS Offline
      SPlattenS Offline
      SPlatten
      wrote on last edited by SPlatten
      #54

      @hskoglund

      simonplatten@Simons-iMac sqldrivers % brew update
      Already up-to-date.
      
      simonplatten@Simons-iMac sqldrivers % ls -l /usr/local/Cellar/mariadb 
      total 0
      drwxr-xr-x  20 simonplatten  staff  640 28 Sep  2019 10.4.6_1
      

      Upgrading mariadb now.

      Kind Regards,
      Sy

      SPlattenS 1 Reply Last reply
      0
      • SPlattenS SPlatten

        @hskoglund

        simonplatten@Simons-iMac sqldrivers % brew update
        Already up-to-date.
        
        simonplatten@Simons-iMac sqldrivers % ls -l /usr/local/Cellar/mariadb 
        total 0
        drwxr-xr-x  20 simonplatten  staff  640 28 Sep  2019 10.4.6_1
        

        Upgrading mariadb now.

        SPlattenS Offline
        SPlattenS Offline
        SPlatten
        wrote on last edited by SPlatten
        #55

        And after all that still the same:

        simonplatten@Simons-iMac sqldrivers % cat config.log
        Command line: MYSQL_INCDIR=/usr/local/Cellar/mariadb/10.4.13/include/mysql MYSQL_LIBDIR=/usr/local/Cellar/mariadb/10.4.13/lib MYSQL_LIBS=-lmariadb
        Global lib dirs: [] [/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.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/11.0.3/include /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include]
        loaded result for library config.sqldrivers.libraries.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
        loaded result for library config.sqldrivers.libraries.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.
          => source produced no result.
        test config.sqldrivers.libraries.ibase FAILED
        loaded result for library config.sqldrivers.libraries.mysql
        Trying source 0 (type mysqlConfig) of library mysql ...
        + /usr/local/bin/mysql_config --version
        > 10.4.6
        + /usr/local/bin/mysql_config --libs_r
        > -L/usr/local/Cellar/mariadb/10.4.6_1/lib  -lmariadb -lz -liconv -lssl -lcrypto
        + /usr/local/bin/mysql_config --include
        > -I/usr/local/Cellar/mariadb/10.4.6_1/include/mysql -I/usr/local/Cellar/mariadb/10.4.6_1/include/mysql/..
        + cd /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql && /Users/simonplatten/Qt/5.14.2/clang_64/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 'INCLUDEPATH += /usr/local/opt/openssl/include' 'QMAKE_USE += mysql' 'QMAKE_LIBS_MYSQL = -L/usr/local/Cellar/mariadb/10.4.6_1/lib' 'QMAKE_INCDIR_MYSQL = /usr/local/Cellar/mariadb/10.4.6_1/include/mysql /usr/local/Cellar/mariadb/10.4.6_1/include' /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql
        > Info: creating stash file /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/.qmake.stash
        + cd /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql && MAKEFLAGS= make
        > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -w -fPIC  -I. -I/usr/local/opt/openssl/include -I/usr/local/Cellar/mariadb/10.4.6_1/include/mysql -I/usr/local/Cellar/mariadb/10.4.6_1/include -I/Users/simonplatten/Qt/5.14.2/clang_64/mkspecs/macx-clang -o main.o main.cpp
        > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -Wl,-rpath,@executable_path/../Frameworks -o mysql main.o   -L/usr/local/Cellar/mariadb/10.4.6_1/lib   
        > Undefined symbols for architecture x86_64:
        >   "_mysql_get_client_version", referenced from:
        >       _main in main.o
        > ld: symbol(s) not found for architecture x86_64
        > clang: error: linker command failed with exit code 1 (use -v to see invocation)
        > make: *** [mysql] Error 1
         => source failed verification.
        Trying source 1 (type mysqlConfig) of library mysql ...
        + /usr/local/bin/mysql_config --version
        > 10.4.6
        + /usr/local/bin/mysql_config --libs
        > -L/usr/local/Cellar/mariadb/10.4.6_1/lib  -lmariadb -lz -liconv -lssl -lcrypto
        + /usr/local/bin/mysql_config --include
        > -I/usr/local/Cellar/mariadb/10.4.6_1/include/mysql -I/usr/local/Cellar/mariadb/10.4.6_1/include/mysql/..
        + cd /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql && /Users/simonplatten/Qt/5.14.2/clang_64/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 'INCLUDEPATH += /usr/local/opt/openssl/include' 'QMAKE_USE += mysql' 'QMAKE_LIBS_MYSQL = -L/usr/local/Cellar/mariadb/10.4.6_1/lib' 'QMAKE_INCDIR_MYSQL = /usr/local/Cellar/mariadb/10.4.6_1/include/mysql /usr/local/Cellar/mariadb/10.4.6_1/include' /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql
        + cd /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql && MAKEFLAGS= make clean && MAKEFLAGS= make
        > rm -f main.o
        > rm -f *~ core *.core
        > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -w -fPIC  -I. -I/usr/local/opt/openssl/include -I/usr/local/Cellar/mariadb/10.4.6_1/include/mysql -I/usr/local/Cellar/mariadb/10.4.6_1/include -I/Users/simonplatten/Qt/5.14.2/clang_64/mkspecs/macx-clang -o main.o main.cpp
        > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -Wl,-rpath,@executable_path/../Frameworks -o mysql main.o   -L/usr/local/Cellar/mariadb/10.4.6_1/lib   
        > Undefined symbols for architecture x86_64:
        >   "_mysql_get_client_version", referenced from:
        >       _main in main.o
        > ld: symbol(s) not found for architecture x86_64
        > clang: error: linker command failed with exit code 1 (use -v to see invocation)
        > make: *** [mysql] Error 1
         => source failed verification.
        Trying source 2 (type mysqlConfig) of library mysql ...
        + /usr/local/bin/mysql_config --version
        > 10.4.6
        + /usr/local/bin/mysql_config --libs_r
        > -L/usr/local/Cellar/mariadb/10.4.6_1/lib  -lmariadb -lz -liconv -lssl -lcrypto
        + /usr/local/bin/mysql_config --include
        > -I/usr/local/Cellar/mariadb/10.4.6_1/include/mysql -I/usr/local/Cellar/mariadb/10.4.6_1/include/mysql/..
        + cd /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql && /Users/simonplatten/Qt/5.14.2/clang_64/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 'INCLUDEPATH += /usr/local/opt/openssl/include' 'QMAKE_USE += mysql' 'QMAKE_LIBS_MYSQL = -L/usr/local/Cellar/mariadb/10.4.6_1/lib -lmariadb -lz -liconv -lssl -lcrypto' 'QMAKE_INCDIR_MYSQL = /usr/local/Cellar/mariadb/10.4.6_1/include/mysql /usr/local/Cellar/mariadb/10.4.6_1/include' /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql
        + cd /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql && MAKEFLAGS= make clean && MAKEFLAGS= make
        > rm -f main.o
        > rm -f *~ core *.core
        > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -w -fPIC  -I. -I/usr/local/opt/openssl/include -I/usr/local/Cellar/mariadb/10.4.6_1/include/mysql -I/usr/local/Cellar/mariadb/10.4.6_1/include -I/Users/simonplatten/Qt/5.14.2/clang_64/mkspecs/macx-clang -o main.o main.cpp
        > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -Wl,-rpath,@executable_path/../Frameworks -o mysql main.o   -L/usr/local/Cellar/mariadb/10.4.6_1/lib -lmariadb -lz -liconv -lssl -lcrypto   
        > ld: library not found for -lssl
        > clang: error: linker command failed with exit code 1 (use -v to see invocation)
        > make: *** [mysql] Error 1
         => source failed verification.
        Trying source 3 (type mysqlConfig) of library mysql ...
        + /usr/local/bin/mysql_config --version
        > 10.4.6
        + /usr/local/bin/mysql_config --libs
        > -L/usr/local/Cellar/mariadb/10.4.6_1/lib  -lmariadb -lz -liconv -lssl -lcrypto
        + /usr/local/bin/mysql_config --include
        > -I/usr/local/Cellar/mariadb/10.4.6_1/include/mysql -I/usr/local/Cellar/mariadb/10.4.6_1/include/mysql/..
        + cd /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql && /Users/simonplatten/Qt/5.14.2/clang_64/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 'INCLUDEPATH += /usr/local/opt/openssl/include' 'QMAKE_USE += mysql' 'QMAKE_LIBS_MYSQL = -L/usr/local/Cellar/mariadb/10.4.6_1/lib -lmariadb -lz -liconv -lssl -lcrypto' 'QMAKE_INCDIR_MYSQL = /usr/local/Cellar/mariadb/10.4.6_1/include/mysql /usr/local/Cellar/mariadb/10.4.6_1/include' /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql
        + cd /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/mysql && MAKEFLAGS= make clean && MAKEFLAGS= make
        > rm -f main.o
        > rm -f *~ core *.core
        > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -w -fPIC  -I. -I/usr/local/opt/openssl/include -I/usr/local/Cellar/mariadb/10.4.6_1/include/mysql -I/usr/local/Cellar/mariadb/10.4.6_1/include -I/Users/simonplatten/Qt/5.14.2/clang_64/mkspecs/macx-clang -o main.o main.cpp
        > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -Wl,-rpath,@executable_path/../Frameworks -o mysql main.o   -L/usr/local/Cellar/mariadb/10.4.6_1/lib -lmariadb -lz -liconv -lssl -lcrypto   
        > ld: library not found for -lssl
        > clang: error: linker command failed with exit code 1 (use -v to see invocation)
        > make: *** [mysql] Error 1
         => source failed verification.
        Trying source 4 (type inline) of library mysql ...
        mysql.h not found in [/usr/local/include] and global paths.
          => source produced no result.
        Trying source 5 (type inline) of library mysql ...
          => source failed condition 'config.win32'.
        Trying source 6 (type inline) of library mysql ...
        mysql.h not found in [/usr/local/include] and global paths.
          => source produced no result.
        test config.sqldrivers.libraries.mysql FAILED
        loaded result for library config.sqldrivers.libraries.oci
        Trying source 0 (type inline) of library oci ...
          => source failed condition 'config.win32'.
        Trying source 1 (type inline) of library oci ...
        oci.h not found in [] and global paths.
          => source produced no result.
        test config.sqldrivers.libraries.oci FAILED
        loaded result for library config.sqldrivers.libraries.odbc
        Trying source 0 (type inline) of library odbc ...
          => source failed condition 'config.win32'.
        Trying source 1 (type inline) of library odbc ...
        sql.h not found in [] and global paths.
        sqlext.h not found in [] and global paths.
          => source produced no result.
        Trying source 2 (type inline) of library odbc ...
          => source failed condition '!config.win32 && !config.darwin'.
        test config.sqldrivers.libraries.odbc FAILED
        loaded result for library config.sqldrivers.libraries.psql
        Trying source 0 (type pkgConfig) of library psql ...
        pkg-config use disabled globally.
          => source produced no result.
        Trying source 1 (type psqlConfig) of library psql ...
        pg_config not found.
          => source produced no result.
        Trying source 2 (type psqlEnv) of library psql ...
          => source failed condition 'config.win32'.
        Trying source 3 (type psqlEnv) of library psql ...
        libpq-fe.h not found in [] and global paths.
          => source produced no result.
        test config.sqldrivers.libraries.psql FAILED
        loaded result for library config.sqldrivers.libraries.sqlite2
        Trying source 0 (type inline) of library sqlite2 ...
        sqlite.h not found in [] and global paths.
          => source produced no result.
        test config.sqldrivers.libraries.sqlite2 FAILED
        loaded result for library config.sqldrivers.libraries.tds
        Trying source 0 (type sybaseEnv) of library tds ...
          => source failed condition 'config.win32'.
        Trying source 1 (type sybaseEnv) of library tds ...
        + cd /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/tds && /Users/simonplatten/Qt/5.14.2/clang_64/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 'INCLUDEPATH += /usr/local/opt/openssl/include' 'QMAKE_USE += tds' 'QMAKE_LIBS_TDS = -lsybdb' /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/tds
        + cd /Users/simonplatten/Qt/5.14.2/Src/qtbase/src/plugins/sqldrivers/config.tests/tds && MAKEFLAGS= make
        > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.13 -w -fPIC  -I. -I/usr/local/opt/openssl/include -I/Users/simonplatten/Qt/5.14.2/clang_64/mkspecs/macx-clang -o main.o main.cpp
        > main.cpp:2:10: fatal error: 'sybfront.h' file not found
        > #include <sybfront.h>
        >          ^~~~~~~~~~~~
        > 1 error generated.
        > make: *** [main.o] Error 1
         => source failed verification.
        test config.sqldrivers.libraries.tds FAILED
        

        Kind Regards,
        Sy

        1 Reply Last reply
        0
        • hskoglundH Offline
          hskoglundH Offline
          hskoglund
          wrote on last edited by hskoglund
          #56

          Step #4 is still out of luck:

          Trying source 4 (type inline) of library mysql ...
          mysql.h not found in [/usr/local/include] and global paths.
            => source produced no result.
          

          What does
          ls -la /usr/local/include/mysql say?
          Note: no trailing /*

          SPlattenS 1 Reply Last reply
          0
          • hskoglundH hskoglund

            Step #4 is still out of luck:

            Trying source 4 (type inline) of library mysql ...
            mysql.h not found in [/usr/local/include] and global paths.
              => source produced no result.
            

            What does
            ls -la /usr/local/include/mysql say?
            Note: no trailing /*

            SPlattenS Offline
            SPlattenS Offline
            SPlatten
            wrote on last edited by
            #57

            @hskoglund

            simonplatten@Simons-iMac sqldrivers % ls -la /usr/local/include/mysql
            lrwxr-xr-x  1 simonplatten  staff  39  6 Jul 09:07 /usr/local/include/mysql -> ../Cellar/mariadb/10.4.13/include/mysql
            

            Kind Regards,
            Sy

            1 Reply Last reply
            0
            • hskoglundH Offline
              hskoglundH Offline
              hskoglund
              wrote on last edited by
              #58

              and ls -la /usr/local/include/mysql/mysql.h ?

              SPlattenS 1 Reply Last reply
              0
              • hskoglundH hskoglund

                and ls -la /usr/local/include/mysql/mysql.h ?

                SPlattenS Offline
                SPlattenS Offline
                SPlatten
                wrote on last edited by
                #59

                @hskoglund

                simonplatten@Simons-iMac sqldrivers % ls -la /usr/local/include/mysql/mysql.h              
                -rw-r--r--  1 simonplatten  staff  41174  9 May 20:28 /usr/local/include/mysql/mysql.h
                

                Kind Regards,
                Sy

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  Bonnie
                  wrote on last edited by
                  #60

                  Hey, Just in case...
                  Did you remove "config.cache" before you run qmake again?

                  hskoglundH 1 Reply Last reply
                  1
                  • B Bonnie

                    Hey, Just in case...
                    Did you remove "config.cache" before you run qmake again?

                    hskoglundH Offline
                    hskoglundH Offline
                    hskoglund
                    wrote on last edited by
                    #61

                    @Bonnie Or I was thinking nuke the whole directory :-)

                    1 Reply Last reply
                    0
                    • SPlattenS Offline
                      SPlattenS Offline
                      SPlatten
                      wrote on last edited by
                      #62

                      @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.
                      

                      Kind Regards,
                      Sy

                      B 1 Reply Last reply
                      0
                      • SPlattenS Offline
                        SPlattenS Offline
                        SPlatten
                        wrote on last edited by
                        #63

                        Thank you to everyone for your help, at last now the driver has been created and my application is able to connect to the database.

                        Kind Regards,
                        Sy

                        1 Reply Last reply
                        0
                        • SPlattenS SPlatten

                          @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.
                          
                          B Offline
                          B Offline
                          Bonnie
                          wrote on last edited by Bonnie
                          #64

                          @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.

                          SPlattenS 1 Reply Last reply
                          0
                          • B Bonnie

                            @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.

                            SPlattenS Offline
                            SPlattenS Offline
                            SPlatten
                            wrote on last edited by
                            #65

                            @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?

                            Kind Regards,
                            Sy

                            jsulmJ 1 Reply Last reply
                            0
                            • SPlattenS SPlatten

                              @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?

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #66

                              @SPlatten In which directory do you call qmake?

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              SPlattenS 1 Reply Last reply
                              0
                              • jsulmJ jsulm

                                @SPlatten In which directory do you call qmake?

                                SPlattenS Offline
                                SPlattenS Offline
                                SPlatten
                                wrote on last edited by
                                #67

                                @jsulm, the path of make is specified by the QTDIRBIN environment variable and I've checked the qmake application is in that location.

                                Kind Regards,
                                Sy

                                jsulmJ 1 Reply Last reply
                                0
                                • SPlattenS SPlatten

                                  @jsulm, the path of make is specified by the QTDIRBIN environment variable and I've checked the qmake application is in that location.

                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #68

                                  @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?

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  SPlattenS 1 Reply Last reply
                                  0
                                  • jsulmJ jsulm

                                    @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?

                                    SPlattenS Offline
                                    SPlattenS Offline
                                    SPlatten
                                    wrote on last edited by SPlatten
                                    #69

                                    @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.

                                    Kind Regards,
                                    Sy

                                    jsulmJ 1 Reply Last reply
                                    0
                                    • SPlattenS SPlatten

                                      @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.

                                      jsulmJ Offline
                                      jsulmJ Offline
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #70

                                      @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...

                                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      SPlattenS 1 Reply Last reply
                                      0
                                      • jsulmJ jsulm

                                        @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...

                                        SPlattenS Offline
                                        SPlattenS Offline
                                        SPlatten
                                        wrote on last edited by
                                        #71

                                        @jsulm

                                        > main.cpp:2:10: fatal error: 'sybfront.h' file not found
                                        > #include <sybfront.h>
                                        >          ^~~~~~~~~~~~
                                        > 1 error generated.
                                        > make: *** [main.o] Error 1
                                        

                                        Not sure why this is an issue, I have built the driver for a previous version.

                                        Kind Regards,
                                        Sy

                                        jsulmJ 1 Reply Last reply
                                        0
                                        • SPlattenS SPlatten

                                          @jsulm

                                          > main.cpp:2:10: fatal error: 'sybfront.h' file not found
                                          > #include <sybfront.h>
                                          >          ^~~~~~~~~~~~
                                          > 1 error generated.
                                          > make: *** [main.o] Error 1
                                          

                                          Not sure why this is an issue, I have built the driver for a previous version.

                                          jsulmJ Offline
                                          jsulmJ Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #72

                                          @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).

                                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          SPlattenS 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