https://bugs.openldap.org/show_bug.cgi?id=10158
--- Comment #1 from umagmrit@gmail.com --- Linker error when building openldap-2.4.59 on CentOS Linux release 7.9.2009
creating libldap_r.la (cd .libs && rm -f libldap_r.la && ln -s ../libldap_r.la libldap_r.la) cc -O0 -g -D_REENTRANT -I../../include -I../../include -DLDAP_R_COMPILE -I./../libldap -I/opt/zimbra/common/include -DCHECK_CSN -DSLAP_SCHEMA_EXPOSE -I/opt/zimbra/common/include -c -o apitest.o apitest.c /bin/sh ../../libtool --mode=link cc -O0 -g -D_REENTRANT -L/opt/zimbra/common/lib -Wl,-rpath,/opt/zimbra/common/lib -o apitest apitest.o libldap_r.la ../../libraries/liblber/liblber.la ../../libraries/liblutil/liblutil.a -lsasl2 -lssl -lcrypto -lcrypt -lresolv -pthread cc -O0 -g -D_REENTRANT -Wl,-rpath -Wl,/opt/zimbra/common/lib -o .libs/apitest apitest.o -pthread -L/opt/zimbra/common/lib ./.libs/libldap_r.so /home/build/git/88/packages/thirdparty/openldap/build/RHEL7_64/zimbra-openldap/rpm/BUILD/openldap-2.4.59/libraries/liblber/.libs/liblber.so ../../libraries/liblber/.libs/liblber.so ../../libraries/liblutil/liblutil.a /opt/zimbra/common/lib/libsasl2.so -lcurl /opt/zimbra/common/lib/libxml2.so -lz -lm -ldl -lssl -lcrypto -lcrypt -lresolv -pthread -Wl,--rpath -Wl,/opt/zimbra/common/lib //usr/lib64/libldap-2.4.so.2: undefined reference to `ber_sockbuf_io_udp' collect2: error: ld returned 1 exit status make[3]: *** [apitest] Error 1
$ rpm -qf //usr/lib64/libldap-2.4.so.2 openldap-2.4.44-25.el7_9.x86_64
$ ldd /usr/lib64/libldap-2.4.so.2 linux-vdso.so.1 => (0x00007fffa8971000) liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007fe0ef39c000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fe0ef182000) libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007fe0eef65000) libssl.so.10 => /lib64/libssl.so.10 (0x00007fe0eecf3000) libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007fe0ee890000) libssl3.so => /lib64/libssl3.so (0x00007fe0ee62b000) libsmime3.so => /lib64/libsmime3.so (0x00007fe0ee403000) libnss3.so => /lib64/libnss3.so (0x00007fe0ee0c9000) libnssutil3.so => /lib64/libnssutil3.so (0x00007fe0ede98000) libplds4.so => /lib64/libplds4.so (0x00007fe0edc94000) libplc4.so => /lib64/libplc4.so (0x00007fe0eda8f000) libnspr4.so => /lib64/libnspr4.so (0x00007fe0ed850000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe0ed634000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fe0ed430000) libc.so.6 => /lib64/libc.so.6 (0x00007fe0ed062000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fe0ece2b000) libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007fe0ecbde000) libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007fe0ec8f5000) libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007fe0ec6c2000) libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fe0ec4be000) libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007fe0ec2ae000) libz.so.1 => /lib64/libz.so.1 (0x00007fe0ec098000) librt.so.1 => /lib64/librt.so.1 (0x00007fe0ebe90000) /lib64/ld-linux-x86-64.so.2 (0x00007fe0ef800000) libfreebl3.so => /lib64/libfreebl3.so (0x00007fe0ebc8d000) libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fe0eba89000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fe0eb862000) libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fe0eb600000)
$ nm -D //usr/lib64/libldap-2.4.so.2 |grep -i ber_sockbuf_io_udp U ber_sockbuf_io_udp
$ readelf -s //usr/lib64/libldap-2.4.so.2 |grep -i ber_sockbuf_io_udp 230: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND ber_sockbuf_io_udp
$ rpm -qa |grep curl libcurl-7.29.0-59.el7_9.2.x86_64 curl-7.29.0-59.el7_9.2.x86_64 libcurl-devel-7.29.0-59.el7_9.2.x86_64 python-pycurl-7.19.0-19.el7.x86_64
$ curl -V curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.90 zlib/1.2.7 libidn/1.28 libssh2/1.8.0 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets