Problems: Build MySQL ODBC Connector 5.1.5 with 64-Linux

"Ida Schonfeld" <[email protected]>
Newsgroups gmane.comp.db.mysql.odbc
Message-ID <[email protected]>
Hello,

 

I wanted to build the sources from the MySQL ODBC connector 5.1.5.-0 but I have a problem with some function and type declarations.

I configured the sources with the following options:

./configure -with-debug -disable-gui -with-unixODBC -with-unixODBC-libs=/usr/local/lib64 -with-unixODBC-includes=/usr/local/include -with-mysql-path=/usr

 

The configuration is successful. But when I try to build the sources with make I get the errors like in make.log below. 

I'm using the unixODBC 2.2.14 as Driver Manager. It is build with 64 bit so that SQLULEN and SQLLEN are 8 bit while SQLINTEGER, etc are 4 bit. 

Is there maybe a Flag which I forgot to set for the configuration? I added two extracts from the sqltypes.h and the sqlext.h. The SQL-Type definitions and the Line 1862 which causes the error.

 

I'm working on an OpenSuse 10.2 (AMD64). I downloaded the sources from here (http://mysql.holywar.net/Downloads/Connector-ODBC/5.1/mysql-connector-odbc-5.1.5-0.src.rpm <http://mysql.holywar.net/Downloads/Connector-ODBC/5.1/mysql-connector-odbc-5.1.5-0.src.rpm> ) and I think this should be the newest version of the driver sources.

 

Thanks for your help

Ida Schönfeld

 

 

make.log

