It is a problem with Berkeley DB version 4.3.27. I recompiled things using 4.2.52 and everything starts and works correctly.