Skip to content

Instantly share code, notes, and snippets.

@jtilly
Last active May 23, 2024 10:36
Show Gist options
  • Save jtilly/866ee2cc4baec369150a to your computer and use it in GitHub Desktop.
Save jtilly/866ee2cc4baec369150a to your computer and use it in GitHub Desktop.
Install qcachegrind on Ubuntu
#!/bin/bash
sudo apt-get install qt5-default
wget http://kcachegrind.sourceforge.net/kcachegrind-0.7.4.tar.gz
tar xvf kcachegrind-0.7.4.tar.gz
cd kcachegrind-0.7.4
qmake && make
sudo install -m 755 qcachegrind/qcachegrind /usr/local/bin
sudo install -m 644 qcachegrind/qcachegrind.desktop \
/usr/local/share/applications/
sudo install -m 644 kcachegrind/hi32-app-kcachegrind.png \
/usr/local/share/icons/hicolor/32x32/apps/kcachegrind.png
sudo install -m 644 kcachegrind/hi48-app-kcachegrind.png \
/usr/local/share/icons/hicolor/48x48/apps/kcachegrind.png
@Fibbles
Copy link

Fibbles commented Oct 2, 2016

To get this to compile on Xubuntu 16.04 I needed to edit /kcachegrind-0.7.4/libcore/costitem.h. On line 23 add #include <QObject>.

I'd have listed the bug on the KDE tracker but they require me to publicly display my email address. I'd rather not have my email inbox flooded with spam.

@IdenGit
Copy link

IdenGit commented Jul 13, 2017

@Fibbles - Thanks, that problem reply on Ubuntu-Gnome 16.10

@dubrox
Copy link

dubrox commented Mar 22, 2018

@Fibbles your solution works for Ubuntu 16.04 too.

@dblyon
Copy link

dblyon commented Sep 20, 2018

Thanks! Works on "Ubuntu 18.04.1 LTS"

@gsdefender
Copy link

gsdefender commented Nov 4, 2018

To get this to compile on Xubuntu 16.04 I needed to edit /kcachegrind-0.7.4/libcore/costitem.h. On line 23 add #include <QObject>.

I'd have listed the bug on the KDE tracker but they require me to publicly display my email address. I'd rather not have my email inbox flooded with spam.

This is true. But if you happen to have all dependencies in place for Qt 4 (the previous Qt version) and you build against it, no modification is needed.

@alexniver
Copy link

To get this to compile on Xubuntu 16.04 I needed to edit /kcachegrind-0.7.4/libcore/costitem.h. On line 23 add #include <QObject>.

I'd have listed the bug on the KDE tracker but they require me to publicly display my email address. I'd rather not have my email inbox flooded with spam.

same problem on ubuntu 18.10. thanks!

@AustEcon
Copy link

AustEcon commented Oct 5, 2019

edit /kcachegrind-0.7.4/libcore/costitem.h. On line 23 add #include <QObject> --> Works on Ubuntu 19.04 too!

@fengliang2011
Copy link

how to launch?

@aicentral
Copy link

how to launch?

just type qcachegrind

@kaidiwang
Copy link

works for Ubuntu 20.04.1 ! Thanks!

@arduinocc04
Copy link

Thanks @jtilly @Fibbles !

@aviv-vladimirsedlar
Copy link

Thanks @Fibbles , this saved me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment