Main Page | Recent changes | Edit this page | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

KDevelop 4/compiling

From KDevelop

< KDevelop 4

The way to download, compile, install and run KDevelop depends on how you want to download it and where do you want to install it to. So follow the step by step instructions below.

[edit] 1. Get the requirements

Make sure to install the required KDE development packages, see KDevelop 4/requirements for a list of requirements. In particular make sure to install KDE4 kdelibs development packages: kdelibs-devel, kdeworkspace-devel (or build from sources).

WARNING: You have to remove all KDevelop/KDevplatform/Sublime packages provided by your distribution. If you don't do that, binary compatibility issues will eventually lead to crashes and undefined behavior. To make sure, you can search for KDevelop libraries with this command:

find /usr/ -type f -name "*kdev*.so*"

If no results are returned, you should be on the safe side.

[edit] 2. Get the sources (assumes $HOME/src but you can replace it with something else)

             cd $HOME/src
             tar xvjf kdevplatform.tar.bz2
             tar xvjf kdevelop.tar.bz2
       git clone git://gitorious.org/kdevelop/kdevplatform.git $HOME/src/kdevplatform
       git clone git://gitorious.org/kdevelop/kdevelop.git $HOME/src/kdevelop
       Please note that this branch will depend on MovingRange in Kate, meaning KDE 4.5 and above.
       cd  $HOME/src/kdevplatform ; git checkout -b 1.1 origin/1.1 
       cd  $HOME/src/kdevelop ; git checkout -b 4.1 origin/4.1

[edit] 3. Configure and install

You can do a system install of KDevelop in the default path (/usr/local), which needs root privileges, or you can install it locally for your user only. The instructions for both are slightly different; first we'll explain the local install.

In both cases you need set the KDEDIRS environment variable to point to the installation directory of both KDE4 and KDevPlatform.

This will tell KDE core components where to search for plugins and other data related to KDE apps and contains just a list of paths (aka prefixes) where KDE libraries and/or applications have been installed.

Assuming that you have the KDE4 libraries installed in /usr (these are often from packages and installed in /usr or /opt/kde and is distro specific, if unsure ask your distro where it is), you'll have to append it to the KDEDIRS below.

[edit] Local installation

The following commands give instructions to install in $HOME/kdevelop4; you can of course replace it with something else. You don't need root permissions to install KDevelop this way.

First, compile and install KDevPlatform:

   mkdir -p $HOME/src/kdevplatform/build
   cd $HOME/src/kdevplatform/build
   cmake -DCMAKE_INSTALL_PREFIX=$HOME/kdevelop4 ../
   make
   make install

Then compile KDevelop, telling it to use the just-installed KDevPlatform:

   mkdir -p $HOME/src/kdevelop/build
   cd $HOME/src/kdevelop/build
   cmake -DCMAKE_PREFIX_PATH=$HOME/kdevelop4 -DCMAKE_INSTALL_PREFIX=$HOME/kdevelop4 ../
   make
   make install

Before running KDevelop, you need set the KDEDIRS environment variable to point to the installation directories of KDE4, KDevPlatform and KDevelop. This will tell KDE core components where to search for plugins and other data related to KDE apps and contains just a list of paths (aka prefixes) where KDE libraries and/or applications have been installed.

Assuming that you have the KDE4 libraries installed in /usr (these are often from packages and installed in /usr or /opt/kde and is distro specific, if unsure ask your distro where it is) and that you want to install KDevelop4 into $HOME/kdevelop4 then you need to run the following:

   export KDEDIRS=$HOME/kdevelop4:/usr
   kbuildsycoca4

The environment variable must be changed for your whole KDE session. If you set KDEDIRS only before running kdevelop, it will seem to work, but it may crash several minutes later. So in order to have KDevelop work properly, you should add the "export KDEDIRS" line to your ~/.bashrc or similar.


[edit] System installation

First, compile and install KDevPlatform:

   mkdir -p $HOME/src/kdevplatform/build
   cd $HOME/src/kdevplatform/build
   cmake ../
   make
   sudo make install

Then compile KDevelop:

   mkdir -p $HOME/src/kdevelop/build
   cd $HOME/src/kdevelop/build
   cmake ../
   make
   sudo make install

Before running it, you need to set KDEDIRS properly:

   export KDEDIRS=/usr/local:/usr
   kbuildsycoca4

[edit] 4. Get and install plugins (optional)

If you need extra functionality, you can get and install additional plugins for KDevelop4 at KDevelop 4/compiling/plugins.

[edit] 5. Run KDevelop

       kdevelop
       $HOME/kdevelop4/bin/kdevelop

This assumes you’re running KDevelop4 from a terminal and not via the run dialog or via a menu entry, if you want that to work you need to find out how to set environment for the whole X11 session – thats usually distro-specific.

[edit] 6. Contact the development team, or report bugs or wishes

If you find any compile problems with KDevelop4 please don't report them on bugs.kde.org, please report them on our developer mailing-list instead. The bugzilla bug database is only for bugs, and not for compilation issues.

[edit] 7. Keeping it up-to-date with the latest fixes

If you got the sources from the git repository on step 2. then you can update by issuing the following commands:

       cd $HOME/src/kdevelop/build && sudo make uninstall
       cd $HOME/src/kdevplatform/build && sudo make uninstall
       git pull && make && sudo make install
       kbuildsycoca4
       cd $HOME/src/kdevelop/build
       git pull && make && sudo make install
       kbuildsycoca4
       cd $HOME/src/kdevelop/build && make uninstall
       cd $HOME/src/kdevplatform/build && make uninstall
       git pull && make && make install
       kbuildsycoca4
       cd $HOME/src/kdevelop/build
       git pull && make && make install
       kbuildsycoca4

You can also see the latest changes and bug fixes of KDevPlatform and the latest changes and fixes of KDevelop on-line, updated every hour.

Retrieved from "http://www.kdevelop.org/mediawiki/index.php/KDevelop_4/compiling"

This page has been accessed 53,799 times. This page was last modified 12:04, 1 September 2010. Content is available under GNU Free Documentation License 1.2.


[Main Page]
Main Page
Community portal
Current events
Recent changes
Help
Donations

Edit this page
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports