Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt configure could not find MySQL installation when cross compiling for raspi3?
Forum Updated to NodeBB v4.3 + New Features

Qt configure could not find MySQL installation when cross compiling for raspi3?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
mysqlqmysqlqt5cross compileraspberry pi 3
6 Posts 2 Posters 1.4k Views 1 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.
  • I Offline
    I Offline
    IMAN4K
    wrote on 3 Sept 2019, 05:12 last edited by IMAN4K 9 Mar 2019, 05:29
    #1

    Hi everyone.
    Right to the point, here is my configure command I used:

    ../configure -release -opengl es2 -no-eglfs -qt-xcb -xcb -sql-mysql -no-use-gold-linker -opensource -confirm-license -nomake examples -nomake tests -make libs -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=$RPI_TOOLCHAIN -sysroot $RPI_SYSROOT -prefix /usr/local/qt5pi -hostprefix ~/toolchain/qt5 -extprefix ~/toolchain/qt5pi -recheck-all
    

    And here is the mysql confirmation on pi(i haved synced the sysroot to my host machine):

    pi@raspberrypi:~ $ mysql_config --version
    10.1.38
    pi@raspberrypi:~ $ mysql_config --libs
    -L/usr/lib/arm-linux-gnueabihf  -lmariadbclient -lpthread -lz -lm -ldl
    pi@raspberrypi:~ $ mysql_config --include
    -I/usr/include/mysql
    

    But the configure command throw nasty error:

    ERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed.
    

    config.log for more details:

    [...]
    looking for library mysql
    Trying source 0 (type mysqlConfig) of library mysql ...
    mysql_config not found.
      => source produced no result.
    Trying source 1 (type mysqlConfig) of library mysql ...
    mysql_config not found.
      => source produced no result.
    Trying source 2 (type mysqlConfig) of library mysql ...
    mysql_config not found.
      => source produced no result.
    Trying source 3 (type mysqlConfig) of library mysql ...
    mysql_config not found.
      => source produced no result.
    Trying source 4 (type inline) of library mysql ...
    mysql.h not found in [] 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 [] and global paths.
      => source produced no result.
    test config.qtbase_sqldrivers.libraries.mysql FAILED
    [...]
    

    It seems that configure looks for mysql_config in host machine! what should we do?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      Dewy
      wrote on 3 Sept 2019, 05:25 last edited by
      #2

      You should change '-plugin-sql-mysql' parameter. Remove that and add '-qt-sql-mysql'

      As you can see https://doc.qt.io/archives/qt-4.8/configure-options.html for details.

      I 1 Reply Last reply 3 Sept 2019, 05:29
      0
      • D Dewy
        3 Sept 2019, 05:25

        You should change '-plugin-sql-mysql' parameter. Remove that and add '-qt-sql-mysql'

        As you can see https://doc.qt.io/archives/qt-4.8/configure-options.html for details.

        I Offline
        I Offline
        IMAN4K
        wrote on 3 Sept 2019, 05:29 last edited by
        #3

        Hi @dewy

        That's for Qt4, for new versions (5.12.3 for mine) as the ./configure --help says:

        [...]
        Database options:
        
          -sql-<driver> ........ Enable SQL <driver> plugin. Supported drivers:
                                 db2 ibase mysql oci odbc psql sqlite2 sqlite tds
                                 [all auto]
          -sqlite .............. Select used sqlite3 [system/qt]
        [...]
        

        We should use -sql-mysql to enable plugin.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          Dewy
          wrote on 3 Sept 2019, 05:40 last edited by
          #4

          Hello again,
          That's mean, you cannot use plugin type for configure. when I used plugin types, have bugs. So I use that.
          For 5.x.x versions, '-sql-mysql'

          1 Reply Last reply
          0
          • I Offline
            I Offline
            IMAN4K
            wrote on 3 Sept 2019, 07:25 last edited by IMAN4K 9 Mar 2019, 11:50
            #5
            This post is deleted!
            1 Reply Last reply
            0
            • I Offline
              I Offline
              IMAN4K
              wrote on 4 Sept 2019, 05:14 last edited by IMAN4K 9 Apr 2019, 05:31
              #6

              Seems to be a bug reported here QTBUG-50244

              Nobody tried to integrate MySQL for a Raspberry Pi project already ?! no workaround?!
              Seems strange :(

              1 Reply Last reply
              0

              1/6

              3 Sept 2019, 05:12

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved