Hi,
I need to compile the lastest OpenLDAP version and I want to know
what's
the recommended version of BDB, if there is any. The latest BDB is
4.6.21, but I want to hear some experiences.

BDB 4.2.52 with all of the appropriate patches has years of stability
behind it. Past that, 4.3 was a disaster (so much so that openldap
aborts if you try to build against it), and 4.4 and 4.5 seem okay, but
I've not used them heavily. 4.6 seems to hold the most promise after
4.2 if you compile it correctly on NTPL systems as there is an annoying
problem with it otherwise.

BDB 4.6.21 works well enough; I don't see it doing anything worse than
previous versions. Sleepycat/Oracle have pretty much declared 4.2 dead.
Given that 4.3 is unsafe, we probably shouldn't be recommending anything
older than 4.4 any more.

In some ways we don't really have a good answer for this question - as
far as I know, nobody has spent any extensive amount of time using
either 4.4 or 4.5.