[m-users.] Building the ODBC library fails
Julien Fischer
jfischer at opturion.com
Sat Jan 15 14:35:01 AEDT 2022
Hi Volker,
On Fri, 14 Jan 2022, Volker Wysk wrote:
> I've downloaded the latest ROTD source distribution and tried to build the
> ODBC library. I'm using the stable release 20.06.1:
>
>
> desktop /usr/local/src/mercury-srcdist-rotd-2022-01-13/extras/odbc $ mmc --
> make libodbc.depend
> desktop /usr/local/src/mercury-srcdist-rotd-2022-01-13/extras/odbc $ mmc --
> make libodbc
...
> ./odbc.mh:247:9: error: unknown type name ‘SDWORD’
> ./odbc.mh:259:9: error: unknown type name ‘SQLHSTMT’
> ./odbc.mh:272:8: error: unknown type name ‘SQLRETURN’
> ./odbc.mh:276:23: error: unknown type name ‘SWORD’
> ./odbc.mh:276:39: error: unknown type name ‘UDWORD’
> ./odbc.mh:276:56: error: unknown type name ‘SWORD’
> ./odbc.mh:277:5: error: unknown type name ‘SWORD’
> ... error log truncated, see `odbc.err' for the complete log.
> ** Error making `Mercury/os/odbc.o'.
>
>
> It's the same with the "extras/odbc" in the 20.06.1 source distribution.
This is caused by using mmc --make to build the ODBC binding -- it is
not currently set up for that. The Mmakefile defines some C macros that
specify the driver and the database. (These are given by the variables
MODBC_DRIVER and MODBC_DB in the Mmakefile.)
Using mmc --make to compile libodbc will not work unless you do
something equivalent to what the Mmakefile does. Since this all seems
to be very system-dependent, I can't say exactly what will work on your
system. On mine (CentOS 7, unixODBC 2.3.1), the following did:
$ mmc --cflag "-DMODBC_UNIX" --cflag "-DMODBC_MYSQL" -lodbc \
-lpthread -ldl --make libodb
> It works for "odbc_test" with "mmake depend ; mmake odbc_test". But "mmake"
> results in:
>
>
> desktop /usr/local/src/mercury/extras/odbc $ LANG=C mmake
> /tmp/mmake.92SAYH:895: warning: undefined variable
> 'MMAKE_USE_SUBDIRS_EXPLICIT'
> /tmp/mmake.92SAYH:919: warning: undefined variable
> 'MMAKE_USE_SUBDIRS_EXPLICIT'
> make: Nothing to be done for 'default_target'.
That looks like you have run "mmake" in a directory where "mmc --make"
has previously been run, but not cleaned up.
Julien.
More information about the users
mailing list