Re: sasl and openldap build problem

Ralf S. Engelschall
Sat, 28 May 2005 11:58:36 -0700

On Fri, May 27, 2005, Matthias Kurz wrote:

 On Fri, May 27, 2005, Jean-Marc LIGER wrote:

 > Hi All, I'm new, on this list,
 >
 > I searched in the openpkg archives and on
 > yahoo/google but I find nothing to help me yet...
 >
> I'm using openpkg-2.3.1 on the definitively bullshit for opensource Solaris
 > 9
 >
 > So now let's explain my problem :
 >
 > I compile first sasl with pam option --> ok
 > I compile after openldap with sasl option --> ok
 >
 > I compile finally sasl with pam + ldap options with the follawing errors :
 >
 > /openpkg/lib/libldap.a(cyrus.o)(.text+0x94): In function sasl_version'

 Well, i can see the problem, but it is late, i'll look again tomorrow
 morning. When someone else wants to pick this up - it looks as if the
 mail was crippled, somehow. Here is the output, i get:

 /opkg/home/bin/gcc  -O2 -pipe -I/opkg/include -DAUTH_LDAP  -L/opkg/lib
 -R/opkg/l
ib -L/opkg/lib -R/opkg/lib -L/opkg/lib -L/opkg/lib -o saslauthd mechanisms.o
 au
 th_dce.o auth_getpwent.o auth_krb5.o auth_krb4.o auth_pam.o auth_rimap.o
 auth_sh
 adow.o auth_sia.o auth_sasldb.o lak.o auth_ldap.o cache.o utils.o ipc_unix.o
 ipc
_doors.o saslauthd-main.o md5.o -lcrypt -lldap -llber -lssl -lcrypto -lresolv
 -lpam   -lresolv -lresolv -ldb -lfsl -lsocket -lnsl -lrt
 /opkg/lib/libldap.a(cyrus.o): In function 'ldap_int_sasl_init':
 cyrus.c:(.text+0xe): undefined reference to 'sasl_version'
 [...]
 I guess there should be something like -lsasl in the link-line after -lldap.

Yes, exactly that's the problem.

Bingo !!!

I had -lsasl2 in the %{with_ldap} options :

#   determine build flags
    cflags="%{l_cflags -O} %{l_cppflags}"
    ldflags="%{l_ldflags} %{l_fsl_ldflags}"
    libs="-ldb %{l_fsl_libs}"
%if "%{with_ldap}" == "yes"
    cflags="$cflags -DAUTH_LDAP"
    libs="$libs -lsasl2"
%endif

#   post adjustment: fix OpenLDAP support
%if "%{with_ldap}" == "yes"
    %{l_shtool} subst \
-e "s;^\(saslauthd_LDADD[ ]*=[ ]*[^\\]*\);\1 -lcrypt -lldap -lsasl2 -llber -lssl -lcrypto ;" \
        saslauthd/Makefile
%endif

... and it rocks perfectly :)

Thank for all your quick repplies !

JML

PS: I have also confirmed the subscribe now...


                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      openpkg-users@openpkg.org

    * sasl and openldap build problem
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      openpkg-users@openpkg.org

Reply via email to