Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-AuthUser: gerrit:koeln.convey.de
Date: Sun, 30 Mar 2003 21:36:33 +0200
From: "Gerrit P. Haase" <gp@familiehaase.de>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <24369713049.20030330213633@familiehaase.de>
To: "Dr . Charles Wilson" <cwilson@ece.gatech.edu>
CC: cygwin@cygwin.com
Subject: Re: gdbm, libgdbm3, libgdbm-devel 1.8.3-1
In-Reply-To: <3E8740C6.9090502@ece.gatech.edu>
References: <3E852558.70002@ece.gatech.edu>
 <39348797744.20030330154757@familiehaase.de> <3E8740C6.9090502@ece.gatech.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hallo Dr. Charles,

>>>Further, it means that any application code that USED the "dbm" or
>>>"ndbm" personalities, now needs to link with "-lgdbm_compat -lgdbm" and 
>>>not just -lgdbm.  Most programs don't use the compatibility 
>>>personalities, and can simply continue to link only against -lgdbm.

>> I linked just with libgdbm_compat for the NDBM_File and ODBM_File Perl
>> modules, works fine, all tests successful.

> Woo-hoo!  Thanks, Gerritt.

> So, you didn't need to ALSO link those against -lgdbm?  I mean, 
> cyggdbm_compat-3.dll depends on cyggdbm-3.dll according to cygcheck.  I 
> thought that meant you had to include the dependencies on the link line 
> **even** if your app doesn't directly access any of the stuff in the 
> remote dependency?

Well, I just linked against libgdbm_compat, seems to be enough.

> e.g. chuck.exe uses cyggdbm_compat-3.dll
>       cyggdbm_compat-3.dll depends on cyggdbm-3.dll
>       chuck.exe does NOT directly use anything in cyggdbm-3.dll

> But I still have to say
>       gcc -o chuck.exe ...... -lgdbm_compat -lgdbm
> right?  wrong?

IMO: wrong.
If there is just the runtime dependency as it seems to be in perl,
then there is no need to link against libgdbm.

> If I'm right, then I'm confused as to how Perl built properly -- unless 
> perl uses libtool for linking (in which case intrinsic deps are handled 
> by libtool automatically via the .la mechanism)

No libtool needed for perl.  I changed the hints/cygwin.pl entries
since the symbols needed were not available in libgdbm.dll.a:

--- perl-5.8.0/ext/NDBM_File/hints/cygwin.pl~   2003-03-30 13:47:19.000000000 +0200
+++ perl-5.8.0/ext/NDBM_File/hints/cygwin.pl    2003-03-30 13:47:19.000000000 +0200
@@ -1,2 +1,2 @@
 # uses GDBM ndbm compatibility feature
-$self->{LIBS} = ['-lgdbm'];
+$self->{LIBS} = ['-lgdbm_compat'];
--- perl-5.8.0/ext/ODBM_File/hints/cygwin.pl~   2003-03-30 13:49:11.000000000 +0200
+++ perl-5.8.0/ext/ODBM_File/hints/cygwin.pl    2003-03-30 13:49:11.000000000 +0200
@@ -1,2 +1,2 @@
 # uses GDBM dbm compatibility feature
-$self->{LIBS} = ['-lgdbm'];
+$self->{LIBS} = ['-lgdbm_compat'];


Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

