I had the same problem as you and finally was able to figure it out. So the configuration is not recognizing the cxx files. The 2 things I did that made a difference was to modify the m4:
add the path to ./src/m4/bitcoin_find_bdb48.m4:
bdbdirlist=/path/to/compiled/db-4.8.30.NC/build_unix/build/include
Now I know you already tried it but leave the path there and now try to install the berkeley db 4.8 from scratch using these commands:
cd build_unix &&
../dist/configure --prefix=/usr \
--enable-compat185 \
--enable-dbm \
--disable-static \
--enable-cxx &&
make
Now, as the root user:
make docdir=/usr/share/doc/db-4.8.30 install &&
chown -v -R root:root \
/usr/bin/db_* \
/usr/include/db{,_185,_cxx}.h \
/usr/lib/libdb*.{so,la} \
/usr/share/doc/db-4.8.30
The commands were taken from:
http://www.linuxfromscratch.org/blfs/view/svn/server/db.htmlThis setup is mean for db 6.0 but it works fine for 4.8 aswell
Hope I helped! and if I did: 1CNdsvPFwm899J6c8JxrM55jPrtPVB1M2X
EDIT: It let me compile but when i run bitcoind I get an error while loading shared libraries still something to do with db4.8
EDIT2: Was able to fix the issue with bitcoind not finding some bdb 4.8 dependancy by doing this:
export LD_LIBRARY_PATH=/usr/local/BerkeleyDB.4.8/lib/
EDIT3: Now I am facing a problem where once I start bitcoind I get this error:
bitcoind: key.cpp:135: <unnamed>::CECKey::CECKey(): Assertion `pkey != __null' failed.
Any help is appreciated.