Skip Menu |

This queue is for tickets about the DBD-Sybase CPAN distribution.

Report information
The Basics
Id: 49851
Status: new
Priority: 0/
Queue: DBD-Sybase

People
Owner: mpeppler [...] peppler.org
Requestors: JENDA [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.09
Fixed in: (no value)



Subject: patch to allow compilation under Windows with Sybase ASE 15
The Makefile.PL checks whether the libraries are named "libct" or "libsybct", but then ignores that information for Windows, VMS and cygwin. Also it seems it attempts to change -lct.lib to -lsybct.lib, while it should be changing -llibct.lib to -llibsybct.lib. I believe. Next problem is that the .lib files do not seem to contain the "Sybase Client-Library/xx" string so you can't get the version from there. If I understand things right, the version is included in the name of the directory (at least it seems to be in my recent Sybase instalation: "D:\sybase\OCS-15_0") so I suggest to try to find it there if it can't be found in the file. Please find the attached patch. Jenda P.S.: For reference only: the 1.09 version of DBD::Sybase may be installed to ActivePerl 5.8 under MS Windows by ppm install http://jenda.krynicky.cz/perl/DBD-Sybase.ppd
Subject: diff.Makefile.PL
--- original.Makefile.PL Sun Sep 20 13:20:44 2009 +++ new.Makefile.PL Sun Sep 20 13:28:27 2009 @@ -145,8 +145,20 @@ if($^O eq 'MSWin32') { $lib_string = "-L$SYBASE/lib -llibct.lib -llibcs.lib -llibtcl.lib -llibcomn.lib -llibintl.lib -llibblk.lib $attr{EXTRA_LIBS} -lm"; + if($newlibnames) { + foreach (qw(ct cs tcl comn intl blk)) { + $lib_string =~ s/-llib$_/-llibsyb$_/; + $lib_string =~ s/-l$_/-lsyb$_/; + } + } } elsif($^O eq 'VMS') { $lib_string = "-L$SYBASE/lib -llibct.olb -llibcs.olb -llibtcl.olb -llibcomn.olb -llibintl.olb -llibblk.olb $attr{EXTRA_LIBS}"; + if($newlibnames) { + foreach (qw(ct cs tcl comn intl blk)) { + $lib_string =~ s/-llib$_/-llibsyb$_/; + $lib_string =~ s/-l$_/-lsyb$_/; + } + } } elsif($^O =~ /cygwin/) { $lib_string = "-L$SYBASE/lib -lct -lcs -lblk"; $inc_string .= " -D_MSC_VER=800"; @@ -163,6 +175,7 @@ if($newlibnames) { foreach (qw(ct cs tcl comn intl blk)) { $lib_string =~ s/-l$_/-lsyb$_/; + $lib_string =~ s/-llib$_/-llibsyb$_/; } } elsif($^O =~ /linux|freebsd/i) { $lib_string =~ s/-ltcl/-lsybtcl/; @@ -304,7 +317,12 @@ } close(IN); if(!$version) { + if ($lib =~ m{/OCS-(\d+)_\d+/}) { + $version = $1; + print "OCS directory suggests you have Sybase OpenClient $version.\n" + } else { print "Unknown Client Library version - assuming FreeTDS.\n"; + } } else { print "Sybase OpenClient $version found.\n"; }