Skip Menu |

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 23064
Status: resolved
Priority: 0/
Queue: Imager

People
Owner: Nobody in particular
Requestors: corion [...] cpan.org
Cc:
AdminCc:

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



Subject: v0.54: Buglet in Win32 linker flags - -lzlib instead of -lz
Date: Sun, 12 Nov 2006 18:06:55 +0100 (MET)
To: bug-Imager [...] rt.cpan.org
From: Max Maischein <corion [...] cpan.org>
Hello Tony, thanks for writing and maintaining the Imager package! When building and automating it, I found that on Win32, it doesn't pick up the zlib libraries because it uses the hardcoded switch "-lz" while on Win32, the file name is "zlib.lib". Using "-lzlib" instead worked on Win32: --- Makefile.PL.org Tue Sep 12 06:13:07 2006 +++ Makefile.PL Sun Nov 12 18:10:24 2006 @@ -467,7 +467,7 @@ def=>'HAVE_LIBPNG', inccheck=>sub { -e catfile($_[0], 'png.h') }, libcheck=>sub { $_[0] eq "libpng$aext" or $_[0] eq "libpng.$lext" }, - libfiles=>'-lpng -lz', + libfiles=>$^O eq 'MSWin32' ? '-lpng -lzlib' : '-lpng -lz', objfiles=>'png.o', docs=>q{ I assume that the check for "MSWin32" is OK, as Cygwin likely uses "-lz" instead of "-lzlib", again. A workaround on version 0.54 is to use the IM_LFLAGS environment variable to specify both, the path to the zlib library and -lzlib. The order seems to be important: C:\.cpan\build\Imager-0.54>set IM_LFLAGS=-LC:\perl\site\5.8.5\lib\alien\zlib\lib -lzlib C:\.cpan\build\Imager-0.54>perl -w Makefile.PL Hope that helps, -max
On Sun Nov 12 12:12:42 2006, CORION wrote: Show quoted text
> Hello Tony, > > thanks for writing and maintaining the Imager package! > > When building and automating it, I found that on Win32, it doesn't pick > up the zlib libraries because it uses the hardcoded switch "-lz" while > on Win32, the file name is "zlib.lib". Using "-lzlib" instead worked on > Win32:
Sorry about the delay in getting back to you on this, but work has been keeping me busy. I'll apply this for the next release.
Hi, This problem has been fixed in Imager 0.55. Thanks for your report. Tony