Notes on building KDE 4.4 ( from trunk )


Note & Disclaimer: I started writing this article in order to have a page where to collect all the info I need to build KDE trunk ( now is 4.4 ), instead of putting txt files everywhere on my hard drive. This article is not meant to be an exhaustive howto build a fully working KDE enviroment from svn; however I’ll try to be the more concise I can. At this moment, I’m running Ubuntu Jaunty with the latest updates.

Small, little advice: I found very very useful to put almost all the commands for each step in a separate text file named step#.sh, save them into a folder called kde-svn-scripts, then made them executable and finally run it as super-user ( following of course the numbering convention 😛 ). It’s more simple and fast than writing every single command by hand, believe me 😉

Step0: Dowloading some files =)

Since Ubuntu Jaunty doesn’t have the minimun required version for some files ( Karmic probably has them ), you have to download and unpack the following files:

Once you downloaded and unpacked these files, download and install the official KDE script to retrieve the svn code and compile it from here, unpack the zipped folder, made the script named kdesvn-build executable and move it to /usr/bin .

In your $HOME folder, download this file and save it as .kdesvn-buildrc . Feel free to modify it as you wish; by default, I enabled almost all the modules you can get from svn 😛

Step1: Cleaning up the enviroment.

The first thing we always have to do is remove everything related to KDE or QT that came up with your distro. Before doing this, remember to have an other desktop enviroment available so, if something goes wrong, you can use it to backup everything.

This command should be enough to remove all the packets we don’t need anymore:

$ sudo aptitude remove libqca2 libqimageblitz4 libsoprano4 libstreamanalyzer0 libstreams0 libstrigiqtdbusclient0 libqca1c2 qca-dev

Then, I suggest to reboot before performing step2.

Step2: Installing the required dependencies

Now it’s time to install the dependencies needed to successfully build KDE from trunk: that list is not yet complete, by the way contains all the needed libs and almost all the required ones. So, type this huge command:

$ sudo aptitude install build-essential cdbs debhelper cmake libxml2-dev libavahi-qt4-dev libxslt1-dev libbz2-dev librdf0-dev shared-mime-info dbus-x11 libxkbfile-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxext-dev libjpeg62-dev libical-dev libpng12-dev subversion libsm-dev libxinerama-dev libtiff4-dev libxrender-dev libfontconfig1-dev libboost-dev libxcursor-dev doxygen libungif4-dev libdbus-1-dev libgpgme11-dev libssl-dev libgpgme11-dev libasound2-dev kdesdk-scripts libpth-dev libjasper-dev ssh libxine-dev libglib2.0-dev libpcre3-dev diffstat libexpat-ocaml-dev libkipi0-dev libclucene-dev libclucene0ldbl libqt4-opengl-dev libexiv2-dev libqca2-dev quilt libspectre-dev xsltproc libqt4-dev libxtst-dev libxdamage-dev libxcomposite-dev x-dev libfam0 libfam-dev libaspell-dev libenchant-dev libsmbclient-dev libopenexr-dev libraw1394-dev libpulse-dev libpci-dev libcaptury-dev libusb-dev network-manager-dev libgphoto2-2-dev libpoppler-qt4-dev mysql-server-core-5.0 mysql-admin libeet-dev gstreamer0.10-plugins-base sun-java6-jdk libcppunit-dev libgstreamer-plugins-base0.10-dev libmono-dev libssh2-dev libiw-dev libxss-dev libslp-dev lm-sensors bluez libbluetooth-dev libgps-dev libxklavier12-dev libsasl2-dev acl flex bison

Now, take a coffe 🙂

When all the packages are downloaded and installed, you can start building and installing, in the following order: SIP, QZion, QEdje, Eigen2 and LZMA.

Step3: Running kdesvn script

Now the craved step: running kdesvn-build script! Simply type:

$ sudo kdesvn-build

and then wait about 5 hours to get everything compiled =)

Step4: Setting up the new environment

Now everything is correctly compiled and installed; the only thing to do is to tell your operating system where find the new executables.

Open you favourite editor, create a file called kdestart.sh and type the following commands:

#!/bin/sh
export QTDIR=/opt/qt4
export KDEDIR=/opt/kde4
export KDEHOME=$HOME/.kde4
export LD_LIBRARY_PATH=$KDEDIR/lib:$LD_LIBRARY_PATH
export PATH=$QTDIR/bin:$KDEDIR/bin:/usr/local/bin:$PATH
startkde

The text in red is required only if you build QT libraries from scratch; if you use QT libraries that comes out with your distro, simply remove these lines !

After doing this, move that file in usr/local/bin/ and make it executable by running chmod +x on it.

The next file will be created is named kde4.4.desktop filled with the following lines:

[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=/usr/local/bin/kdestart.sh
TryExec=/usr/local/bin/kdestart.sh
Name=KDE4.4

and then move it to /usr/share/xsessions/ .

That’s all !! Now restart the Xserver, and loging again selecting the kde4.4 entry and enjoy your new KDE 😉

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s