Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt plugins MySQL in Raspbian
Forum Updated to NodeBB v4.3 + New Features

Qt plugins MySQL in Raspbian

Scheduled Pinned Locked Moved Solved Installation and Deployment
25 Posts 4 Posters 12.2k 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.
  • SGaistS SGaist

    I just re-read your qmake line to build the plugin. You have a space between -L and your path which is wrong. The -L and -l options both require to have their argument right after.

    NisixN Offline
    NisixN Offline
    Nisix
    wrote on last edited by Nisix
    #10

    @SGaist I do it again and no error, after the command make install. He said he creat the lib .so on $PathOfQt5/plugins/

    And when i tried to run my app he said again QSQLDatabase QMYSQL driver not loaded
    & QSQLDatabase : available drivers : QSQLITE

    Can i use the lib for ubuntu 14.0.4 for my raspberry ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #11

      No you can't, they are not from the same architecture. You have to compile the plugin with the Qt you are using for your RPi.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      NisixN 1 Reply Last reply
      0
      • SGaistS SGaist

        No you can't, they are not from the same architecture. You have to compile the plugin with the Qt you are using for your RPi.

        NisixN Offline
        NisixN Offline
        Nisix
        wrote on last edited by
        #12

        @SGaist Ok, i do it and not work at all...
        with the same error in Qt ...

        QSQLDatabase QMYSQL driver not loaded
        & QSQLDatabase : available drivers : QSQLITE

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #13

          Did you check that the plugin was properly installed in your device ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          NisixN 1 Reply Last reply
          0
          • SGaistS SGaist

            Did you check that the plugin was properly installed in your device ?

            NisixN Offline
            NisixN Offline
            Nisix
            wrote on last edited by
            #14

            @SGaist Yep he did. Should i copy/paste on my debug folder ?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #15

              He did ? Who's that ?

              What do you mean by copy/past on my debug folder ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              NisixN 1 Reply Last reply
              0
              • SGaistS SGaist

                He did ? Who's that ?

                What do you mean by copy/past on my debug folder ?

                NisixN Offline
                NisixN Offline
                Nisix
                wrote on last edited by
                #16

                @SGaist @SGaist Sorry for my english :]
                I mean yeah i got the good drivers.
                And my question is : should i copy / paste the lib on my projet folder (in debug / release) or something else ?

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #17

                  No, they should be in Qt's installation folder under plugins/sqldrivers/

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  NisixN 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    No, they should be in Qt's installation folder under plugins/sqldrivers/

                    NisixN Offline
                    NisixN Offline
                    Nisix
                    wrote on last edited by
                    #18

                    @SGaist Yeah, they are in the folder sqldrivers as you said. I really don't know how to help you with some indications... :/

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #19

                      What do you get if your run ldd libqsqlmysql.so on your RPi ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      NisixN 1 Reply Last reply
                      1
                      • SGaistS SGaist

                        What do you get if your run ldd libqsqlmysql.so on your RPi ?

                        NisixN Offline
                        NisixN Offline
                        Nisix
                        wrote on last edited by
                        #20

                        @SGaist I got this :

                        pi@raspberrypi:/usr/lib/arm-linux-gnueabihf/qt5/plugins/sqldrivers $ ldd libqsqlmysql.so
                        linux-vdso.so.1 (0x7ec39000)
                        /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76f42000)
                        libmysqlclient.so.18 => /usr/lib/arm-linux-gnueabihf/libmysqlclient.so.18 (0x76c1a000)
                        libQt5Sql.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Sql.so.5 (0x76bd4000)
                        libQt5Core.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 (0x7674f000)
                        libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76673000)
                        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76532000)
                        /lib/ld-linux-armhf.so.3 (0x54b8f000)
                        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76509000)
                        libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x764e2000)
                        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x764cf000)
                        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76454000)
                        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76427000)
                        libicui18n.so.52 => /usr/lib/arm-linux-gnueabihf/libicui18n.so.52 (0x76266000)
                        libicuuc.so.52 => /usr/lib/arm-linux-gnueabihf/libicuuc.so.52 (0x7611e000)
                        libglib-2.0.so.0 => /lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0x7601b000)
                        librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x76004000)
                        libicudata.so.52 => /usr/lib/arm-linux-gnueabihf/libicudata.so.52 (0x74987000)
                        libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0x74913000)

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #21

                          Looks fine… Can you start your application with QT_DEBUG_PLUGINS=1 ? To see what happens when your application loads the plugins.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          NisixN 1 Reply Last reply
                          0
                          • SGaistS SGaist

                            Looks fine… Can you start your application with QT_DEBUG_PLUGINS=1 ? To see what happens when your application loads the plugins.

                            NisixN Offline
                            NisixN Offline
                            Nisix
                            wrote on last edited by
                            #22

                            @SGaist I go this about Qt plugins for mysql :

                            Got keys from plugin meta data ("QSQLITE")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/sqldrivers/libqsqlmysql.so"
                            Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/sqldrivers/libqsqlmysql.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                "MetaData": {
                                    "Keys": [
                                        "QMYSQL3",
                                        "QMYSQL"
                                    ]
                                },
                                "className": "QMYSQLDriverPlugin",
                                "debug": false,
                                "version": 328450
                            }
                            
                            
                            Got keys from plugin meta data ("QMYSQL3", "QMYSQL")
                            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/arm-linux-gnueabihf/qt5/plugins/sqldrivers/libqsqlpsql.so"
                            Found metadata in lib /usr/lib/arm-linux-gnueabihf/qt5/plugins/sqldrivers/libqsqlpsql.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QSqlDriverFactoryInterface",
                                "MetaData": {
                                    "Keys": [
                                        "QPSQL7",
                                        "QPSQL"
                                    ]
                                },
                                "className": "QPSQLDriverPlugin",
                                "debug": false,
                                "version": 328960
                            }
                            
                            
                            In /usr/lib/arm-linux-gnueabihf/qt5/plugins/sqldrivers/libqsqlpsql.so:
                              Plugin uses incompatible Qt library (5.5.0) [release]
                            "Le plugin '/usr/lib/arm-linux-gnueabihf/qt5/plugins/sqldrivers/libqsqlpsql.so' utilise une bibliothèque Qt incompatible. (5.5.0) [release]"
                                     not a plugin
                            QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/sqldrivers" ...
                            loaded library "/usr/lib/arm-linux-gnueabihf/qt5/plugins/sqldrivers/libqsqlite.so"
                            
                            
                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #23

                              Looks like you either have two different version of Qt installed or you build your plugin with a different version of Qt than the one you originally built.

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              NisixN 1 Reply Last reply
                              0
                              • SGaistS SGaist

                                Looks like you either have two different version of Qt installed or you build your plugin with a different version of Qt than the one you originally built.

                                NisixN Offline
                                NisixN Offline
                                Nisix
                                wrote on last edited by
                                #24

                                @SGaist Ok, i will try a new install of Qt with this tutorial https://wiki.qt.io/RaspberryPi2EGLFS
                                Then a new install of MySql header & lib files. I will inform you about progress of this. I hate Qt on raspbian (joke ofc) :D

                                1 Reply Last reply
                                0
                                • N Offline
                                  N Offline
                                  Norbert M
                                  wrote on last edited by
                                  #25

                                  Hello,

                                  I know this thread is old but I came here with the same problem and managed to solve it.

                                  By installing libqt5sql5-mysql with $ apt-get install libqt5sql5-mysql

                                  Happy coding ! :)

                                  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