March 14, 2011
Hand-rolling KCachegrind on Centos 5.5

KCachegrind is  a tool for generating and viewing call-graphs for profiling code. Unfortunately, i’ts not laying around in any package repositories I have configured (I’ll write a heated screed on packaging systems at some point), so I decided to compile it myself.

After much googling and random package installing (X, libx-devel, kdelibs-devel etc) and the like, i hit on the following:

    $  ./configure —with-qt-dir=/usr/lib64/qt-3.3/lib —with-extra-includes=/usr/include/kde3  —with-qt-libraries=/usr/lib64/qt-3.3/lib —enable-libsuffix=64

Modify appropriately for your Qt and KDE library versions and locations. Interestingly, the libsuffix parameter fixes the

checking if UIC has KDE plugins available… no
configure: error: you need to install kdelibs first.

check during configure, a cause of much consternation.