Date: | Fri, 02 Oct 2015 15:57:38 +0200 |
From: | Tomas Kuthan <tomas.kuthan@oracle.com> |
To: | krb5-bugs@mit.edu |
Subject: | configure should auto-detect OpenLDAP libs on Solaris 11 and higher |
Solaris 11 and higher delivers 2 implementations of LDAP libraries:
- Mozilla LDAP in /usr/lib/libldap.so.5
- OpenLDAP in /usr/lib/libldap-2.4.so (or re-entrant libldap_r-2.4.so)
- (headers under /usr/include/openldap)
configure detects and uses the former.
Sadly, MIT krb5 no longer builds with the old Mozilla LDAP lib:
gcc -fPIC -DSHARED -DHAVE_CONFIG_H
-Dkrb5_dbe_lookup_last_pwd_change=kdb_ldap_dbe_lookup_last_pwd_change
-Dkrb5_dbe_lookup_tl_data=kdb_ldap_dbe_lookup_tl_data
-Dkrb5_dbe_update_last_pwd_change=kdb_ldap_dbe_update_last_pwd_change
-Dkrb5_dbe_update_tl_data=kdb_ldap_dbe_update_tl_data
-I../../../../include -I/builds/krb5/src/include
-I/builds/krb5/src/lib/kdb -I/builds/krb5/src/lib/krb5/asn.1
-DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -g -O2 -Wall -Wcast-align -Wshadow
-Wmissing-prototypes -pedantic -Wno-format-zero-length -Woverflow
-Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes
-Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function
-Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas
-Wsign-compare -Werror=uninitialized -Werror=pointer-arith
-Werror=declaration-after-statement
-Werror-implicit-function-declaration -D_REENTRANT -pthreads -c
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c -o
kdb_ldap_conn.so.o && mv -f kdb_ldap_conn.so.o kdb_ldap_conn.so
In file included from /builds/krb5/src/include/k5-int.h:178:0,
from
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h:35,
from
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/ldap_main.h:34,
from
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c:36:
/builds/krb5/src/include/k5-trace.h:93:20: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c: In
function ‘authenticate’:
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c:142:43:
error: ‘LDAP_SASL_QUIET’ undeclared (first use in this function)
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c:142:43:
note: each undeclared identifier is reported only once for each function
it appears in
gmake[2]: *** [kdb_ldap_conn.so] Error 1
gmake[2]: Leaving directory
`/builds/krb5-build/plugins/kdb/ldap/libkdb_ldap'
gmake[1]: *** [all-recurse] Error 1
gmake[1]: Leaving directory `/builds/krb5-build/plugins/kdb/ldap'
gmake: *** [all-recurse] Error 1
Ideally configure would auto-detect and use OpenLDAP library at
/usr/lib/libldap_r-2.4.so and headers from /usr/include/openldap.
Alternatively the --with-ldap option could accept path to the library as
an argument:
./configure --with-ldap=/usr/lib/libldap_r-2.4.so ...
- Mozilla LDAP in /usr/lib/libldap.so.5
- OpenLDAP in /usr/lib/libldap-2.4.so (or re-entrant libldap_r-2.4.so)
- (headers under /usr/include/openldap)
configure detects and uses the former.
Sadly, MIT krb5 no longer builds with the old Mozilla LDAP lib:
gcc -fPIC -DSHARED -DHAVE_CONFIG_H
-Dkrb5_dbe_lookup_last_pwd_change=kdb_ldap_dbe_lookup_last_pwd_change
-Dkrb5_dbe_lookup_tl_data=kdb_ldap_dbe_lookup_tl_data
-Dkrb5_dbe_update_last_pwd_change=kdb_ldap_dbe_update_last_pwd_change
-Dkrb5_dbe_update_tl_data=kdb_ldap_dbe_update_tl_data
-I../../../../include -I/builds/krb5/src/include
-I/builds/krb5/src/lib/kdb -I/builds/krb5/src/lib/krb5/asn.1
-DKRB5_DEPRECATED=1 -DKRB5_PRIVATE -g -O2 -Wall -Wcast-align -Wshadow
-Wmissing-prototypes -pedantic -Wno-format-zero-length -Woverflow
-Wstrict-overflow -Wmissing-format-attribute -Wmissing-prototypes
-Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function
-Wunused-label -Wunused-variable -Wunused-value -Wunknown-pragmas
-Wsign-compare -Werror=uninitialized -Werror=pointer-arith
-Werror=declaration-after-statement
-Werror-implicit-function-declaration -D_REENTRANT -pthreads -c
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c -o
kdb_ldap_conn.so.o && mv -f kdb_ldap_conn.so.o kdb_ldap_conn.so
In file included from /builds/krb5/src/include/k5-int.h:178:0,
from
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h:35,
from
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/ldap_main.h:34,
from
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c:36:
/builds/krb5/src/include/k5-trace.h:93:20: warning: anonymous variadic
macros were introduced in C99 [-Wvariadic-macros]
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c: In
function ‘authenticate’:
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c:142:43:
error: ‘LDAP_SASL_QUIET’ undeclared (first use in this function)
/builds/krb5/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap_conn.c:142:43:
note: each undeclared identifier is reported only once for each function
it appears in
gmake[2]: *** [kdb_ldap_conn.so] Error 1
gmake[2]: Leaving directory
`/builds/krb5-build/plugins/kdb/ldap/libkdb_ldap'
gmake[1]: *** [all-recurse] Error 1
gmake[1]: Leaving directory `/builds/krb5-build/plugins/kdb/ldap'
gmake: *** [all-recurse] Error 1
Ideally configure would auto-detect and use OpenLDAP library at
/usr/lib/libldap_r-2.4.so and headers from /usr/include/openldap.
Alternatively the --with-ldap option could accept path to the library as
an argument:
./configure --with-ldap=/usr/lib/libldap_r-2.4.so ...