make[1]: Entering directory `/usr/src/packages/SOURCES/mysql-connector-odbc-5.1.5/util'

if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../driver -I..  -I/usr/local/include  -ggdb3 -DDBUG_ON -I/usr/include/mysql -fmessage-length=0 -D_FORTIFY_SOURCE=2 -g -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -fno-strict-aliasing -g -O2 -MT stringutil.lo -MD -MP -MF ".deps/stringutil.Tpo" -c -o stringutil.lo stringutil.c; \

            then mv -f ".deps/stringutil.Tpo" ".deps/stringutil.Plo"; else rm -f ".deps/stringutil.Tpo"; exit 1; fi

mkdir .libs

 gcc -DHAVE_CONFIG_H -I. -I. -I../driver -I.. -I/usr/local/include -ggdb3 -DDBUG_ON -I/usr/include/mysql -fmessage-length=0 -D_FORTIFY_SOURCE=2 -g -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -fno-strict-aliasing -g -O2 -MT stringutil.lo -MD -MP -MF .deps/stringutil.Tpo -c stringutil.c  -fPIC -DPIC -o .libs/stringutil.o

if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../driver -I..  -I/usr/local/include  -ggdb3 -DDBUG_ON -I/usr/include/mysql -fmessage-length=0 -D_FORTIFY_SOURCE=2 -g -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -fno-strict-aliasing -g -O2 -MT installer.lo -MD -MP -MF ".deps/installer.Tpo" -c -o installer.lo installer.c; \

            then mv -f ".deps/installer.Tpo" ".deps/installer.Plo"; else rm -f ".deps/installer.Tpo"; exit 1; fi

 [ . . . ]

gcc -DHAVE_CONFIG_H -I. -I. -I. -I../util -I.. -DNONTHREADSAFE -I/usr/local/include -ggdb3 -DDBUG_ON -I/usr/include/mysql -fmessage-length=0 -D_FORTIFY_SOURCE=2 -g -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -fno-strict-aliasing -g -O2 -MT libmyodbc5_la-options.lo -MD -MP -MF .deps/libmyodbc5_la-options.Tpo -c options.c  -fPIC -DPIC -o .libs/libmyodbc5_la-options.o

options.c: In function 'MySQLSetConnectAttr':

options.c:356: warning: cast from pointer to integer of different size

if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I../util -I.. -DNONTHREADSAFE -I/usr/local/include  -ggdb3 -DDBUG_ON -I/usr/include/mysql -fmessage-length=0 -D_FORTIFY_SOURCE=2 -g -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -fno-strict-aliasing -g -O2 -MT libmyodbc5_la-prepare.lo -MD -MP -MF ".deps/libmyodbc5_la-prepare.Tpo" -c -o libmyodbc5_la-prepare.lo `test -f 'prepare.c' || echo './'`prepare.c; \

            then mv -f ".deps/libmyodbc5_la-prepare.Tpo" ".deps/libmyodbc5_la-prepare.Plo"; else rm -f ".deps/libmyodbc5_la-prepare.Tpo"; exit 1; fi

 gcc -DHAVE_CONFIG_H -I. -I. -I. -I../util -I.. -DNONTHREADSAFE -I/usr/local/include -ggdb3 -DDBUG_ON -I/usr/include/mysql -fmessage-length=0 -D_FORTIFY_SOURCE=2 -g -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -fno-strict-aliasing -g -O2 -MT libmyodbc5_la-prepare.lo -MD -MP -MF .deps/libmyodbc5_la-prepare.Tpo -c prepare.c  -fPIC -DPIC -o .libs/libmyodbc5_la-prepare.o

prepare.c: In function 'my_SQLBindParameter':

prepare.c:244: warning: cast to pointer from integer of different size

prepare.c:271: warning: cast to pointer from integer of different size

prepare.c:278: warning: cast to pointer from integer of different size

prepare.c:296: warning: cast to pointer from integer of different size

prepare.c:313: warning: cast to pointer from integer of different size

prepare.c: In function 'SQLSetScrollOptions':

prepare.c:492: warning: cast to pointer from integer of different size

if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I../util -I.. -DNONTHREADSAFE -I/usr/local/include  -ggdb3 -DDBUG_ON -I/usr/include/mysql -fmessage-length=0 -D_FORTIFY_SOURCE=2 -g -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -fno-strict-aliasing -g -O2 -MT libmyodbc5_la-results.lo -MD -MP -MF ".deps/libmyodbc5_la-results.Tpo" -c -o libmyodbc5_la-results.lo `test -f 'results.c' || echo './'`results.c; \

            then mv -f ".deps/libmyodbc5_la-results.Tpo" ".deps/libmyodbc5_la-results.Plo"; else rm -f ".deps/libmyodbc5_la-results.Tpo"; exit 1; fi

 gcc -DHAVE_CONFIG_H -I. -I. -I. -I../util -I.. -DNONTHREADSAFE -I/usr/local/include -ggdb3 -DDBUG_ON -I/usr/include/mysql -fmessage-length=0 -D_FORTIFY_SOURCE=2 -g -DPIC -fPIC -DUNDEF_HAVE_INITGROUPS -fno-strict-aliasing -g -O2 -MT libmyodbc5_la-results.lo -MD -MP -MF .deps/libmyodbc5_la-results.Tpo -c results.c  -fPIC -DPIC -o .libs/libmyodbc5_la-results.o

results.c: In function 'SQLBindCol':

results.c:846: warning: cast to pointer from integer of different size

results.c: At top level:

results.c:1390: error: conflicting types for 'SQLExtendedFetch'

/usr/local/include/sqlext.h:1862: error: previous declaration of 'SQLExtendedFetch' was here

results.c: In function 'SQLFetchScroll':

results.c:1423: warning: passing argument 4 of 'my_SQLExtendedFetch' from incompatible pointer type

results.c: In function 'SQLFetch':

results.c:1441: warning: passing argument 4 of 'my_SQLExtendedFetch' from incompatible pointer type

make[2]: *** [libmyodbc5_la-results.lo] Error 1

make[2]: Leaving directory `/usr/src/packages/SOURCES/mysql-connector-odbc-5.1.5/driver'

make[1]: *** [all] Error 2

make[1]: Leaving directory `/usr/src/packages/SOURCES/mysql-connector-odbc-5.1.5/driver'

make: *** [all-recursive] Error 1

11/25/08 14:16 done make

exit status 2

 

sqltypes.h[...]

typedef int             SQLINTEGER;

typedef unsigned int    SQLUINTEGER;

typedef long            SQLLEN;

typedef unsigned long   SQLULEN;

typedef unsigned long   SQLSETPOSIROW;

/* 

 * These are not supprted on 64bit ODBC according to MS, removed, so use at your peril 

 */

 typedef SQLULEN                     SQLTRANSID;

 typedef SQLULEN                     SQLROWCOUNT;

 typedef SQLUINTEGER             SQLROWSETSIZE;

 typedef SQLLEN                       SQLROWOFFSET;

[...]

Sqlext.h[...]

SQLRETURN SQL_API SQLExtendedFetch(

    SQLHSTMT           hstmt,

    SQLUSMALLINT       fFetchType,

    SQLLEN             irow,

    SQLULEN                    *pcrow,

    SQLUSMALLINT           *rgfRowStatus);

[...]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.