This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Compress::Zlib Clobbers CPAN shell


Using zlib-1.1.3-4 installed on a W2K cygwin-1.1.4 system, and with
perl-5.6.0 from cygutils, I was able to install Compress:Zlib,
Archive:Tar, and CPAN without trouble. 

Just unpack, 'perl Makefile.PL', make, make test, make install. It
linked using libz.dll.a in /usr/lib, which means that the dynamically
loaded perl module "Compress/Zlib/Zlib.dll" depends on
/usr/bin/libz.dll:

cygcheck shows:
./site_perl/5.6.0/cygwin/auto/Compress/Zlib/Zlib.dll
  D:\cygwin\bin\cygwin1.dll
    D:\WINNT\System32\KERNEL32.dll
      D:\WINNT\System32\NTDLL.DLL
  D:\cygwin\bin\libz.dll
  D:\cygwin\usr\local\bin\libperl5_6_0.dll

No need to rebuild zlib yourself, or to link statically.

AFTER building and installing Compress:Zlib and Archive:Tar by hand, I
built and installed CPAN. After than, 'perl -MCPAN -e shell' worked fine
-- although, of course, it kept pestering me to install BUNDLE::libnet.

Just another data point.

I even tried the same test case that Neil Lunn used in his initial
problem report:

$ perl -MCPAN -e shell
cpan> install Business::CreditCard
.. 
various successful messages
..
one of which is:
CPAN: Compress::Zlib loaded ok
..
..

It downloaded, built, and installed the CreditCard module without
error.  Perhaps the trick is that CPAN must be built/installed *AFTER*
Compress::Zlib is built and installed. I dunno.

Another possibility: I assume that Neil built Compress::Zlib and linked
using a dll-import library (from zlib-1.1.3-1, but that's okay.
Whatever). However, at runtime, perl/Compress::Zlib/Zlib.dll tried to
load libz.dll and picked up a different version -- perhaps the one from
X11R6.

That'll cause problems every time. I don't know why, but Suhaib's
libz.dll from his X11R6 distro and the official libz.dll's (1.1.3-1,
1.1.3-4) aren't compatible. To fix, make sure that /usr/bin appears
before /usr/X11R6/bin in the path. (Or, link statically -- which is how
Neil solved his problem).

FWIW, I've got gcc-2.95.2-2 and binutils-20000722-1 installed.

--Chuck

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]