"Segmentation fault" really says it all...
Check the logs in the testrun directory. See if there's anything interesting. testrun/slapd.*.log should be particularly relevant.
My guess would be that playing around with db.h resulted in headers not matching the libraries. (Although I thought there were checks for such things...) I'd try to undo whatever you did with /usr/local, and play around with CPPFLAGS and similar autoconf variables to pick one and only one "/usr/local/BerkerleyDB.4.{5,6}" as you see fit. There's also a chance (depending on your autoconf and/or linker configuration, both compile and run time) that you were OK at compile time but changed at run time, especially if you have a copy of BerkeleyDB in /usr itself.
What version of OpenLDAP are you trying to compile here? If it's a recent one and this is a detectable failure, maybe it'd be better to assert() out here instead of segv'ing. If it's not a recent one...you should be compiling a recent version, and you might avoid headaches like this because error checking has likely improved. Like I said, I thought there were header != lib checks already.
On Wed, 3 Oct 2007, Le Trung Kien wrote:
Hi, I tried out some solutions at http://www.openldap.org/faq/data/cache/345.html but I still don't solve the make test fail : test001-slapadd
Starting test001-slapadd ...
running defines.sh Running slapadd to build slapd database... Starting slapd on TCP/IP port 9011... Using ldapsearch to retrieve all the entries... ./scripts/test001-slapadd: line 51: 2410 Segmentation fault $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >$LOG1 2>&1 Waiting 5 seconds for slapd to start... Waiting 5 seconds for slapd to start... Waiting 5 seconds for slapd to start... Waiting 5 seconds for slapd to start... Waiting 5 seconds for slapd to start... Waiting 5 seconds for slapd to start... ./scripts/test001-slapadd: line 53: kill: (2410) - No such process ldapsearch failed (1)!
./scripts/test001-slapadd failed (exit 1)
I guess it comes from the incorrect install of BerkerleyDB, I have installed two version of BerkerleyDB: 4.5 and 4.6 and they locate at /usr/local/BerkerleyDB.4.5 and /usr/local/BerkerleyDB.4.6 After "make install" them, then configure OpenLDAP I receive compliant about missing "db.h" file, then I copy subdirectories in /usr/local/BerkerleyDB.4.6 to corresponsive subdirectories in /usr/local. Then I have finished "make" OpenLDAP susscessful however "make test" failed.
Could you tell me how you install BerkerleyDB to work with Openldap ? or tell me if my test failure came from the difference problems. Help me, please. Thank you.
-- Le Trung Kien.