|Thread title||Replies||Last modified|
|Installing KDevelop 5 on a debian system||0||02:39, 10 January 2016|
After a year of struggling, I finally got KDevelop 5 beta working on my Linux Debian system.
It is most certainly a major step up from KDevelop 4. For me, the killer feature is the much improved parsing of C++ code as I type. It shows me many errors as I type, and I can correct those errors promptly without having to compile so often. It is faster and has gotten rid of some annoying crashes in KDevelop4. There are clunky bits, but I am now using it as my main system.
To give an example, below is a error where I was using an undefined structure member.
To build KDevelop 5, I downloaded a bunch of dependencies, added some lines to my ~/.bashrc file, and created several shell scripts to automate compiling a current kdevelop5 snapshot, along with the ability to update it easily to the most recent version.
Below are the various files that work for my Debian testing distribution. I suspect it also works on Ubuntu. This page is simply about what worked for me on 2 computers running Debian.
My approach stores the kdevelop files and programs within your home folder. Installing it into the system folders is left as an exercise to the reader. I prefer this approach as I don't have to use root access, which I feel is less error prone.
KDevelop 5 package dependencies
I doubt this is all of them, I just added to the list when kdevelop didn't compile. some needed ones may already have been in my systems. I would like to know about any that are needed, and will update this page.
apt-get install extra-cmake-modules qtdeclarative5-dev libqt5webkit5-dev qtscript5-dev apt-get install libbz2-dev libxslt-dev libxml2-dev shared-mime-info oxygen-icon-theme libgif-dev libvlc-dev libvlccore-dev doxygen gperf bzr libxapian-dev fontforge libgcrypt20-dev libattr1-dev network-manager-dev libgtk-3-dev xsltproc xserver-xorg-dev xserver-xorg-input-synaptics-dev libpwquality-dev modemmanager-dev libxcb-keysyms1-dev libepoxy-dev libpolkit-agent-1-dev libnm-util-dev libnm-glib-dev libegl1-mesa-dev libxcb-xkb-dev libqt5x11extras5-dev libwww-perl libxml-parser-perl libjson-perl libboost1.55-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libarchive-dev liblmdb-dev apt-get install qtbase5-dev qtbase5-private-dev libqt5x11extras5-dev qtscript5-dev qttools5-dev libqt5svg5-dev libqt5xmlpatterns5-dev qttools5-dev-tools qtdeclarative5-dev libkf5archive-dev plasma-framework-dev plasma-workspace-dev libkf5guiaddons-dev libkf5widgetsaddons-dev libkf5threadweaver-dev libkf5xmlgui-dev libkf5itemmodels-dev libkf5jobwidgets-dev libkf5kcmutils-dev kio-dev libkf5newstuff-dev libkf5notifications-dev libkf5notifyconfig-dev libkf5parts-dev libkf5texteditor-dev libkf5declarative-dev kdoctools-dev libgrantlee5-dev libkomparediff2-dev libkf5runner-dev libkf5sysguard-dev libgrantlee5-dev libgrantlee-templates5 libgrantlee-textdocument5
Additions to ~/.bashrc
Various defines that my shell scripts require.
# kdevelop 5 stuff export KDEVELOP5_DIR=/home/artg/alocal/projects/kdevelop-5.git # location of the local git repositories, change this to suit # the rest of these lines probably don't have to be changed export KDEVELOP_INSTALL=$KDEVELOP5_DIR/kdevelop5 # where to install the program files export KDEDIRS=$KDEVELOP_INSTALL:/usr # needed anymore ? export QTDIR=/usr/lib/x86_64-linux-gnu/qt5 export PATH=$KDEVELOP_INSTALL/bin:$PATH export QT_PLUGIN_PATH=$KDEVELOP_INSTALL/lib/x86_64-linux-gnu/plugins:$QTDIR/plugins:$QT_PLUGIN_PATH export QML2_IMPORT_PATH=$KDEVELOP_INSTALL/lib/x86_64-linux-gnu/qml:$QTDIR/qml export XDG_DATA_DIRS=$KDEVELOP_INSTALL/share/:$XDG_DATA_DIRS export XDG_CONFIG_DIRS=$KDEVELOP_INSTALL/etc/xdg:/etc/xdg
I would reboot after altering the ~/.bashrc file. Seriously.
This is run to setup the local git repositories
# get rid of any existing source director so can start afresh rm -R $KDEVELOP5_DIR #make the directories where you will be installing the code mkdir -p $KDEVELOP5_DIR/src/kdevelop-pg-qt mkdir -p $KDEVELOP5_DIR/src/kdevplatform mkdir -p $KDEVELOP5_DIR/src/kdevelop mkdir -p $KDEVELOP_INSTALL # copy the git repositories across to your computer git clone git://anongit.kde.org/kdevelop-pg-qt.git $KDEVELOP5_DIR/src/kdevelop-pg-qt git clone git://anongit.kde.org/kdevplatform $KDEVELOP5_DIR/src/kdevplatform git clone git://anongit.kde.org/kdevelop $KDEVELOP5_DIR/src/kdevelop # not sure why I do this, but at some stage I needed to do it cd $KDEVELOP5_DIR/src/kdevelop-pg-qt; git checkout cd $KDEVELOP5_DIR/src/kdevplatform ; git checkout cd $KDEVELOP5_DIR/src/kdevelop ; git checkout
This script compiles KDevelop
export QT_SELECT=5 # compile kdevelop-pq-qt mkdir -p $KDEVELOP5_DIR/src/kdevelop-pg-qt/build cd $KDEVELOP5_DIR/src/kdevelop-pg-qt/build cmake -DCMAKE_INSTALL_PREFIX=$KDEVELOP_INSTALL ../ make -j12 # compile with the number of cores you have available make install # then compile and install KDevPlatform: mkdir -p $KDEVELOP5_DIR/src/kdevplatform/build cd $KDEVELOP5_DIR/src/kdevplatform/build cmake -DCMAKE_INSTALL_PREFIX=$KDEVELOP_INSTALL ../ make -j12 # compile with the number of cores you have available make install # Then compile KDevelop, telling it to use the just-installed KDevPlatform: mkdir -p $KDEVELOP5_DIR/src/kdevelop/build cd $KDEVELOP5_DIR/src/kdevelop/build cmake -DCMAKE_PREFIX_PATH=$KDEVELOP_INSTALL -DCMAKE_INSTALL_PREFIX=$KDEVELOP_INSTALL ../ make -j12 # compile with the number of cores you have available make install # this apparently does some magic to incorporate your new program into your desktop environment kbuildsycoca5
File kdevelop5-update local repository.sh
Used to update the local git repositories to the latest versions. You can then recompile by running 'kdevelop5_release.sh'
cd $KDEVELOP5_DIR/src/kdevelop-pq-qt && git pull cd $KDEVELOP5_DIR/src/kdevplatform && git pull cd $KDEVELOP5_DIR/src/kdevelop && git pull
Now, set the execute bit on the .sh files, then run the scripts
chown o+x <folder where you stored the script files>/*.sh # run the following two scripts kdevelop5_first_time.sh kdevelop5_release.sh
If it doesn't compile, add any dependencies requested, and run 'kdevelop5_release.sh' again (and again...)
Once it compiles, try to run it. Enjoy the wonderful tool that is KDevelop 5 beta!