On Wednesday 08 June 2005 14:01, Turbo Fredriksson wrote:
> Quoting Scott Ryan <[EMAIL PROTECTED]>:
> >> HINT: You're missing a whole lot of defines and setup at the top of the
> >>       Makefile.
> >
> > Sorry, maybe I am missing something...
> >
> > The only define that i see in the Makefile is
> > CONTROLDB=-DUSE_CONTROLDB -DQLDAP_BAILOUT
> > Which is what I have set in my Makefile.
>
> But you still have to setup compilation of QmailLDAP. Most important is the
> LDAPFLAGS define...

The LDAPFLAGS were defined in the makefile. I actually have my own patch which 
enables the flags I require.

>
> > What do you mean by a 'whole lot of defines and setups' ? There is only
> > one reference in the documentation to modifying the makefile for the
> > control patch that I can see:
>
> You can't have QmailLDAP/Controls without QmailLDAP...
>
> > ./compile -DALTQUEUE -DBIGBROTHER -DBIGTODO -DBIND_8_COMPAT -DDASH_EXT
> > -DDATA_COMPRESS -DEXTERNAL_TODO -DIGNOREVERISIGN -DQUOTATRASH
> > -DUSE_CONTROLDB -DQLDAP_BAILOUT   localdelivery.c
> > ./compile constmap.c
> > ./load qmail-lspawn spawn.o prot.o slurpclose.o coe.o control.o \
> > qldap.a sig.a strerr.a constmap.o getln.a wait.a case.a cdb.a \
> > fd.a seek.a open.a dirmaker.o read-ctrl.o localdelivery.o env.a \
> > stralloc.a alloc.a substdio.a str.a error.a fs.a auto_qmail.o \
> > auto_uids.o auto_usera.o auto_spawn.o
> >
> > control.o(.text+0x875): In function `control_ldap_search':
> > : undefined reference to `ldap_count_entries'
>
> Hm. Oki, try specifying LDAPLIBS and LDAPINCLUDES. It can't find the
> ldap libs it seams...

Exactly the problem... I had to manually specify LDAPLIBS=-L/usr/lib -lldap 
-llber and LDAPINCLUDES=-I/usr/include.

I had assumed that it would automatically have found these libs.

>
> > # Perhaps you have different ldap libraries, change them here
> > #LDAPLIBS=-L/usr/local/lib -lldap -llber
> > # and change the location of the include files here
> > #LDAPINCLUDES=-I/usr/local/include
> > # on Slowaris you need -lresolv and probably a LD_RUN_PATH added like
> > this: #LDAPLIBS=-L/opt/OpenLDAP/lib -lldap -llber -lresolv
> > -R/opt/OpenLDAP/lib # for example on my Linux box I use:
> > #LDAPLIBS=-L/opt/OpenLDAP/lib -lldap -llber
> > # if you need a special include-directory for ldap headers enable this
> > #LDAPINCLUDES=-I/opt/OpenLDAP/include
> >
> > $ rpm -qa | grep openldap-devel
> > openldap-devel-2.2.13-2
>
> Hmmm. The function 'ldap_count_entries' is located in the 'libldap.a'
> archive/library. Does your/the package contain this file, or is it
> not in '/usr/lib'?
>
> rpm -qpl openldap-devel | grep libldap\.a
>
> should find out if I remember the rpm params correctly...

Once the LIBS and INCLUDES were specified, compiled no problems.

My only problem is now that our own patches break the compilation..... :S

Thanks for you help with this issue. I am looking forward to using this 
functionality.
-- 
slr

Attachment: pgp4x68YwHAA9.pgp
Description: PGP signature

Reply via email to