Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <425DF8C5.4B0179C8@dessent.net>
Date: Wed, 13 Apr 2005 21:59:49 -0700
From: Brian Dessent <brian@dessent.net>
Organization: My own little world...
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Installing Courier-Imap
References: <425CABBC.1040504@yahoo.co.uk> <425CB466.26E80E7F@dessent.net> <425DF35D.5040800@yahoo.co.uk>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com

Kees Vonk wrote:

> >>/home/Kees/courier-imap-3.0.8/makedat/makedatprog.c:33: undefined
> >>reference to `_gdbmobj_store'
> >
> >
> > Try adding --with-db=gdbm to your configure line.
> >
> 
> Ok I tried this, but as I suspected no luck.
> 
> However what I did notice is that makedatprog.c includes ../dbobj.h,
> this file defines (for example) dbobj_init as gdbmobj_init (which exists
> in ../gdbmobj/gdbmobj.h), however the error above complains about not
> finding _gdbmobj_init, which does not exist anywhere. Can anyone explain
> to me where the initial '_' comes from, and if that is the problem. I
> realise I am probably showing my ignorance of C programming here, but
> any kind of help would be greatly appreceated.

All of those gdbm_* functions are implemented in the files under
gdbmobj, which should produce libgdbmobj.a.  If you look at the
configure.in for makedat, you see:

case "$db" in
gdbm)
        USE_GDBM=1
        USE_DB=0
        LIBDB=""
        dblibrary=../gdbmobj/libgdbmobj.a
        ;;
db)
        USE_DB=1
        USE_GDBM=0
        LIBGDBM=""
        dblibrary=../bdbobj/libbdbobj.a
        ;;
*)
        makedatprog_target=""
esac

...then in Makefile.ac you have:

makedatprog_LDADD=@dblibrary@ @LIBGDBM@ @LIBDB@

...all of which means that:

1. the make should build the stuff in gdbmobj dir (resulting in
libgdbmobj.a) before entering makedat;
2. the link command for makedat should have libgdbmobj.a on its command
line so that it can find the functions that are showing up as missing.

The initial _ is nothing to worry about, that happens to all C
functions.

If you are going to figure this out you have to make sure that both 1
and 2 are happening.

You DO have the 'libgdbm-devel' package installed, right?

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

