Re: Installing Courier-Imap

2005-04-14 Thread Brian Dessent
Kees Vonk wrote:

Okay, the .la is just the libtool version of an .a file.  That's all
fine and good.

 gcc -I./.. -I.. -Wall -g -O2makedatprog.c   -o makedatprog

This is your problem.  make is invoking an implicit rule for
makedatprog, rather than the one specified by the Makefile which
contains all the required libs.  This happens when the Makefile doesn't
use $(EXEEXT) for names of executables.  It doesn't matter under linux
because binares have no extensions but it's required for Cygwin.  You
probably need to change Makefile.am to

EXTRA_PROGRAMS=makedatprog$(EXEEXT)

...and then autoreconf to regenerate all the files.  There may be other
cases where a binary name is referenced without $(EXEEXT) that you will
have to correct.  You should take this up on the courier list though.

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/



Re: Installing Courier-Imap

2005-04-14 Thread Kees Vonk
Brian Dessent wrote:
Kees Vonk wrote:
Okay, the .la is just the libtool version of an .a file.  That's all
fine and good.

gcc -I./.. -I.. -Wall -g -O2makedatprog.c   -o makedatprog

This is your problem.  make is invoking an implicit rule for
makedatprog, rather than the one specified by the Makefile which
contains all the required libs.  This happens when the Makefile doesn't
use $(EXEEXT) for names of executables.  It doesn't matter under linux
because binares have no extensions but it's required for Cygwin.  You
probably need to change Makefile.am to
EXTRA_PROGRAMS=makedatprog$(EXEEXT)
...and then autoreconf to regenerate all the files.  There may be other
cases where a binary name is referenced without $(EXEEXT) that you will
have to correct.  You should take this up on the courier list though.
I started with a new source tree, removed AC_PROG_SYSCONFTOOL from 
configure.in (otherwise autoreconf fails as it is not defined anywhere, 
maybe I shouldn't do this, but if I don't remove it is just throws up a 
warning when running configure).

Fixed makedat/Makefile.am to look like:
-
# $Id: Makefile.am,v 1.5 2004/09/08 01:27:34 mrsam Exp $
#
# Copyright 1998 - 2004 Double Precision, Inc.  See COPYING for
# distribution information.
AUTOMAKE = srcdir=${srcdir} @SHELL@ ${srcdir}/../automake.fix @AUTOMAKE@
[EMAIL PROTECTED]@
EXTRA_PROGRAMS=makedatprog$(EXEEXT)
makedatprog_SOURCES=makedatprog.c
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@ @LIBGDBM@ @LIBDB@
-
Then I ran the following commands:
-
for file in $(ls -l | grep ^d | cut -c45- | grep -v cache)
do
   cd $file
   touch AUTHORS
   touch ChangeLog
   touch NEWS
   touch README
   aclocal
   cd ..
done; autoreconf --install --force --verbose
./configure --without-authldap
make
-
But the result is still the same makedat fails exactly the same, what am 
I doing wrong.

Sorry for this long drawn out problem.
Kees
--
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/


Re: Installing Courier-Imap

2005-04-14 Thread Brian Dessent
Kees Vonk wrote:

 [EMAIL PROTECTED]@
 
 EXTRA_PROGRAMS=makedatprog$(EXEEXT)

Try this instead:

[EMAIL PROTECTED]@$(EXEEXT)

EXTRA_PROGRAMS=makedatprog

The way to debug this is to look at the generated Makefile and find
places where a *_programs refers to something without .exe on the end.

 for file in $(ls -l | grep ^d | cut -c45- | grep -v cache)

Oh man, that's hideous.  You should never assume that the output of ls
has any particular columns.  Much better would be find . -mindepth 1
-maxdepth 1 -type d or even something like for F in *; do if [ -d $F
]; then cd $F; ... cd ..; fi; done.

 cd $file
 touch AUTHORS
 touch ChangeLog
 touch NEWS
 touch README
 aclocal
 cd ..
 done; autoreconf --install --force --verbose

Alternatively you can just do that for the makedat subdir, as there's no
reason to regenerate things in other subdirs if you didn't touch any .in
or .am files.

You really need to take this up on the courier list.  There are probably
other things that will come up in the build, as this is a large piece of
software.  I do not have time to figure out every problem for you, and
the people on the courier list know their own software a lot better than
I do (having never looked at it before.)  It's rare that a large program
can be ported to Cygwin without some changes.  Usually they're a lot of
small and minor things but you never know, and I'm afraid it's not the
kind of thing that you can expect someone to walk you through step by
step on a mailing list.

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/



