Skip Menu |

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

Report information
The Basics
Id: 91298
Status: open
Priority: 0/
Queue: DBD-Sybase

People
Owner: Nobody in particular
Requestors: samuel.ferencik [...] barclays.com
Cc:
AdminCc:

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



Subject: use -libpath: on Windows, not -L
On Windows, the link utility uses -libpath:, not -L, for specifying library paths. Please see patch below. --- c:\temp\p4v\PRGDWM355382_qaperforce_1666\depot\QA\Toolbox\_priv\DBD-Sybase\CPAN\DBD-Sybase\1.11\src\Makefile#1.PL 2013-11-14 15:37:21.000000000 +-0100 +++ c:\p4_ws\0toolbox\_priv\DBD-Sybase\CPAN\DBD-Sybase\1.11\src\Makefile.PL 2013-12-10 17:46:37.000000000 +-0100 @@ -35,16 +35,17 @@ $| = 1; configure(); configPwd(); +my $libpathOpt = $^O eq 'MSWin32' ? 'libpath:' : 'L'; my $lddlflags = $Config{lddlflags}; -$lddlflags = "-L$SYBASE/$libdir $lddlflags" unless $^O eq 'VMS'; +$lddlflags = "-$libpathOpt$SYBASE/$libdir $lddlflags" unless $^O eq 'VMS'; my $ldflags = $Config{ldflags}; -$ldflags = "-L$SYBASE/$libdir $ldflags" unless $^O eq 'VMS'; +$ldflags = "-$libpathOpt$SYBASE/$libdir $ldflags" unless $^O eq 'VMS'; WriteMakefile( 'NAME' => 'DBD::Sybase', LIBS => [$lib_string], INC => $inc_string, clean => { FILES => "Sybase.xsi $written_pwd_file" }, Without this change, link produces a warning about "unknown option /L." That raises another issue: this is only a warning but the linking still succeeds because the link command-line contains the full path to libct.lib. Maybe we needn't extend LDDLFLAGS at all on Windows? Here's a patch for that: --- c:\temp\p4v\PRGDWM355382_qaperforce_1666\depot\QA\Toolbox\main.br\CPAN\DBD-Sybase\1.15\src\Makefile#1.PL 2013-12-10 18:05:42.000000000 +-0100 +++ c:\p4_ws\0toolbox\main.br\CPAN\DBD-Sybase\1.15\src\Makefile.PL 2013-12-10 18:05:15.000000000 +-0100 @@ -36,15 +36,17 @@ configure(); configPwd(); my $lddlflags = $Config{lddlflags}; -$lddlflags = "-L$SYBASE/$libdir $lddlflags" unless $^O eq 'VMS'; +$lddlflags = "-L$SYBASE/$libdir $lddlflags" + unless $^O eq 'VMS' || $^O eq 'MSWin32'; my $ldflags = $Config{ldflags}; -$ldflags = "-L$SYBASE/$libdir $ldflags" unless $^O eq 'VMS'; +$ldflags = "-L$SYBASE/$libdir $ldflags" + unless $^O eq 'VMS' || $^O eq 'MSWin32'; WriteMakefile( 'NAME' => 'DBD::Sybase', LIBS => [$lib_string], INC => $inc_string, clean => { FILES => "Sybase.xsi $written_pwd_file" }, Sam
From: sferencik [...] gmail.com
See also #92196, which is closely releated. I think there are two options to fix these two bugs: 1) use -L only - apply the 2nd patch above - apply the patch from 92196 2) use -libpath only - apply the 1st patch above - in 92196, remove the -L option altogether