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

Solaris 10 and openldap - help needed.

Hi all,

I have a number of issues with OpenLDAP on solaris 10.  These are mostly
to do with Samba, however, boiling the problem down I have tried to
simplify things.

I have openldap-2.3.27 configured with this configure line and compiled
with gcc version

./configure --prefix=/usr/local/opt/openldap/openldap-2.3.27
--enable-crypt --enable-ldap --enable-slapd=no --enable-shared=no

I have tried to compile the following simple program:

$ more ldaptest.c
#include <ldap.h>

        char *ldapname="Dn=this is a long DN";
        char *result;

        result=ldap_dn2ad_canonical( ldapname );

With the command line 
/usr/sfw/bin/gcc -I/usr/local/opt//openldap/openldap-2.3.27/include
-L/usr/local/opt/openldap-2.3.27/lib/liblber.a ldaptest.c

This gives this error:
Undefined                       first referenced
 symbol                             in file
ldap_dn2ad_canonical                /var/tmp//ccKJLi7T.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status

looking as the libraries:
$ /usr/ccs/bin/nm /usr/local/opt/openldap/openldap-2.3.27/lib/libldap.a
| grep ldap_dn2ad_canonical
[57]    |      3116|     120|FUNC |GLOB |0    |1

However when I compile against the dynamic libraries compilation works.

/usr/sfw/bin/gcc -I/usr/local/opt/openldap/openldap-2.3.27/include
-L/usr/local/opt/openldap/openldap-2.3.27/lib -lldap -llber ldaptest.c

I am at the limit of my understanding.  Can anyone help.