[freetds] FreeTDS 0.65/CVS & DBD::Sybase

Matt Dainty matt at bodgit-n-scarper.com
Tue Nov 20 04:45:53 EST 2007


Hi,

I'm trying to see if the 0.65/CVS FreeTDS fixes some limitations that
have been observed in 0.64 by some of the developers I'm supporting.
FreeTDS seems to build fine[1] but its primary use is to be used by the
DBD::Sybase Perl interface and the current version of that (1.08) no
longer builds against CVS.

The build dies at the following (apologies for the wrapping):

/usr/bin/perl -p -e "s/~DRIVER~/Sybase/g" /usr/lib64/perl5/vendor_perl/5.8.8/x86
_64-linux-thread-multi/auto/DBI/Driver.xst > Sybase.xsi
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.
8/ExtUtils/typemap  Sybase.xs > Sybase.xsc && mv Sybase.xsc Sybase.c
gcc -c  -I/usr/include/freetds -DSYB_LP64 -DNO_BLK=1 -I/usr/lib64/perl5/vendor_p
erl/5.8.8/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-str
ict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFI
LE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_F
ORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -m
tune=generic   -DVERSION=\"1.08\" -DXS_VERSION=\"1.08\" -fPIC "-I/usr/lib64/perl
5/5.8.8/x86_64-linux-thread-multi/CORE"   Sybase.c
In file included from Sybase.h:50,
                 from Sybase.xs:14:
dbdimp.h:32: error: expected specifier-qualifier-list before 'CS_BIGINT' <--
Sybase.c: In function 'XS_DBD__Sybase__db__isdead':
Sybase.c:103: warning: unused variable 'ix'
Sybase.c: In function 'XS_DBD__Sybase__db__date_fmt':
Sybase.c:121: warning: unused variable 'ix'
Sybase.xs: In function 'XS_DBD__Sybase__db_ping':
Sybase.xs:83: warning: implicit declaration of function 'syb_ping'
---8<--- snip more of the same warnings ---8<---

This seems to have happened because CVS FreeTDS has defined CS_UINT_TYPE
which has caused dbdimp.h to include CS_UINT, CS_BIGINT and CS_UBIGINT
types, but only CS_UINT has been added to cstypes.h. If I comment bits
of code out it will also complain about missing CS_DATE and CS_TIME
types further along in the file thanks to CS_DATE_TYPE now being defined
as well.

What is the correct fix? Is it a case of adding CS_BIGINT, CS_UBIGINT,
CS_DATE and CS_TIME types to FreeTDS or should DBD::Sybase be modified
to not use these with the use of some copious #ifdef's.

I was using the 20071119 current snapshot tarball from the FTP site.

Thanks

Matt

[1] I'm packaging FreeTDS as an RPM and I noticed that libtds.so and
libtdssrv.so are no longer built/packaged. Is that normal behaviour now?
-- 
"The theory of Space and Time is a cultural artefact made possible by
the invention of graph paper."


More information about the FreeTDS mailing list