Like I mentioned earlier, I followed the guide here : http://techbase.kde.org/Getting_Started/Build/KDE4 to build the latest and greatest KDE 4 from trunk. Unfortunately though, I am having problems getting KWin Composite (all those effects) to work on my laptop (running Linux Mint 4.0) which has the ATI Mobility Xpress 200M chipset. It has the fglrx driver installed with XGL and Compiz Fusion works fine but KWin doesn’t play nice with that setup for some reason. I even tried installing fglrx 8.42.3 which has experimental AIGLX support, but no go. I really want to play with KWin in all its glory, so here I am, building KDE 4 again, on another machine - this time, my desktop, which has an Nvidia GeForce FX 5200 card. I thought it’d be nice to document the process, just in case somebody wants to see the latest from KDE as well.
This machine had Ubuntu Gutsy Gibbon (7.10) on it which I dist-upgraded to Hardy Heron (8.04) a couple of weeks ago.
Before we begin, let me just tell you that this does not install KDE 4 “system-wide”. It is local to the user it is built under. You might want to create a new user and do this under that username.
1. Install all the prerequisite packages :
sudo apt-get install build-essential cdbs debhelper cmake kdesdk-scripts subversion ssh xserver-xephyr doxygen graphviz libqt4-dev dbus-x11 libstreamanalyzer-dev libstrigiqtdbusclient-dev libxml2-dev libxslt1-dev shared-mime-info libgif-dev libpcre3-dev libssl-dev libbz2-dev libpcre3-dev libxml2-utils libpcre3-dev libopenexr-dev libjasper-dev libenchant-dev libavahi-common-dev libaspell-dev libasound2-dev libboost-dev libgpgme11-dev libldap2-dev libsasl2-dev libxine-dev libqimageblitz-dev libsmbclient-dev libxkbfile-dev libxcb1-dev libxklavier12-dev libxdamage-dev libxcomposite-dev libbluetooth-dev libusb-dev libcaptury-dev network-manager-dev libsmbclient-dev libsoprano-dev libsensors-dev libpam0g-dev libnm-util-dev libusb-dev libcfitsio3-dev libnova-dev libeigen-dev libopenbabel-dev libfacile-ocaml-dev libboost-python-dev libqca2-dev libqca2-dev libqca2-dev libsvn-dev libsvncpp-dev libcommoncpp2-dev subversion
If you want Akonadi support, you’ll need to install the MySQL Server.
sudo apt-get install mysql-server
Akonadi is a common cross-desktop storage backend for PIM data. It’s part of the kdesupport package, which contains libraries that are not directly part of KDE but are required to support KDE.
2. Setup your .bashrc file (more information here) so all the required environment variables are in place. You’ll find the .bashrc file in your home directory (~/.bashrc). Click here to look at the .bashrc file that I am using.
3. Compile Qt 4.4. To compile KDE from trunk, we’ll first need to compile the latest Qt 4.4 snapshot from source (assuming your distribution does not already have the latest Qt packages in the repos).
Create a directory called “kde” in your home folder :
cd ~
mkdir kde
Create another directory, “src” inside “kde” :
cd kde
mkdir src
cd src
Get the latest snapshot of Qt 4.4 from SVN :
svn checkout svn://anonsvn.kde.org/home/kde/trunk/qt-copy
Apply patches and build Qt :
cd qt-copy
./apply_patches
./configure -debug -prefix $QTDIR
make -j2
make install
You should now have a build of Qt 4.4 installed in your home directory.
4. Compile kdesupport. Next, we need to build the kdesupport package. Checkout the latest snapshot from trunk and build it.
cd ~/kde/src/
svn checkout svn://anonsvn.kde.org/home/kde/trunk/kdesupport
cd kdesupport
cmakekde
If it says it cannot find the cmakekde command, make sure your .bashrc is setup properly. If you haven’t logged out and logged in after setting up ./bashrc yet, make sure you do :
source ~/.bashrc
and then try again. Stay alert at this point and check if CLucene libs are found so that Soprano is built with CLucene support. This is important if you want Nepomuk to work. Do note that the libclucene packages in Gutsy are not compatible, so if you are on Gutsy, you’ll need to get the latest snapshot from here and compile it yourself. If kdesupport has already been built, you’ll need to rebuild it once libclucene is in place. Just go back into the kdesupport directory and do a “cmakekde”.
5. Compile kdelibs. Checkout kdelibs and build it.
cd ~/kde/src/
mkdir KDE
cd KDE
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs
cd kdelibs
cmakekde
6. Build kdepimlibs. Checkout kdepimlibs and build it.
cd ~/kde/src/KDE
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepimlibs
cd kdepimlibs
cmakekde
7. Build kdebase. Checkout kdebase and compile it.
cd ~/kde/src/KDE
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase
cd kdebase
cmakekde
8. Compile other packages. Checkout and build all the other packages you need.
cd ~/kde/src/KDE
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeutils
cd kdeutils
cmakekde
cd ~/kde/src/KDE
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeadmin
cd kdeadmin
cmakekde
cd ~/kde/src/KDE
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdemultimedia
cd kdemultimedia
cmakekde
cd ~/kde/src/KDE
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdegraphics
cd kdegraphics
cmakekde
cd ~/kde/src/KDE
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeaccessibility
cd kdeaccessibility
cmakekde
cd ~/kde/src/KDE
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdegames
cd kdegames
cmakekde
cd ~/kde/src/KDE
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdenetwork
cd kdenetwork
cmakekde
For a complete list of available packages in SVN, look at http://websvn.kde.org/trunk/
9. Log into a KDE4 session. Create a file called kde4.desktop in your /usr/share/xsessions/ folder so that your login manager picks it up. Let it have the following contents :
[Desktop Entry]
Exec=/home/YOUR_USERNAME/kde/bin/startkde
TryExec=/home/YOUR_USERNAME/kde/bin/startkde
Name=KDE4
Comment=This session logs you into KDE 4
Edit the Exec and TryExec lines and replace YOUR_USERNAME with your username.
Log out. Select the KDE 4 session, log in and be greeted by a beautiful KDE desktop.
May 25th, 2008 at 8:59 am
Is it possible to do this alongside the Kubuntu Hardy KDE 4 Remix?
May 25th, 2008 at 9:13 am
> Is it possible to do this alongside the Kubuntu Hardy KDE 4 Remix?
I haven’t tried myself but I think it should be. The only problem for it would be to find the right libraries. Just make sure your .bashrc file is setup correctly.
Do let me know how it goes.
May 25th, 2008 at 2:00 pm
Yes, I will try it. A few questions before that though:
1). Did you install it alongside any existing desktop environment?
2). What is the process for updating this KDE through subversion - does it download everything again or only the modified source files?
3). Approximately how big is your source folder? I’ve never downloaded and compiled KDE or Qt from source before. I’ve also heard that Qt is quite big.
May 25th, 2008 at 3:10 pm
I found out that I can download the tarballs, extract them and update them directly after installing the dependencies. So nevermind the 2nd and 3rd question, but let me know about the 1st.
May 25th, 2008 at 3:14 pm
>> 1). Did you install it alongside any existing desktop environment?
Yes. I had Gnome already installed.
>> 2). What is the process for updating this KDE through subversion - does it download everything again or only the modified source files?
Just do an “svn up” and it downloads all the changes. Only the changes get downloaded.
>> 3). Approximately how big is your source folder? I’ve never downloaded and compiled KDE or Qt from source before. I’ve also heard that Qt is quite big.
I think Qt 4.4 is about 178.2 MB.
kdesupport - 39.1 MB.
kdelibs - 49 MB.
kdepimlibs - 10.8 MB.
kdebase - 114 MB.
kdeaccessibility - 9.8 MB.
kdeadmin - 5.5 MB.
kdeartwork - 48 MB.
kdebindings - 28.6 MB.
kdegames - 35.8 MB.
kdegraphics - 8.5 MB.
kdemultimedia - 3.5 MB.
kdenetwork - 25.9 MB.
kdeutils - 6.9 MB.
May 25th, 2008 at 3:18 pm
> I found out that I can download the tarballs, extract them and update them directly after installing the dependencies.
I recommend you use SVN. It’s easy to stay in sync with all the changes. With tarballs, you’d have to download entire packages each time (well, unless the tarballs also contained the SVN meta data).
May 25th, 2008 at 7:57 pm
The tarballs do contain SVN meta data. The packages have -svn suffix and I read on Techbase that you can do an “svn up” to update it immediately after compiling so you can get the latest build.
May 25th, 2008 at 8:15 pm
Is there any difference in your .bashrc and the one on Techbase? I can’t find anything noticeable on glancing briefly.
May 25th, 2008 at 8:20 pm
> Is there any difference in your .bashrc and the one on Techbase? I can’t find anything noticeable on glancing briefly.
That is correct, there is no difference. If you are doing this with your primary user account, you may already have something in your .bashrc that you may want to keep.
I’m going to replace Linux Mint 4.0 with Ubuntu Hardy on my laptop tomorrow. I’ll try to install KDE 4.1 b1 from trunk system-wide and see how it goes.
May 25th, 2008 at 9:25 pm
I found this Minimal CD Image and I’m planning to install a base system using this CD. Then I’ll install XFCE and compile KDE 4.1. I did this in Arch Linux (which is pretty minimal itself) with the difference being I used KDE 4.1 binaries from a repo that is updated daily. That meant downloading all the packages again so this should be better.