[Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

Nikolaos Milas nmilas at admin.noa.gr
Tue Apr 9 14:15:37 UTC 2013

On 8/4/2013 11:36 μμ, Nikolaos Milas wrote:

> ...But let's step back for a while.
> Why can't I build with the actual, unmodified, spec file using 
> *standard* system libraries? See below:
> ...
> Why it can't find the default system libraries (which are indeed in 
> /usr/lib64/) ??? It's the first time this happens to me. I have built 
> many packages (Postfix, Dovecot, Openldap, etc.) and I have never had 
> a problem building using the default spec file. 

To make things clearer, I started again from scratch; I downloaded 
and I tried to build in a new user account, with:

    $ cat ~/.rpmmacros
    %_topdir %(echo $HOME)/rpmbuild

as I usually do when building.

Now, I tried to build the above, WITHOUT ANY MODIFICATIONS WHATSOEVER, 
on CentOS 6.4 (kernel: 2.6.32-358.2.1.el6.x86_64) and it always fails at 
the same point (i.e. it can't find the standard ldap libraries, although 
they exist on the system - as I have described in the beginning of the 

    checking for ldap_set_option in -lldap_r... no
    checking for ldap_set_option in -lldap... no
    configure: error: ldap library (libldap) not found

I think we should focus on solving the problem why we can't build with 
the unmodified SRPM, using standard system libraries.

Therefore, I believe it will be useful to post the full config.log of 
this unsuccessful attempt (attached in zipped file), so that someone 
might hopefully identify something that could lead to the solution of 
the (big) mystery.

The configure line is:

./configure --build=x86_64-redhat-linux-gnu 
--host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu 
--program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin 
--sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share 
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec 
--localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man 
--infodir=/usr/share/info --sysconfdir=/etc/powerdns --libdir=/usr/lib64 
--with-sqlite3 --with-socketdir=/var/run/pdns-server --with-modules= 
'--with-dynmodules=pipe gmysql gpgsql gsqlite3 ldap'

and the configure.log shows:

configure:18526: checking for ldap_set_option in -lldap_r
configure:18551: g++ -o conftest -D_GNU_SOURCE -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic   -lrt conftest.cpp 
-lldap_r   -lz >&5
undefined reference to `ber_sockbuf_io_udp'
collect2: ld returned 1 exit status
configure:18567: checking for ldap_set_option in -lldap
configure:18592: g++ -o conftest -D_GNU_SOURCE -O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic   -lrt conftest.cpp 
-lldap   -lz >&5
undefined reference to `ber_sockbuf_io_udp'


$ ls -la /usr/lib64/ | grep ldap
drwxr-xr-x.   4 root root     4096 Mar 11 16:06 evolution-openldap
lrwxrwxrwx.   1 root root       10 Sep 21  2012 libldap-2.4.so.2 -> 
-rw-r--r--    1 root root   781914 Mar 20 15:57 libldapbackend.a
-rwxr-xr-x    1 root root     1151 Mar 20 15:57 libldapbackend.la
-rwxr-xr-x    1 root root   379419 Mar 20 15:57 libldapbackend.so
lrwxrwxrwx.   1 root root       12 Sep 21  2012 libldap_r-2.4.so.2 -> 
lrwxrwxrwx    1 root root       29 Mar 11 16:06 libldap_r.so -> 
lrwxrwxrwx    1 root root       27 Mar 11 16:06 libldap.so -> 
-rwxr-xr-x    1 root root    40320 Feb 22 09:49 libsmbldap.so.0

Any insight will be appreciated.

Best regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log.zip
Type: application/octet-stream
Size: 26490 bytes
Desc: not available
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20130409/44936055/attachment-0001.obj>

More information about the Pdns-users mailing list