[Pdns-users] Building pdns RPMs using custom LDAP libraries/headers
a b
tripivceta at hotmail.com
Wed Mar 20 18:25:36 UTC 2013
> LIBS="-L/usr/local/openldap/lib64"
What makes you believe that anything would pay attention to $LIBS? Did you see this in the code or documentation somewhere?
> %build
> %configure \
> --sysconfdir=%{_sysconfdir}/powerdns \
> --libdir=%{_libdir} \
> --with-sqlite3 \
> --with-socketdir=/var/run/pdns-server \
> --with-modules="" \
> --with-dynmodules="pipe gmysql gpgsql gsqlite3 ldap"
> %{__make}
>
> I am not sure it produces the required result:
> ...
> /bin/sh ../../libtool --tag=CXX --mode=link g++ -D_GNU_SOURCE -O2 -g
> -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic -module -avoid-version
> -lrt -o libldapbackend.la -rpath /usr/lib64 ldapbackend.lo powerldap.lo
> -lldap_r -lz
> ...
>
> I understand that the compiler probably still uses: /usr/lib64/ for ldap
> libs, although we instructed (?) it to use ldap libs from
> /usr/local/openldap/lib64.
>
> So, there remain two questions:
>
> 1. How to build properly with custom LDAP libs?
You need to pass --libdir=/usr/local/openldap/lib64 on the %configure line.
By the way, the correct place to put 3rd party and unbundled applications, even on GNU/Linux and especially on CentOS is /opt, in your case /opt/openldap. Configuration should go in /etc/opt/openldap, and data in /var/opt/openldap. These are controlled by --prefix=/opt/openldap --sysconfdir=/etc/opt/openldap --datadir=/var/opt/openldap when OpenLDAP is being built. OpenLDAP's ./configure might have additional switches for this.
Reference:
http://www.pathname.com/fhs/pub/fhs-2.3.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20130320/d3d20301/attachment-0001.html>
More information about the Pdns-users
mailing list