[Date Prev][Date Next] [Chronological] [Thread] [Top]

Ldap2dns fails while linking.



Hello,

 

I’m trying to compile some package that dependent on openldap libraries,

When trying to ‘make’ I get a lot of these kind of errors:

 

 

cc -L/usr/local/lib -o ldap2dns ldap2dns.o /usr/lib/libldap.a /usr/lib/liblber.a

/usr/lib/libldap.a(os-ip.o)(.text+0x279): In function `ldap_pvt_is_socket_ready':

/usr/local/src/critical/openldap-2.1.22/libraries/libldap/os-ip.c:191: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead

/usr/lib/libldap.a(os-ip.o)(.text+0x270):/usr/local/src/critical/openldap-2.1.22/libraries/libldap/os-ip.c:191: warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead

/usr/lib/libldap.a(getdn.o)(.text+0x46a7): In function `ldap_X509dn2bv':

/usr/local/src/critical/openldap-2.1.22/libraries/libldap/getdn.c:3389: undefined reference to `X509_NAME_entry_count'

/usr/lib/libldap.a(getdn.o)(.text+0x46b8):/usr/local/src/critical/openldap-2.1.22/libraries/libldap/getdn.c:3392: undefined reference to `X509_NAME_get_entry'

/usr/lib/libldap.a(getdn.o)(.text+0x473f):/usr/local/src/critical/openldap-2.1.22/libraries/libldap/getdn.c:3415: undefined reference to `X509_NAME_get_entry'

/usr/lib/libldap.a(getdn.o)(.text+0x4749):/usr/local/src/critical/openldap-2.1.22/libraries/libldap/getdn.c:3416: undefined reference to `X509_NAME_ENTRY_get_object'

/usr/lib/libldap.a(getdn.o)(.text+0x4757):/usr/local/src/critical/openldap-2.1.22/libraries/libldap/getdn.c:3417: undefined reference to `X509_NAME_ENTRY_get_data'

 

 

I found this thread in openldap-software mailing list:

http://www.openldap.org/lists/openldap-software/200204/msg00675.html

 

 

this explains why it happens, so I’ve added –lssl, -lcrypto and I now I get the following error:

 

/usr/lib/libldap.a(os-ip.o)(.text+0x279): In function `ldap_pvt_is_socket_ready':

/usr/local/src/critical/openldap-2.1.22/libraries/libldap/os-ip.c:191: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead

/usr/lib/libldap.a(os-ip.o)(.text+0x270):/usr/local/src/critical/openldap-2.1.22/libraries/libldap/os-ip.c:191: warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead

ln -f ldap2dns ldap2dnsd

gcc -g  -DVERSION='"0.3.1"' -c ldap2dns.c -o ldap2dns.o-dbg

gcc -L/usr/local/lib -o ldap2dns-dbg ldap2dns.o-dbg /usr/lib/libldap.a /usr/lib/liblber.a /usr/lib/libssl.a /usr/lib/libcrypto.a

/usr/lib/libldap.a(os-ip.o)(.text+0x279): In function `ldap_pvt_is_socket_ready':

/usr/local/src/critical/openldap-2.1.22/libraries/libldap/os-ip.c:191: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead

/usr/lib/libldap.a(os-ip.o)(.text+0x270):/usr/local/src/critical/openldap-2.1.22/libraries/libldap/os-ip.c:191: warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead

 

 

 

Can someone give me a hand with this?
Maybe should I build openssl/openldap again with shared libraries? As described on the above thread? If so, how do I do that?

 

Help will be appreciated!

Thanks a lot.