I was able to fix this problem by makeing soft link in /usr/include ln -s db1/ndbm.h ndbm.h
Right; it is syupposed to be relocated so trhat you will know that ndbm is using the old db1, not the db2 database that is part of glibc 2.1