Apply the Oracle patches to your vanilla 4.7.25 source before compiling. If you're using Debian or Ubuntu, the packages for Lenny and Jaunty already include them. You might also want to change the threading model to prevent poor performance with OpenLDAP.