Skip Menu |
 

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

Report information
The Basics
Id: 27237
Status: resolved
Priority: 0/
Queue: DBD-Sybase

People
Owner: Nobody in particular
Requestors: smudd [...] binck.nl
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.08
Fixed in: (no value)



Subject: When trying to build against freetds on 64-bit RHEL4 fails to find libraries
Download (untitled) / with headers
text/plain 912b
Running on rhel4 x86_64. Have installed freetds and freetds-devel packages. Set SYBASE to /usr. The libraries are located as follows: [smudd@apdf1n DBD-Sybase-1.08]$ rpm -ql freetds-devel | grep lib /usr/lib64/libct.a /usr/lib64/libct.so /usr/lib64/libsybdb.a /usr/lib64/libsybdb.so /usr/lib64/libtds.a /usr/lib64/libtds.so /usr/lib64/libtdsodbc.a /usr/lib64/libtdsodbc.so /usr/lib64/libtdssrv.a /usr/lib64/libtdssrv.so [smudd@apdf1n DBD-Sybase-1.08]$ perl Makefile.PL Can't find any Sybase libraries in /usr/lib at Makefile.PL line 121, <IN> line 44. [smudd@apdf1n DBD-Sybase-1.08]$ The problem appears to be in this part of the Makefile.PL --- snip --- if(! -d "$SYBASE/lib") { die "Can't find the lib directory under $SYBASE!"; } --- snip --- To temporarily fix this I can change lib to lib64. However I am unsure how to dynamically determine the correct library directory dynamically.
From: smudd [...] binck.nl
Download (untitled) / with headers
text/plain 5.1k
On Tue May 22 04:22:26 2007, smudd wrote: Show quoted text
> Running on rhel4 x86_64. Have installed freetds and freetds-devel > packages. Set SYBASE to /usr. The libraries are located as follows: > > $ rpm -ql freetds-devel | grep lib > /usr/lib64/libct.a > /usr/lib64/libct.so > /usr/lib64/libsybdb.a > /usr/lib64/libsybdb.so > /usr/lib64/libtds.a > /usr/lib64/libtds.so > /usr/lib64/libtdsodbc.a > /usr/lib64/libtdsodbc.so > /usr/lib64/libtdssrv.a > /usr/lib64/libtdssrv.so > > $ perl Makefile.PL > Can't find any Sybase libraries in /usr/lib at Makefile.PL line 121, > <IN> line 44. > $ > > The problem appears to be in this part of the Makefile.PL > > --- snip --- > if(! -d "$SYBASE/lib") { > die "Can't find the lib directory under $SYBASE!"; > } > --- snip --- > > To temporarily fix this I can change lib to lib64. However I am
unsure Show quoted text
> how to dynamically determine the correct library directory
dynamically. Actually this is not sufficient. I have added a check to make Makefile.PL use "lib64" rather than the hard-coded "lib" directories. The check condition below may not be complete or the "correct" way to portably adjust the path, but I'm not a Perl guru. ===== # determine the "lib directory to use correctly" # - default -> lib # - x86_64-linux-thread-multi -> lib64 if ( $Config{archname} =~ /^x86_64-/ ) { $mylib = 'lib64'; } else { $mylib = 'lib64'; } ===== With this change the Makefile is built correctly. $ perl Makefile.PL.NEW Unknown Client Library version - assuming FreeTDS. By default DBD::Sybase 1.05 and later use the 'CHAINED' mode (where available) when 'AutoCommit' is turned off. Versions 1.04 and older instead managed the transactions explicitly with a 'BEGIN TRAN' before the first DML statement. Using the 'CHAINED' mode is preferable as it is the way that Sybase implements AutoCommit handling for both its ODBC and JDBC drivers. Use 'CHAINED' mode by default (Y/N) [Y]: Running in threaded mode - looking for _r libraries... ***NOTE*** There is an incompatibility between perl (5.8.x) built in threaded mode and Sybase's threaded libraries, which means that signals delivered to the perl process result in a segment violation. I suggest building DBD::Sybase with the normal libraries in this case to get reasonable behavior for signal handling. Use the threaded (lib..._r) libraries [N]: OK - I'll use the normal libs Running in 64bit mode - looking for '64' libraries... Found -lct64 for -lct Found -lcs64 for -lcs Found -lsybtcl64 for -lsybtcl Found -lcomn64 for -lcomn Found -lintl64 for -lintl BLK api NOT available. The DBD::Sybase module need access to a Sybase server to run the tests. To clear an entry please enter 'undef' Sybase server to use (default: SYBASE): XXXXX User ID to log in to Sybase (default: sa): XXXXX Password (default: undef): XXXXX Sybase database to use on XXXXX (default: undef): XXXXX * Writing login information, including password, to file PWD. Checking if your kit is complete... Looks good Note (probably harmless): No library found for -lblk Using DBI 1.40 (for perl 5.008005 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- multi/auto/DBI Writing Makefile for DBD::Sybase $ make cp dbd-sybase.pod blib/lib/DBD/dbd-sybase.pod cp Sybase.pm blib/lib/DBD/Sybase.pm /usr/bin/perl -p - e "s/~DRIVER~/Sybase/g" /usr/lib64/perl5/vendor_perl/5.8.5/x86_64- linux-thread-multi/auto/DBI/Driver.xst > Sybase.xsi /usr/bin/perl /usr/lib/perl5/5.8.5/ExtUtils/xsubpp - typemap /usr/lib/perl5/5.8.5/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_perl/5.8.5/x86_64-linux-thread- multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe - I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 - I/usr/include/gdbm -O2 -g -pipe -m64 -DVERSION=\"1.08\" - DXS_VERSION=\"1.08\" -fPIC "-I/usr/lib64/perl5/5.8.5/x86_64-linux- thread-multi/CORE" Sybase.c In file included from Sybase.c:352: /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- multi/auto/DBI/Driver_xst.h: In function `dbixst_bounce_method': /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- multi/auto/DBI/Driver_xst.h:14: error: `my_perl' undeclared (first use in this function) /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- multi/auto/DBI/Driver_xst.h:14: error: (Each undeclared identifier is reported only once /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- multi/auto/DBI/Driver_xst.h:14: error: for each function it appears in.) /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- multi/auto/DBI/Driver_xst.h: In function `dbdxst_bind_params': /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- multi/auto/DBI/Driver_xst.h:54: error: `my_perl' undeclared (first use in this function) /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- multi/auto/DBI/Driver_xst.h: In function `dbdxst_fetchall_arrayref': /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- multi/auto/DBI/Driver_xst.h:75: error: `my_perl' undeclared (first use in this function) make: *** [Sybase.o] Error 1 I'm now trying to see why the build fails.
Download Makefile.PL.diff
text/x-diff 4.4k
--- Makefile.PL 2007-04-10 17:42:21.000000000 +0200 +++ Makefile.PL.NEW 2007-05-22 10:56:10.000000000 +0200 @@ -23,6 +23,7 @@ my $chained; my $threaded_libs; my $accept_test_defaults; +my $mylib; GetOptions('--file' => \$file, '--chained:s' => \$chained, '--threaded_libs:s' => \$threaded_libs, '--accept_test_defaults' => \$accept_test_defaults); @@ -34,9 +35,9 @@ configPwd(); my $lddlflags = $Config{lddlflags}; -$lddlflags = "-L$SYBASE/lib $lddlflags" unless $^O eq 'VMS'; +$lddlflags = "-L$SYBASE/$mylib $lddlflags" unless $^O eq 'VMS'; my $ldflags = $Config{ldflags}; -$ldflags = "-L$SYBASE/lib $ldflags" unless $^O eq 'VMS'; +$ldflags = "-L$SYBASE/$mylib $ldflags" unless $^O eq 'VMS'; WriteMakefile('NAME' => 'DBD::Sybase', @@ -78,6 +79,15 @@ }; } + # determine the "lib directory to use correctly" + # - default -> lib + # - x86_64-linux-thread-multi -> lib64 + if ( $Config{archname} =~ /^x86_64-/ ) { + $mylib = 'lib64'; + } else { + $mylib = 'lib64'; + } + open(IN, "CONFIG") || die "Can't open CONFIG: $!"; while(<IN>) { chomp; @@ -114,11 +124,11 @@ $SYBASE .= "/$ENV{SYBASE_OCS}"; } - if(! -d "$SYBASE/lib") { + if(! -d "$SYBASE/$mylib") { die "Can't find the lib directory under $SYBASE!"; } - die "Can't find any Sybase libraries in $SYBASE/lib" unless checkLib($SYBASE); + die "Can't find any Sybase libraries in $SYBASE/$mylib" unless checkLib($SYBASE); my $inc_found = 0; if(-d "$SYBASE/include" && -f "$SYBASE/include/cspublic.h") { @@ -144,11 +154,11 @@ # print "OS = $^O\n"; 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"; + $lib_string = "-L$SYBASE/$mylib -llibct.lib -llibcs.lib -llibtcl.lib -llibcomn.lib -llibintl.lib -llibblk.lib $attr{EXTRA_LIBS} -lm"; } elsif($^O eq 'VMS') { - $lib_string = "-L$SYBASE/lib -llibct.olb -llibcs.olb -llibtcl.olb -llibcomn.olb -llibintl.olb -llibblk.olb $attr{EXTRA_LIBS}"; + $lib_string = "-L$SYBASE/$mylib -llibct.olb -llibcs.olb -llibtcl.olb -llibcomn.olb -llibintl.olb -llibblk.olb $attr{EXTRA_LIBS}"; } elsif($^O =~ /cygwin/) { - $lib_string = "-L$SYBASE/lib -lct -lcs -lblk"; + $lib_string = "-L$SYBASE/$mylib -lct -lcs -lblk"; $inc_string .= " -D_MSC_VER=800"; } else { # Supplied by Erick Calder. I'm not sure why libsybsrv is needed... @@ -156,9 +166,9 @@ my $extra = getExtraLibs($SYBASE, $attr{EXTRA_LIBS}, $version); if($file) { - $lib_string = "-L$SYBASE/lib -lct -lcs -ltcl -lcomn -lintl -lblk $attr{EXTRA_LIBS} -ldl -lm"; + $lib_string = "-L$SYBASE/$mylib -lct -lcs -ltcl -lcomn -lintl -lblk $attr{EXTRA_LIBS} -ldl -lm"; } else { - $lib_string = "-L$SYBASE/lib -lct -lcs -ltcl -lcomn -lintl -lblk $extra -ldl -lm"; + $lib_string = "-L$SYBASE/$mylib -lct -lcs -ltcl -lcomn -lintl -lblk $extra -ldl -lm"; } if($newlibnames) { foreach (qw(ct cs tcl comn intl blk)) { @@ -170,7 +180,7 @@ my %libname; - %libname = loadSybLibs("$SYBASE/lib"); + %libname = loadSybLibs("$SYBASE/$mylib"); my $libtype = ''; @@ -282,7 +292,7 @@ sub getLibVersion { my $dir = shift; - my $lib = "$dir/lib"; + my $lib = "$dir/$mylib"; opendir(DIR, $lib); # reverse to pick up libsybct before libct... my @files = reverse(grep(/lib(syb)?ct(64)?\./, readdir(DIR))); @@ -317,8 +327,8 @@ my $cfg = shift; my $version = shift; - opendir(DIR, "$dir/lib") || die "Can't access $dir/lib: $!"; - my %files = map { $_ =~ s/lib([^\.]+)\..*/$1/; $_ => 1 } grep(/lib/ && -f "$dir/lib/$_", readdir(DIR)); + opendir(DIR, "$dir/$mylib") || die "Can't access $dir/$mylib: $!"; + my %files = map { $_ =~ s/lib([^\.]+)\..*/$1/; $_ => 1 } grep(/$mylib/ && -f "$dir/$mylib/$_", readdir(DIR)); closedir(DIR); my %x = map {$_ => 1} split(' ', $cfg); @@ -331,7 +341,7 @@ } foreach my $f (qw(insck tli sdna dnet_stub tds skrb gss)) { - $x{"-l$f"} = 1 if exists $files{$f} && -f "$dir/lib/lib$f.$dlext"; + $x{"-l$f"} = 1 if exists $files{$f} && -f "$dir/$mylib/lib$f.$dlext"; } if($version gt '11') { delete($x{-linsck}); @@ -348,7 +358,7 @@ sub checkLib { my $dir = shift; - opendir(DIR, "$dir/lib") || die "Can't access $dir/lib: $!"; + opendir(DIR, "$dir/$mylib") || die "Can't access $dir/$mylib: $!"; my @files = grep(/libct|libsybct/i, readdir(DIR)); closedir(DIR); if(grep(/libsybct/, @files)) {
From: smudd [...] binck.nl
On Tue May 22 05:16:08 2007, smudd wrote: Show quoted text
> $ make > cp dbd-sybase.pod blib/lib/DBD/dbd-sybase.pod > cp Sybase.pm blib/lib/DBD/Sybase.pm > /usr/bin/perl -p - > e "s/~DRIVER~/Sybase/g" /usr/lib64/perl5/vendor_perl/5.8.5/x86_64- > linux-thread-multi/auto/DBI/Driver.xst > Sybase.xsi > /usr/bin/perl /usr/lib/perl5/5.8.5/ExtUtils/xsubpp - > typemap /usr/lib/perl5/5.8.5/ExtUtils/typemap Sybase.xs >
Sybase.xsc Show quoted text
> && mv Sybase.xsc Sybase.c > gcc -c -I/usr/include/freetds -DSYB_LP64 -DNO_BLK=1 - > I/usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- > multi/auto/DBI -D_REENTRANT > -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe - > I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 - > I/usr/include/gdbm -O2 -g -pipe -m64 -DVERSION=\"1.08\" - > DXS_VERSION=\"1.08\" -fPIC "-I/usr/lib64/perl5/5.8.5/x86_64-linux- > thread-multi/CORE" Sybase.c > In file included from Sybase.c:352: > /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- > multi/auto/DBI/Driver_xst.h: In function `dbixst_bounce_method': > /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- > multi/auto/DBI/Driver_xst.h:14: error: `my_perl' undeclared (first
use Show quoted text
> in this function) > /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- > multi/auto/DBI/Driver_xst.h:14: error: (Each undeclared identifier
is Show quoted text
> reported only once > /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- > multi/auto/DBI/Driver_xst.h:14: error: for each function it appears > in.) > /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- > multi/auto/DBI/Driver_xst.h: In function `dbdxst_bind_params': > /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- > multi/auto/DBI/Driver_xst.h:54: error: `my_perl' undeclared (first
use Show quoted text
> in this function) > /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- > multi/auto/DBI/Driver_xst.h: In function `dbdxst_fetchall_arrayref': > /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread- > multi/auto/DBI/Driver_xst.h:75: error: `my_perl' undeclared (first
use Show quoted text
> in this function) > make: *** [Sybase.o] Error 1 > > I'm now trying to see why the build fails.
RHEL4 comes with DBI-1.40. I downloaded the src.rpm and adjusted it to work with DBI-1.56, then rebuild the perl-DBI-1.56-1 rpm. $ diff -u perl-DBI.spec.orig perl-DBI.spec --- perl-DBI.spec.orig 2007-05-22 13:03:40.000000000 +0200 +++ perl-DBI.spec 2007-05-22 13:04:14.000000000 +0200 @@ -2,8 +2,8 @@ Summary: A database access API for perl Name: perl-DBI -Version: 1.40 -Release: 5 +Version: 1.56 +Release: 1.binck URL: http://dbi.perl.org/ License: Artistic Group: Applications/Databases @@ -59,6 +59,9 @@ %changelog +* Tue May 22 2007 Simon J Mudd <smudd@binck.nl> +- rebuilt against DBI-1.56 + * Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com> - rebuilt Now DBD::Sybase builds without errors. make test gives several errors but installing the DBD::Sybase and doing a couple of simple tests seem to show that it is working. Therefore the remaining question is how to adjust Makefile.PL "correctly" to recognise the fact that the freetds libraries are located in /usr/lib64 rather than /usr/lib.
From: smudd [...] binck.nl
Download (untitled) / with headers
text/plain 357b
The following patch against DBD::Sybase-1.08 fixes for me the problem. I have slightly changed the check for 64-bit libraries by checking use64bitall and then checking if a /lib64 directory exists. Hopefully this is more generic (and correct) then the original RHEL x86_64 check. Please consider this change for inclusion in a later version of DBD::Sybase.
diff -uNr DBD-Sybase-1.08/CHANGES DBD-Sybase-1.08.1.binck/CHANGES --- DBD-Sybase-1.08/CHANGES 2007-04-19 20:31:18.000000000 +0200 +++ DBD-Sybase-1.08.1.binck/CHANGES 2007-05-23 08:19:29.000000000 +0200 @@ -1,5 +1,10 @@ $Id: CHANGES,v 1.80 2007/04/19 18:31:18 mpeppler Exp $ +Release 1.08.1.binck + + 23/05/2007 Simon J Mudd <smudd@binck.nl> + Changes to make this work on RHEL4 x86_64 with freetds. + Release 1.08 Detect missing libblk.a library, and disable the BLK api calls diff -uNr DBD-Sybase-1.08/MANIFEST DBD-Sybase-1.08.1.binck/MANIFEST --- DBD-Sybase-1.08/MANIFEST 2004-11-26 10:45:53.000000000 +0100 +++ DBD-Sybase-1.08.1.binck/MANIFEST 2007-05-23 08:18:25.000000000 +0200 @@ -10,6 +10,7 @@ Sybase.pm Sybase.xs Makefile.PL +Makefile.PL.orig dbdimp.c dbdimp.h dbd-sybase.pod diff -uNr DBD-Sybase-1.08/META.yml DBD-Sybase-1.08.1.binck/META.yml --- DBD-Sybase-1.08/META.yml 2007-04-21 17:44:26.000000000 +0200 +++ DBD-Sybase-1.08.1.binck/META.yml 2007-05-23 08:19:46.000000000 +0200 @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: DBD-Sybase -version: 1.08 +version: 1.08.1.binck version_from: Sybase.pm installdirs: site requires: diff -uNr DBD-Sybase-1.08/Makefile.PL DBD-Sybase-1.08.1.binck/Makefile.PL --- DBD-Sybase-1.08/Makefile.PL 2007-04-10 17:42:21.000000000 +0200 +++ DBD-Sybase-1.08.1.binck/Makefile.PL 2007-05-23 08:16:49.000000000 +0200 @@ -23,6 +23,7 @@ my $chained; my $threaded_libs; my $accept_test_defaults; +my $libdir; GetOptions('--file' => \$file, '--chained:s' => \$chained, '--threaded_libs:s' => \$threaded_libs, '--accept_test_defaults' => \$accept_test_defaults); @@ -34,9 +35,9 @@ configPwd(); my $lddlflags = $Config{lddlflags}; -$lddlflags = "-L$SYBASE/lib $lddlflags" unless $^O eq 'VMS'; +$lddlflags = "-L$SYBASE/$libdir $lddlflags" unless $^O eq 'VMS'; my $ldflags = $Config{ldflags}; -$ldflags = "-L$SYBASE/lib $ldflags" unless $^O eq 'VMS'; +$ldflags = "-L$SYBASE/$libdir $ldflags" unless $^O eq 'VMS'; WriteMakefile('NAME' => 'DBD::Sybase', @@ -78,6 +79,18 @@ }; } + # Determine the correct lib directory to use. + # On Linux x86_64 (RHEL at least) we must use the 64-bit libraries. + # - these are located in /usr/lib64, /lib64... + # if ( $Config{archname} =~ /^x86_64-/ ) { OLD CHECK - LESS GENERIC + if ( $Config{use64bitall} and -d '/lib64' ) { + print "Setting libdir to lib64 [for 64-bit libraries]\n"; + $libdir = 'lib64'; + } else { + print "Setting libdir to lib\n"; + $libdir = 'lib'; + } + open(IN, "CONFIG") || die "Can't open CONFIG: $!"; while(<IN>) { chomp; @@ -114,11 +127,11 @@ $SYBASE .= "/$ENV{SYBASE_OCS}"; } - if(! -d "$SYBASE/lib") { + if(! -d "$SYBASE/$libdir") { die "Can't find the lib directory under $SYBASE!"; } - die "Can't find any Sybase libraries in $SYBASE/lib" unless checkLib($SYBASE); + die "Can't find any Sybase libraries in $SYBASE/$libdir" unless checkLib($SYBASE); my $inc_found = 0; if(-d "$SYBASE/include" && -f "$SYBASE/include/cspublic.h") { @@ -144,11 +157,11 @@ # print "OS = $^O\n"; 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"; + $lib_string = "-L$SYBASE/$libdir -llibct.lib -llibcs.lib -llibtcl.lib -llibcomn.lib -llibintl.lib -llibblk.lib $attr{EXTRA_LIBS} -lm"; } elsif($^O eq 'VMS') { - $lib_string = "-L$SYBASE/lib -llibct.olb -llibcs.olb -llibtcl.olb -llibcomn.olb -llibintl.olb -llibblk.olb $attr{EXTRA_LIBS}"; + $lib_string = "-L$SYBASE/$libdir -llibct.olb -llibcs.olb -llibtcl.olb -llibcomn.olb -llibintl.olb -llibblk.olb $attr{EXTRA_LIBS}"; } elsif($^O =~ /cygwin/) { - $lib_string = "-L$SYBASE/lib -lct -lcs -lblk"; + $lib_string = "-L$SYBASE/$libdir -lct -lcs -lblk"; $inc_string .= " -D_MSC_VER=800"; } else { # Supplied by Erick Calder. I'm not sure why libsybsrv is needed... @@ -156,9 +169,9 @@ my $extra = getExtraLibs($SYBASE, $attr{EXTRA_LIBS}, $version); if($file) { - $lib_string = "-L$SYBASE/lib -lct -lcs -ltcl -lcomn -lintl -lblk $attr{EXTRA_LIBS} -ldl -lm"; + $lib_string = "-L$SYBASE/$libdir -lct -lcs -ltcl -lcomn -lintl -lblk $attr{EXTRA_LIBS} -ldl -lm"; } else { - $lib_string = "-L$SYBASE/lib -lct -lcs -ltcl -lcomn -lintl -lblk $extra -ldl -lm"; + $lib_string = "-L$SYBASE/$libdir -lct -lcs -ltcl -lcomn -lintl -lblk $extra -ldl -lm"; } if($newlibnames) { foreach (qw(ct cs tcl comn intl blk)) { @@ -170,7 +183,7 @@ my %libname; - %libname = loadSybLibs("$SYBASE/lib"); + %libname = loadSybLibs("$SYBASE/$libdir"); my $libtype = ''; @@ -193,7 +206,7 @@ } if(!$found) { print "No thread-safe Sybase libraries found\n"; - $inc_string .= ' -DNO_THREADS '; + $inc_string .= ' -DNO_THREADS'; } else { $libtype .= '_r'; } @@ -282,7 +295,7 @@ sub getLibVersion { my $dir = shift; - my $lib = "$dir/lib"; + my $lib = "$dir/$libdir"; opendir(DIR, $lib); # reverse to pick up libsybct before libct... my @files = reverse(grep(/lib(syb)?ct(64)?\./, readdir(DIR))); @@ -317,8 +330,8 @@ my $cfg = shift; my $version = shift; - opendir(DIR, "$dir/lib") || die "Can't access $dir/lib: $!"; - my %files = map { $_ =~ s/lib([^\.]+)\..*/$1/; $_ => 1 } grep(/lib/ && -f "$dir/lib/$_", readdir(DIR)); + opendir(DIR, "$dir/$libdir") || die "Can't access $dir/$libdir: $!"; + my %files = map { $_ =~ s/lib([^\.]+)\..*/$1/; $_ => 1 } grep(/$libdir/ && -f "$dir/$libdir/$_", readdir(DIR)); closedir(DIR); my %x = map {$_ => 1} split(' ', $cfg); @@ -331,7 +344,7 @@ } foreach my $f (qw(insck tli sdna dnet_stub tds skrb gss)) { - $x{"-l$f"} = 1 if exists $files{$f} && -f "$dir/lib/lib$f.$dlext"; + $x{"-l$f"} = 1 if exists $files{$f} && -f "$dir/$libdir/lib$f.$dlext"; } if($version gt '11') { delete($x{-linsck}); @@ -348,7 +361,7 @@ sub checkLib { my $dir = shift; - opendir(DIR, "$dir/lib") || die "Can't access $dir/lib: $!"; + opendir(DIR, "$dir/$libdir") || die "Can't access $dir/$libdir: $!"; my @files = grep(/libct|libsybct/i, readdir(DIR)); closedir(DIR); if(grep(/libsybct/, @files)) { diff -uNr DBD-Sybase-1.08/Sybase.pm DBD-Sybase-1.08.1.binck/Sybase.pm --- DBD-Sybase-1.08/Sybase.pm 2007-04-21 17:43:55.000000000 +0200 +++ DBD-Sybase-1.08.1.binck/Sybase.pm 2007-05-23 08:23:05.000000000 +0200 @@ -25,7 +25,7 @@ $hostname = Sys::Hostname::hostname(); $init_done = 0; - $VERSION = '1.08'; + $VERSION = '1.08.1.binck'; my $Revision = substr(q$Revision: 1.105 $, 10); require_version DBI 1.30;
Download (untitled) / with headers
text/plain 191b
Anything new with this report? As of 2009-10-02, the latest-greatest DBD-Sybase-1.09 from CPAN still failst to compile on 64-bit multilib systems, which have their libraries under /.../lib64.
Download (untitled) / with headers
text/plain 239b
According to the CHANGES file this was fixed in version 1.10: Handle 64bit builds with FreeTDS (Ian Grant/Hans Kristian Rosbach) I have successfully built the current release, 1.11, on a Linux/x86_64 system. So I'm closing this bug.
Fixed in 1.11.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.