[Pdns-users] LDAP compile error (openldap-2.3

Dean Baender dean at dyerdigital.com
Mon Apr 24 19:00:44 UTC 2006

On Sunday 04 September 2005 5:29 am, Norbert Sendetzky wrote:
> On Sunday 04 September 2005 13:30, Dominic Ijichi wrote:
> > Hi, I'm having a problem compiling the ldap backend on solaris 8 with
> > gcc-3.4.4. openldap 3.2.6 compiled in a nonstandard place but the
> > ldapbackend/Makefile looks like its picked up the LDFLAGS and CPPFLAGS
> > ok. any ideas?
> >
> > ------
> >
> >  g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/ssl/include
> > -I/opt/project.venus/software/base/LDAPv3/include -D_REENTRANT -Wall -O2
> > -MT powerldap.lo -MD -MP -MF .deps/powerldap.Tpo -c powerldap.cc  -fPIC
> > -DPIC -o .libs/powerldap.o
> The includes seem to be ok.
> Just to be sure: Could you have a look into
> /opt/project.venus/software/base/LDAPv3/include/ldap.h
> and see if ldap_init() and ldap_unbind() are defined?
> Norbert

I just ran into this problem as well. 
I'm using Gentoo Linux & openldap-2.3.20 but I suspect the fix holds for 
anyone using any 2.3.x version of openldap.

Sorry if this is a known fix, but I didn't see a solution on the list, so 
here's what I came up with:

Openldap <=2.2 defines LDAP_DEPRECATED in <ldap.h>, openldap 2.3 does not.
For the ldapbackend to build with openldap-2.3 we need to set  

	Adds -DLDAP_DEPRECATED to ldapbackend/Makefile.in & .am
	apply to a released powerdns (I've only tried 2.9.18 & 2.9.20)

	Adds -DLDAP_DEPRECATED to ldapbackend/Makefile.am
	made from svn rev 759

I hope someone will find this useful.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ldap-2.3-fix.patch
Type: text/x-diff
Size: 849 bytes
Desc: not available
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20060424/0bc3ea24/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: svn-ldap-2.3-fix.diff
Type: text/x-diff
Size: 396 bytes
Desc: not available
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20060424/0bc3ea24/attachment.diff>

More information about the Pdns-users mailing list