KDE developers and users that like to stay on the "bleeding edge" often hit a compilation problem for which there is a known solution (for instance getting a new Qt snapshot). To reduce traffic on the lists, this page tries to answer the most common problems one can find when trying to compile the current development version of KDE. This doesn't apply to trying to compile previous releases or snapshots, nor does it list bugs.
It depends on the version of KDE you want to compile.
configure is a shell script residing in each KDE package. Upon invocation it will gather some information about your system and prepare a Makefile in each directory. It is no longer used starting with KDE 4.
configure uses the config.guess script in the admin directory to determine your host type. config.guess expects the C compiler to be called cc, though. If your compiler is named differently you can either specify your compiler via the environment variable CC or create a symbolic link (e.g. ln -s /usr/local/bin/egcs /usr/local/bin/cc). Of course, in the latter example you should make sure that /usr/local/bin is in your PATH in the first place.
X headers like X.h are missing. They usually reside in /usr/include/X11/ or similar. Your distribution may contain them in a seperate package like X-devel. If the files are simply installed in a non-standard directory see configure --help.
When using SuSE, install xdevel from SuSE's "X" Series in YaST. On Caldera, Mandrake and Redhat the package is named XFree86-devel.
Do you have the currently required Qt library installed ? See "How to get the latest sources". Make sure that QTDIR is pointing to the correct location.
If you are using Solaris 2.6 and want to compile KDE as a normal user, please see this document first.
Well it's not new but better put it somewhere. Solaris X headers are buggy. They declare functions with no return type (assuming it defaults to int). You can get around by setting CXXFLAGS="-fpermissive" before ./configure to let g++ be okay with that.
Set LIBS="-lgcc -lstdc++ -Wl,-export-dynamic" while running configure, for all modules.