I have tried to get rlm_ldap to build, but w/o success. The problem seems
to be that the code in the configure-script testing if the lber- and ldap-
libraries works, doesn't work on my platform (Solaris 8/SPARC/gcc). I have
fixed the lber test code by replacing:

#include "confdefs.h"
extern char ber_init();
int main() {
 ber_init()
; return 0; }

with

#include "confdefs.h"
#include <lber.h>

int main ()
{
        struct berval *bv;
        ber_init(bv);
        return 0;
}

in the configure script in the rlm_ldap directory. As the ldap test failed
in a similiar manner, I tried to do the same thing here, replacing:

#include "confdefs.h"
extern char ldap_init();
int main() {
 ldap_init()
; return 0; }

with

#include "confdefs.h"
#include <ldap.h>

int main () {
        char *name = "foo";
        int port = 1;
        ldap_init(name, port);
        return 0;
}

However, this does not work. I guess it is because my test program doesn't
compile:

ducati(bn) rlm_ldap 1315$ gcc -I/local/db/openldap/2.0.21/include 
-L/local/db/openldap/2.0.21/lib -llber -lldap -lnsl -lsocket -lrt testlibldap.c
Undefined                       first referenced
 symbol                             in file
SSL_library_init                    /local/db/openldap/2.0.21/lib/libldap.so
ERR_error_string                    /local/db/openldap/2.0.21/lib/libldap.so
SSL_CTX_set_cipher_list             /local/db/openldap/2.0.21/lib/libldap.so
SSL_CIPHER_get_bits                 /local/db/openldap/2.0.21/lib/libldap.so
CRYPTO_free                         /local/db/openldap/2.0.21/lib/libldap.so
X509_get_issuer_name                /local/db/openldap/2.0.21/lib/libldap.so
....

To me, it looks like I am missing some crypto libraries, but these should
not be required to compile? Anyway, let's go back to the original problem.
This is the complete output from the configure script:

ducati(bn) rlm_ldap 1317$ ./configure 
--with-rlm-ldap-lib-dir=/local/db/openldap/2.0.21/lib 
--with-rlm-ldap-include-dir=/local/db/openldap/2.0.21/include
creating cache ./config.cache
checking for gcc... /local/gnu/bin/gcc
checking whether the C compiler (/local/gnu/bin/gcc  ) works... yes
checking whether the C compiler (/local/gnu/bin/gcc  ) is a cross-compiler... 
nochecking whether we are using GNU C... yes
checking whether /local/gnu/bin/gcc accepts -g... yes
checking for inet_aton in -lresolv... yes
checking for lber.h... yes
checking for ldap.h... yes
checking for sasl_encode in -lsasl... no
checking for DH_new in -lcrypto... no
checking for SSL_new in -lssl... no
checking for ber_init in -llber... yes
checking for ldap_init in -lldap... no
configure: warning: silently not building rlm_ldap.
configure: warning: FAILURE: rlm_ldap requires:  libldap.
updating cache ./config.cache
creating ./config.status
creating Makefile
ducati(bn) rlm_ldap 1318$ 

I have checked that the configure script does indeed try the compile the
tests with the correct paths (ie. /local/db/openldap/...), and I am quite
certain it does find the libraries/includes it needs. I have tried this
with both FreeRADIUS 0.5, and the lates from CVS.

Any help greatly appreciated!


-- 
We tend to meet any new situation by reorganising; and a wonderful method
it can be for creating the illusion of progress while producing confusion,
inefficiency and demoralisation.    -- Gaius Petronius, 60 AD

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to