Trying to build odbc on debian.. no rule to build sub-odbc
-
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. -
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 ) -
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:
-
downloaded the unixODBC sources as suggested on docs from here :
http://www.unixodbc.org -
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)
- 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) ........................... noQt 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 -
-
Hi,
Since you are on Debian, why not install the development package of that library with the package manager ?
-
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.
-
@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..
-
Follow the instructions (exactly!), post the stuff which does not work... or simply use the Qt provided by your distribution.
-
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.