Problems: Build MySQL ODBC Connector 5.1.5 with 64-Linux

Problems: Build MySQL ODBC Connector 5.1.5 with 64-Linux

am 25.11.2008 15:03:41 von Ida Schonfeld

------_=_NextPart_001_01C94F06.9F5F49C1
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,

=20

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=3D/usr/local/lib64 =
-with-unixODBC-includes=3D/usr/local/include -with-mysql-path=3D/usr

=20

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

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.=20

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.

=20

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-od=
bc-5.1.5-0.src.rpm =
bc-5.1.5-0.src.rpm> ) and I think this should be the newest version of =
the driver sources.

=20

Thanks for your help

Ida Schönfeld

=20

=20

make.log

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

if /bin/sh ../libtool --tag=3DCC --mode=3Dcompile gcc -DHAVE_CONFIG_H =
-I. -I. -I../driver -I.. -I/usr/local/include -ggdb3 -DDBUG_ON =
-I/usr/include/mysql -fmessage-length=3D0 -D_FORTIFY_SOURCE=3D2 -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=3D0 =
-D_FORTIFY_SOURCE=3D2 -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=3DCC --mode=3Dcompile gcc -DHAVE_CONFIG_H =
-I. -I. -I../driver -I.. -I/usr/local/include -ggdb3 -DDBUG_ON =
-I/usr/include/mysql -fmessage-length=3D0 -D_FORTIFY_SOURCE=3D2 -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=3D0 -D_FORTIFY_SOURCE=3D2 -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=3DCC --mode=3Dcompile gcc -DHAVE_CONFIG_H =
-I. -I. -I. -I../util -I.. -DNONTHREADSAFE -I/usr/local/include -ggdb3 =
-DDBUG_ON -I/usr/include/mysql -fmessage-length=3D0 =
-D_FORTIFY_SOURCE=3D2 -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=3D0 -D_FORTIFY_SOURCE=3D2 -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=3DCC --mode=3Dcompile gcc -DHAVE_CONFIG_H =
-I. -I. -I. -I../util -I.. -DNONTHREADSAFE -I/usr/local/include -ggdb3 =
-DDBUG_ON -I/usr/include/mysql -fmessage-length=3D0 =
-D_FORTIFY_SOURCE=3D2 -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=3D0 -D_FORTIFY_SOURCE=3D2 -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

=20

sqltypes.h[...]

typedef int SQLINTEGER;

typedef unsigned int SQLUINTEGER;

typedef long SQLLEN;

typedef unsigned long SQLULEN;

typedef unsigned long SQLSETPOSIROW;

/*=20

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

*/

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);

[...]


------_=_NextPart_001_01C94F06.9F5F49C1--

Re: Problems: Build MySQL ODBC Connector 5.1.5 with 64-Linux

am 08.12.2008 22:52:00 von Jess Balint

Ida -

How did you install libltdl? As far as I know, the version in /usr/lib
should be the 64-bit version and it shouldn't be difficult to get
everything to line up. If you've installed as 32-bit version in there, I
believe you'll want to move it somewhere else. Otherwise, if you know
there's a 64-bit version somewhere else on your system, you can use the
config option:

--with-ltdl-path=DIR Where libtool "libltdl" and "ltdl.h" are installed

Hope this helps,
Jess

On Mon, Dec 08, 2008 at 10:46:54AM +0100, Ida Schonfeld wrote:
> Hello Jess,
>
> Thx for the Patch :)
> I still cannot build, but the problem is another one. One Question: "Make" complains about the libltdl.so file. We can see it tries to get the 32 bit version of this. Does the ODBC Connector depend on libltdl? Can I ignore this in some way or at least set the path somehow to the 64bit libltdl.so?
>
> Thx in advance
> Ida :)
>
> -----Original Message-----
> From: Jess.Balint@Sun.COM [mailto:Jess.Balint@Sun.COM]
> Sent: Friday, December 05, 2008 8:04 PM
> To: Ida Schonfeld
> Cc: myodbc@lists.mysql.com
> Subject: Re: Problems: Build MySQL ODBC Connector 5.1.5 with 64-Linux
>
> Ida,
>
> Thanks for bringing this to our attention. I've attached a patch to get
> this to build. This patch will be included in the next release.
>
> Jess
>
> On Fri, Dec 05, 2008 at 03:25:28PM +0100, Ida Schonfeld wrote:
> > 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? Is really my only solution to correct all the function declarations and the Casting Errors manually? Is there maybe a new driver version planed for the next time?
> >
> > 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 ) 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);
> >
> > [...]
> >

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org