Yes you need to install kdelibs into whatever location you are installing kdebase
ex. bash@computer /usr/src/kdelibs $ ./configure
--prefix=/opt/kde-3.1.4
bash@computer /usr/src/kdebase $ ./configure
--prefix=/opt/kde-3.1.4
Need to use exaclty the same prefix on each set of packages cannot be even slightly diffrent.
try and recompile kdelibs then try kdebase again