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. Trying to build odbc on debian.. no rule to build sub-odbc

Trying to build odbc on debian.. no rule to build sub-odbc

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 725 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.
  • U Offline
    U Offline
    U7Development
    wrote on last edited by
    #1

    Hi!

    I'm following the steps to build obdc plugin on debian, everything goes fine until i reach the third command: make sub-odbc it says "no rule to build sub-odbc" i'm on the plugin/sqldrivers/ folder as typed on the first line..

    https://doc.qt.io/qt-5/sql-driver.html#qodbc

    Any ideas?
    thanks.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Did you compile Qt on your own? Normally the odbc driver is provided since there are no licensing issues. Why odbc at all?
      What did the qmake run print out? Did it find the odbc headers/libraries (see https://doc.qt.io/qt-5/sql-driver.html#building-the-drivers )

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2
      • U Offline
        U Offline
        U7Development
        wrote on last edited by
        #3

        Hi, thanks for answering.
        I have downloaded the offline built in Qt installer binaries for linux and since my db is mariadb it uses qmysql but compile process was tedious and tried doing it with no success and gave up so switched to qodbc which is available directly on Qt!

        These are the step i followed:

        1. downloaded the unixODBC sources as suggested on docs from here :
          http://www.unixodbc.org

        2. tar xvfz the compressed file inside the download folder, entered the folder and executed:
          $ ./configure
          $ make
          $ sudo make install

        (everything until here seems to be fine, except /usr/local/unixODBC is still not there)

        1. the qt following commands:
          $ cd $QTDIR/qtbase/src/plugins/sqldrivers
          $ qmake -- ODBC_PREFIX=/usr/local/unixODBC

        Results:
        Running configuration tests...
        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 '/home/simo/Qt5.12.5/5.12.5/gcc_64'.

        Prior to reconfiguration, make sure you remove any leftovers from
        the previous build.

        (I suspect there is a problem or something is missing here isn't?)

        $ make sub-odbc

        Results:
        No rule to build sub-odbc

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

          Hi,

          Since you are on Debian, why not install the development package of that library with the package manager ?

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

          U 1 Reply Last reply
          3
          • SGaistS SGaist

            Hi,

            Since you are on Debian, why not install the development package of that library with the package manager ?

            U Offline
            U Offline
            U7Development
            wrote on last edited by U7Development
            #5

            @SGaist do you mean the unixodbc driver from synaptic?... may be!

            1 Reply Last reply
            0
            • Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              ODBC ................................... no

              So it was not found - so how do you expect that 'make sub-odbc' will work in any way?

              When you're using mariadb I don't see any reason to use the odbc driver - compile the mysql plugin.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              U 1 Reply Last reply
              2
              • Christian EhrlicherC Christian Ehrlicher

                ODBC ................................... no

                So it was not found - so how do you expect that 'make sub-odbc' will work in any way?

                When you're using mariadb I don't see any reason to use the odbc driver - compile the mysql plugin.

                U Offline
                U Offline
                U7Development
                wrote on last edited by
                #7

                @Christian-Ehrlicher thats a problem, i tried to compile QMYSQL first, but i could not, that was a headache.... i remember the same output for that : No rules to build sub-mysql, i was religiously following the docs..

                1 Reply Last reply
                0
                • Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by Christian Ehrlicher
                  #8

                  Follow the instructions (exactly!), post the stuff which does not work... or simply use the Qt provided by your distribution.

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

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

                    Like I already wrote before: install your distribution development packages for the dependencies you want to use. That will make your life way easier and it'll better integrated with your work machine.

                    Note that you should also have test log files that will show where the failure happened.

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

                    1 Reply Last reply
                    1

                    • Login

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