Johan,

        We recently ran into the same problem ourselves.  I fixed it by
adding $(LDAPLIBS) to the Makefile on line 537 (this line may vary in your
file by a few lines.. . I've hacked ours a little more).  The complete
compile statement looks like this:

control.o: \
compile control.c readwrite.h open.h getln.h stralloc.h gen_alloc.h \
substdio.h error.h control.h alloc.h scan.h
        ./compile $(LDAPFLAGS) $(LDAPLIBS) $(LDAPINCLUDES) control.c

        The part to note is the ./compile line.  Make sure the $(LDAPLIBS)
are there.  As for the DEBUG part of it... well, I found we had the same
problem, but I ended up finding the problem that required me to want to
use debug mode in the first place, and thus didn't spend anytime trying to
fix it.

        If you  need anymore help, just email!  We're real close (probably
going to finish it tomorrow in fact) to migrating our current qmail setup
to qmail+ldap+control and smtp auth.

        I've also noticed a slight delay in user authentication while
checking mail.  It seems that auth_pop is verifying the username/password,
and it takes time to initiate a connection with the LDAP server.  The LDAP
server is OpenLDAP and is local to the machine.  We have around 10,000
entries under one domain.  I'm going to try some optimization tips for
OpenLDAP that I picked up, and hopefully this will kill that little delay.
Not that it's hurting anything, I just want this to be as slick/fast as
possible.  :)

All the best,
Jonathan George

On Thu, 10 Jan 2002, Johan Andersson wrote:

> Hi!
>
> I've been trying compiling qmail-ldap-control for a while.. and everything is 
>working fine with
> the qmail-ldap patch. But not with the qmail-ldap-control.
>
> I've patched the qmail-1.03 source tree with the following patches (in order):
> qmail-ldap-1.03-20011001a.patch.gz
> qmail-ldap-control_20011009.patch.gz
>
> The patching did go well.. but not when I'm trying to compile it.
> I've checked all include directories and libldap and liblber is ok.
>
> The problem is when I run "make setup check" and it comes up to qmail-qmtpd.
> Here is a dump from when I try to make that part:
>
> staff:/usr/src/qmail-1.03-ldap-control# make qmail-qmtpd
> ./load qmail-qmtpd rcpthosts.o control.o constmap.o qldap-debug.o \
> received.o date822fmt.o now.o qmail.o cdb.a fd.a wait.a \
> datetime.a open.a getln.a sig.a case.a env.a stralloc.a \
> alloc.a substdio.a error.a str.a fs.a auto_qmail.o -DQLDAP_CLUSTER -DDASH_EXT 
>-DDEBUG -DUSE_CONTROLDB -DQLDAP_BAILOUT -DUSE_RFC2307 -DUSE_RFC822 
>-I/usr/local/include -I/usr/local/openldap/include
> cc -s -o qmail-qmtpd qmail-qmtpd.o rcpthosts.o control.o constmap.o qldap-debug.o 
>received.o date822fmt.o now.o qmail.o cdb.a fd.a wait.a datetime.a open.a getln.a 
>sig.a case.a env.a stralloc.a alloc.a substdio.a error.a str.a fs.a auto_qmail.o 
>-DQLDAP_CLUSTER -DDASH_EXT -DDEBUG -DUSE_CONTROLDB -DQLDAP_BAILOUT -DUSE_RFC2307 
>-DUSE_RFC822 -I/usr/local/include -I/usr/local/openldap/include
> control.o: In function `control_ldap_search':
> control.o(.text+0x591): undefined reference to `ldap_init'
> control.o(.text+0x5d7): undefined reference to `ldap_set_option'
> control.o(.text+0x5f8): undefined reference to `ldap_value_free'
> control.o(.text+0x604): undefined reference to `ldap_unbind_s'
> control.o(.text+0x649): undefined reference to `ldap_simple_bind_s'
> control.o(.text+0x659): undefined reference to `ldap_err2string'
> control.o(.text+0x7a3): undefined reference to `ldap_search_s'
> control.o(.text+0x7b3): undefined reference to `ldap_err2string'
> control.o(.text+0x80a): undefined reference to `ldap_count_entries'
> control.o(.text+0x94a): undefined reference to `ldap_search_s'
> control.o(.text+0x95a): undefined reference to `ldap_err2string'
> control.o(.text+0x9b2): undefined reference to `ldap_count_entries'
> control.o(.text+0x9de): undefined reference to `ldap_first_entry'
> control.o(.text+0x9e9): undefined reference to `ldap_get_dn'
> control.o(.text+0x9f9): undefined reference to `ldap_memfree'
> control.o(.text+0xa0a): undefined reference to `ldap_get_values'
> qldap-debug.o: In function `log':
> qldap-debug.o(.text+0x104): undefined reference to `va_output'
> qldap-debug.o: In function `logstart':
> qldap-debug.o(.text+0x1a4): undefined reference to `va_output'
> qldap-debug.o: In function `logadd':
> qldap-debug.o(.text+0x1d5): undefined reference to `va_output'
> qldap-debug.o: In function `logend':
> qldap-debug.o(.text+0x205): undefined reference to `va_output'
> collect2: ld returned 1 exit status
> make: *** [qmail-qmtpd] Error 1
>
> staff:/usr/src/qmail-1.03-ldap-control# uname -a
> Linux staff 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i686 unknown
>
> I really hope someone can help me.. I've been stuck with this for some days now.. 
>*grr*
> Thank you for a wonderful list by the way! :)
>
>
> Regards,
> Johan Andersson
> Consultant at Qbranch AB, Stockholm
>
>
>

Reply via email to