HI!
I'm running make test on a system where older OpenLDAP libs are installed from the Linux distribution packages (here RPMs of openSUSE 11.1). This leads to problems during 'make test':
LDAP vendor version mismatch: library 20413, header 20416
Test failed ./scripts/test000-rootdse failed (exit 1)
make[2]: *** [bdb-yes] Error 1 make[2]: Leaving directory `/usr/src/michael/openldap/OPENLDAP_REL_ENG_2_4/openldap/tests' make[1]: *** [test] Error 2 make[1]: Leaving directory `/usr/src/michael/openldap/OPENLDAP_REL_ENG_2_4/openldap/tests' make: *** [test] Error 2
$ grep -r LD_LIBRARY_PATH tests/ tests/scripts/defines.sh:LD_LIBRARY_PATH=$TESTWD/../libraries:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH
Hmm...
find libraries/ -name "*.so" libraries/libldap_r/.libs/libldap_r.so libraries/liblber/.libs/liblber.so libraries/libldap/.libs/libldap.so
Does setting LD_LIBRARY_PATH in tests/scripts/defines.sh have any effect?
I've changed this line to (line wrapped)
LD_LIBRARY_PATH=$TESTWD/../libraries/liblber/.libs:$TESTWD/../libraries/libldap/.libs:$TESTWD/../libraries/libldap_r/.libs:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH
and now it works as expected.
This might also be the reason that some tests failed in the past although gdb reported that the right libs were used. But the symbols were missing in gdb's stack trace.
Ciao, Michael.