Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <3991D645.E01916FC@ece.gatech.edu>
Date: Wed, 09 Aug 2000 18:08:05 -0400
From: "Charles S. Wilson" <cwilson@ece.gatech.edu>
X-Mailer: Mozilla 4.7 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: corrosion@connect.to
CC: JGMBenoit@Wanadoo.fr, cygwin@sourceware.cygnus.com
Subject: Re: Compress::Zlib Clobbers CPAN shell
References: <F261vYVN5sLZHaxAi8U00002a9f@hotmail.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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

