<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><span style="font-size: 12pt;">> LIBS="-L/usr/local/openldap/lib64"</span><br><div><br></div><div>What makes you believe that anything would pay attention to $LIBS? <span style="font-size: 12pt;">Did you see this in the code or documentation somewhere?</span></div><div><br></div><div>> %build<br>> %configure \<br>> --sysconfdir=%{_sysconfdir}/powerdns \<br>> --libdir=%{_libdir} \<br>> --with-sqlite3 \<br>> --with-socketdir=/var/run/pdns-server \<br>> --with-modules="" \<br>> --with-dynmodules="pipe gmysql gpgsql gsqlite3 ldap"<br>> %{__make}<br>> <br>> I am not sure it produces the required result:<br>> ...<br>> /bin/sh ../../libtool --tag=CXX --mode=link g++ -D_GNU_SOURCE -O2 -g <br>> -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector <br>> --param=ssp-buffer-size=4 -m64 -mtune=generic -module -avoid-version <br>> -lrt -o libldapbackend.la -rpath /usr/lib64 ldapbackend.lo powerldap.lo <br>> -lldap_r -lz<br>> ...<br>> <br>> I understand that the compiler probably still uses: /usr/lib64/ for ldap <br>> libs, although we instructed (?) it to use ldap libs from <br>> /usr/local/openldap/lib64.<br>> <br>> So, there remain two questions:<br>> <br>> 1. How to build properly with custom LDAP libs?</div><div><br></div><div>You need to pass --libdir=/usr/local/openldap/lib64 on the %configure line.</div><div><br></div><div>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. <span style="font-size: 12pt;">OpenLDAP's ./configure might have additional switches for this.</span></div><div><br></div><div>Reference:</div><div><br></div><div><a href="http://www.pathname.com/fhs/pub/fhs-2.3.html">http://www.pathname.com/fhs/pub/fhs-2.3.html</a></div> </div></body>
</html>