[freetds] Problem compiling DBD::SYBASE using freetds on Mac 10.5.5 (Leopard)

Barbara Einfalt beinfalt at cse.psu.edu
Mon Oct 6 20:21:21 EDT 2008


I have an Apple IMAC (running 10.5.5 - leopard) which I would like to 
use to run perl queries to an MS SQL Server Database.

I am having problems compiling the DBD::SYBASE perl module with the 
latest freetds (0.82) installed from mac ports.

The error I receive is the following:

dbdimp.c: In function 'syb_init':
dbdimp.c:777: error: 'BLK_VERSION_150' undeclared (first use in this 
function)
dbdimp.c:777: error: (Each undeclared identifier is reported only once)
dbdimp.c:777: error: for each function it appears in.)
dbdimp.c:781: error: 'BLK_VERSION_125' undeclared (first use in this 
function)
dbdimp.c:785: error: 'BLK_VERSION_120' undeclared (first use in this 
function)

I was able to install DBD::SYBASE on a Macbook.  The only difference was 
the version of freetds (The Macbook has freetds version 0.64 installed 
and the IMac has freetds version 0.94 installed).

I did notice that the freetds file for version 0.94 has these additional 
lines in the 'cspublic.h' file (located at /opt/local/include/freetds) 
which are not found in the same file (cspublic.h) in the freetds 0.64 
version):

#define CS_VERSION_120  1100
#define CS_VERSION_125  12500
#define CS_VERSION_150  15000

Both versions of freetds did have the following in the 'cspublic.h' file:

#define BLK_VERSION_100 CS_VERSION_100
#define BLK_VERSION_110 CS_VERSION_100

Here are lines (775 through 786 in the dbdimp.c file -- lines giving the 
error from the make):

#if defined(CS_VERSION_150)
     if(cs_ver == CS_VERSION_150)
         BLK_VERSION = BLK_VERSION_150;
#endif
#if defined(CS_VERSION_125)
     if(cs_ver == CS_VERSION_125)
         BLK_VERSION = BLK_VERSION_125;
#endif
#if defined(CS_VERSION_120)
     if(cs_ver == CS_VERSION_120)
         BLK_VERSION = BLK_VERSION_120;
#endif



Both freetds packages (on the macbook and on the imac) were installed 
via MacPorts.

I would prefer to use the latest freedts which is why I hesitate to 
install the older version.

Thanks in advance for any help!

Barb


More information about the FreeTDS mailing list