Re: Installing Courier-Imap

2005-04-13 Thread Kees Vonk
Brian Dessent wrote:
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.
When configure goes into the makedat directory it runs configure with a 
whole lot of options including --with-db=gdbm. Would explicitly 
specifying this on the command-line make a difference?

Kees

--
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/


Re: Installing Courier-Imap

2005-04-13 Thread Kees Vonk
Brian Dessent wrote:
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.

Kees
--
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/


Re: Installing Courier-Imap

2005-04-13 Thread Brian Dessent
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:

[EMAIL PROTECTED]@ @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/



Re: Installing Courier-Imap

2005-04-13 Thread Kees Vonk
Brian Dessent wrote:
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.
1. the make should build the stuff in gdbmobj dir (resulting in
libgdbmobj.a) before entering makedat;
No libgdbmobj.a in the gdbmobjdir, just libgdbmobj.la, libgdbmobjs.la
and libshgdbmobj.a
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.
I am not sure it does this, here is the gdbmobj and makedat parts of the
make output (I am sorry about the length of it and hope it is helpful):
... [ skip lot of stuff ] ...
Making all in gdbmobj
make[2]: Entering directory `/home/Kees/courier-authlib-0.55/gdbmobj'
make  all-am
make[3]: Entering directory `/home/Kees/courier-authlib-0.55/gdbmobj'
if /bin/bash ./libtool --mode=compile --tag=CC gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 
-MT gdbmobj.lo -MD -MP -MF .deps/gdbmobj.Tpo -c -o gdbmobj.lo gdbmobj.c; \
then mv -f .deps/gdbmobj.Tpo .deps/gdbmobj.Plo; else rm -f 
.deps/gdbmobj.Tpo; exit 1; fi
mkdir .libs
 gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT gdbmobj.lo -MD -MP -MF 
.deps/gdbmobj.Tpo -c gdbmobj.c  -DPIC -o .libs/gdbmobj.o
 gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT gdbmobj.lo -MD -MP -MF .deps/gdbmobj.Tpo -c 
gdbmobj.c -o gdbmobj.o /dev/null 21
if /bin/bash ./libtool --mode=compile --tag=CC gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 
-MT gdbmobj2.lo -MD -MP -MF .deps/gdbmobj2.Tpo -c -o gdbmobj2.lo gdbmobj2.c; \
then mv -f .deps/gdbmobj2.Tpo .deps/gdbmobj2.Plo; else rm -f 
.deps/gdbmobj2.Tpo; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT gdbmobj2.lo -MD -MP -MF 
.deps/gdbmobj2.Tpo -c gdbmobj2.c  -DPIC -o .libs/gdbmobj2.o
 gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT gdbmobj2.lo -MD -MP -MF .deps/gdbmobj2.Tpo -c 
gdbmobj2.c -o gdbmobj2.o /dev/null 21
if /bin/bash ./libtool --mode=compile --tag=CC gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 
-MT gdbmobj3.lo -MD -MP -MF .deps/gdbmobj3.Tpo -c -o gdbmobj3.lo gdbmobj3.c; \
then mv -f .deps/gdbmobj3.Tpo .deps/gdbmobj3.Plo; else rm -f 
.deps/gdbmobj3.Tpo; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT gdbmobj3.lo -MD -MP -MF 
.deps/gdbmobj3.Tpo -c gdbmobj3.c  -DPIC -o .libs/gdbmobj3.o
 gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT gdbmobj3.lo -MD -MP -MF .deps/gdbmobj3.Tpo -c 
