jlpears has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks!

Does anyone know how to install DBD::Sybase on a windows 2003 server without using ppm? I have freetds built on the machine, I have DBD::Sybase extracted and when I run perl Makefile.PL, I am getting:

Can't find any Sybase libraries in D:\freetds-0.82/lib or D:\freetds-0.82/lib64 at Makefile.PL line 146, <IN> line 44.

I have SYBASE pointing to D:\freetds-0.82 where I have built freetds with visual studio 2003 using the solution file: D:\freetds-0.82\win32\msvc6\FreeTDS.dsw.

After building freetds, I get these new directories under D:\freetds-0.82\win32\msvc6: tds_Debug, odbc_Debug, and db_Debug. The only library-ish files I see are tds_Debug\libTDS.lib, odbc_Debug\FreeTDS.lib, and odbc_Debug\FreeTDS.dll. The other files in these directories are mostly .obj files.

The Makefile.PL script expects a lib or lib64 directory containing a file with the string libct or libsybct in it in $SYBASE (D:\freetds-0.82), but there is not lib directory there.

What am I doing wrong here? Any help would be greatly appreciated. Thanks, Jon

Replies are listed 'Best First'.
Re: DBD::Sybase on windows server 2003
by roboticus (Chancellor) on Nov 19, 2010 at 03:46 UTC

    jlpears:

    When I last did it, I just did the standard routine. But I didn't use FreeTDS, instead I went to the Sybase site and downloaded the free client drivers and compiled and linked against those. I couldn't quickly find a package with just the drivers, but you could choose the ASE 15.5 developers edition from the download page. IIRC, when you install ASE, you can choose to just install the client software.

    Frequently, though, I'll just use ODBC drivers to access Sybase and MS SQL Server database servers. (And SQLite, Oracle, ....)

    ...roboticus

Re: DBD::Sybase on windows server 2003
by syphilis (Archbishop) on Nov 19, 2010 at 00:31 UTC
    What am I doing wrong here?

    Is that stuff (ie freetds-0.82) getting a bit old ? The webpage apparently hasn't been updated since August 2006.
    And it says on that webpage that this is a library for Unix and Linux. Maybe there's something better for Windows machines. (I know absolutely nothing about Sybase.)

    When I build that freetds-0.82 library on my Windows Vista box using the MinGW compiler (in the msys shell), the following files are built:
    bin/ bin/bsqldb.exe bin/bsqlodbc.exe bin/datacopy.exe bin/defncopy.exe bin/freebcp.exe bin/osql bin/tdspool.exe bin/tsql.exe etc/ etc/freetds.conf etc/locales.conf etc/pool.conf include/ include/bkpublic.h include/cspublic.h include/cstypes.h include/ctpublic.h include/sqldb.h include/sqlfront.h include/sybdb.h include/syberror.h include/sybfront.h include/tds_sysdep_public lib/ lib/libct.a lib/libct.la lib/libsybdb.a lib/libsybdb.la lib/libtdsodbc.a lib/libtdsodbc.la man/ man/man1/ man/man1/bsqldb.1 man/man1/bsqlodbc.1 man/man1/datacopy.1 man/man1/defncopy.1 man/man1/fisql.1 man/man1/freebcp.1 man/man1/osql.1 man/man1/tsql.1 man/man5/ man/man5/freetds.conf.5 share/ [snip - a lot of doc files]
    If I was stuck with that Visual Studio build of freetds then, assuming that the .lib files you've specified are the only ones that exist, I would firstly create a D:\freetds-0.82\lib directory and move all of the .lib files to it. Then try renaming them to libct.lib and libsybct.lib - it would be a trial and error approach (unless you want to take a look inside those libraries and see what symbols they define).

    Presumably, at some stage, the dll will need to be in a location that's in your path.

    Cheers,
    Rob