When I recently built openldap 2.4.23, I first tried using whatever 5.x
version was the latest on oracle's site.
I do not remember the specifics, but i had problems trying to build
openldap with that version of bdb.
I then noticed this in the openldap README file:
SLAPD:
BDB and HDB backends require Oracle Berkeley DB 4.4, 4.5,
4.6, 4.7, or 4.8. It is highly recommended to apply the
patches from Oracle for a given release.
I assumed that meant 5.x wasn't supported, built 4.8.latest, and went on
with life.
Anyway, if 5.x IS supported it would be great to update that README file
for the next openldap release.