gdbmobj3.c -o gdbmobj3.o /dev/null 21
/bin/bash ./libtool --mode=link --tag=CC gcc  -g -O2   -o libgdbmobj.la  -rpath 
/usr/local/lib gdbmobj.lo gdbmobj2.lo gdbmobj3.lo
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared 
libraries
ar cru .libs/libgdbmobj.a  gdbmobj.o gdbmobj2.o gdbmobj3.o
ranlib .libs/libgdbmobj.a
creating libgdbmobj.la
(cd .libs  rm -f libgdbmobj.la  ln -s ../libgdbmobj.la libgdbmobj.la)
/bin/bash ./libtool --mode=link --tag=CC gcc  -g -O2   -o libgdbmobjs.la   
gdbmobj.lo gdbmobj2.lo gdbmobj3.lo
ar cru .libs/libgdbmobjs.a .libs/gdbmobj.o .libs/gdbmobj2.o .libs/gdbmobj3.o
ranlib .libs/libgdbmobjs.a
creating libgdbmobjs.la
(cd .libs  rm -f libgdbmobjs.la  ln -s ../libgdbmobjs.la libgdbmobjs.la)
if g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT testgdbm.o -MD -MP -MF 
.deps/testgdbm.Tpo -c -o testgdbm.o testgdbm.C; \
then mv -f .deps/testgdbm.Tpo .deps/testgdbm.Po; else rm -f 
.deps/testgdbm.Tpo; exit 1; fi
/bin/bash ./libtool --mode=link --tag=CXX g++  -g -O2   -o testgdbm.exe  
testgdbm.o libgdbmobj.la -lgdbm
g++ -g -O2 -o testgdbm.exe testgdbm.o  ./.libs/libgdbmobj.a 
/usr/lib/libgdbm.dll.a
rm -f libshgdbmobj.a
cd .libs  ar rv ../libshgdbmobj.a gdbmobj.o gdbmobj2.o gdbmobj3.o
ar: creating ../libshgdbmobj.a
a - gdbmobj.o
a - gdbmobj2.o
a - gdbmobj3.o
make[3]: Leaving directory `/home/Kees/courier-authlib-0.55/gdbmobj'
make[2]: Leaving directory `/home/Kees/courier-authlib-0.55/gdbmobj'
... [ skip lots of stuff ] ...
Making all in makedat
make[2]: Entering directory `/home/Kees/courier-authlib-0.55/makedat'
make  all-am
make[3]: Entering directory `/home/Kees/courier-authlib-0.55/makedat'
gcc -I./.. -I.. -Wall -g -O2makedatprog.c   -o makedatprog
makedatprog.c: In function `main':
makedatprog.c:113: warning: implicit declaration of function `unlink'
/cygdrive/c/DOCUME~1/Kees/LOCALS~1/Temp/ccml5O8a.o(.text+0x7d): In function 
`addgdbm':
/home/Kees/courier-authlib-0.55/makedat/makedatprog.c:33: undefined reference 
to `_gdbmobj_store'
/cygdrive/c/DOCUME~1/Kees/LOCALS~1/Temp/ccml5O8a.o(.text+0x1ec): In function 
`main':
/home/Kees/courier-authlib-0.55/makedat/makedatprog.c:102: undefined reference 
to `_gdbmobj_init'
/cygdrive/c/DOCUME~1/Kees/LOCALS~1/Temp/ccml5O8a.o(.text+0x207):/home/Kees/courier-authlib-0.55/makedat/makedatprog.c:104:
 undefined reference to `_gdbmobj_open'
/cygdrive/c/DOCUME~1/Kees/LOCALS~1/Temp/ccml5O8a.o(.text+0x223):/home/Kees/courier-authlib-0.55/makedat/makedatprog.c:117:
 undefined reference to `_gdbmobj_close'

Re: Installing Courier-Imap

2005-04-13 Thread Kees Vonk
Sorry this should have been in my previous email.
Brian Dessent wrote:
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
No, it seems to say:
case $db in
gdbm)
dblibrary=../gdbmobj/libgdbmobjs.la
LIBDB=
;;
db)
dblibrary=../bdbobj/libbdbobjs.la
LIBGDBM=
;;
*)
makedatprog_target=
esac

...then in Makefile.ac you have:
[EMAIL PROTECTED]@ @LIBGDBM@ @LIBDB@
No, but there is Makefile.am which says:
# $Id: Makefile.am,v 1.5 2004/09/08 01:27:34 mrsam Exp $
#
# Copyright 1998 - 2004 Double Precision, Inc.  See COPYING for
# distribution information.
AUTOMAKE = srcdir=${srcdir} @SHELL@ ${srcdir}/../automake.fix @AUTOMAKE@
[EMAIL PROTECTED]@
EXTRA_PROGRAMS=makedatprog
makedatprog_SOURCES=makedatprog.c
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@ @LIBGDBM@ @LIBDB@

--
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/


Re: Installing Courier-Imap

2005-04-12 Thread Brian Dessent
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.

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/