Re: [exim] errors when building Makefile

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Phil Pennock
Dátum:  
Címzett: Prashanth Katuri
CC: exim-users@exim.org
Tárgy: Re: [exim] errors when building Makefile
On 2013-05-21 at 17:04 +0000, Prashanth Katuri wrote:
> I have been trying to upgrade exim (4.80.1) on Solaris and getting
> below error when running make.


> gcc -o exim
> Undefined                       first referenced
> symbol                             in file
> ldap_start_tls_s                    lookups/lookups.a(ldap.o)
> ber_pvt_opt_on                      lookups/lookups.a(ldap.o)


I think that you didn't set LDAP_LIB_TYPE in Local/Makefile and are
instead getting the defaults which point to OPENLDAP1.

In Local/Makefile, set:

LDAP_LIB_TYPE=SOLARIS

Regards,
-Phil

----------------------------8< cut here >8------------------------------
# If you have set LOOKUP_LDAP=yes, you should set LDAP_LIB_TYPE to indicate
# which LDAP library you have. Unfortunately, though most of their functions
# are the same, there are minor differences. Currently Exim knows about four
# LDAP libraries: the one from the University of Michigan (also known as
# OpenLDAP 1), OpenLDAP 2, the Netscape SDK library, and the library that comes
# with Solaris 7 onwards. Uncomment whichever of these you are using.

# LDAP_LIB_TYPE=OPENLDAP1
# LDAP_LIB_TYPE=OPENLDAP2
# LDAP_LIB_TYPE=NETSCAPE
# LDAP_LIB_TYPE=SOLARIS

# If you don't set any of these, Exim assumes the original University of
# Michigan (OpenLDAP 1) library.
----------------------------8< cut here >8------------------------------

The only usage of `ldap_start_tls_s` is guarded:
----------------------------8< cut here >8------------------------------
#ifdef LDAP_OPT_X_TLS
  /* The Oracle LDAP libraries (LDAP_LIB_TYPE=SOLARIS) don't support this: */
  if (eldap_start_tls)
    {
        if ( (rc = ldap_start_tls_s(lcp->ld, NULL, NULL)) != LDAP_SUCCESS) {
            *errmsg = string_sprintf("failed to initiate TLS processing on an "
                "LDAP session to server %s%s - ldap_start_tls_s() returned %d:"
                " %s", host, porttext, rc, ldap_err2string(rc));
            goto RETURN_ERROR;
        }
    }
#endif
----------------------------8< cut here >8------------------------------