Please ask development related questions in the KDE Community Forum.
Getting Started/Build/KDE4/onVmWare
This describes how to set up a virtual machine running KDE from trunk on Linux.
Throughout the tutorial we use VMWare for virtualization and SUSE Linux 11.1 as distribution. Other combinations should work same or similar.
We use VMWare because I think compiling is faster with it.
Contents |
[edit] Install
Create a VMWare virtual machine. KDE 4 fits into 10 GB harddisk space. But as you start getting fun out of it, you will be happy about additional space. I recommend 40GB, one partition. In your VM, install SUSE Linux 11.1. Choose Gnome as desktop environment so you will have to un-install less KDE packages. All KDE packages would need to be uninstalled because they depend on the old QT 4.4.
To be able to log in to your VM using ssh, stop and disable the firewall:
rcSuSEfirewall2 stop chkconfig SuSEfirewall2_setup off chkconfig SuSEfirewall2_init off
Inside the VM, install some needed packages:
yast -i libopenssl-devel subversion gcc-c++ boost-devel libbz2-devel libxml2-devel pcre-devel \ libxslt-devel giflib-devel libjpeg-devel libgpgme-devel xorg-x11-devel glib2-devel libpng-devel \ make dbus-1-devel taglib-devel yast -i libmysqlclient-devel
Now you need to uninstall QT 4.4 because for the latest KDE, QT 4.5 is needed:
rpm -e libqt4 libQtWebKit4 python-qt4 libqdialogsolver1 libqt4-x11 libqt4-qt3support \n libqt4-x11 sax2-libsax-perl yast2-x11 sax2-libsax sax2-ident sax2-gui sax2 libqt4-sql \n yast2-qt yast2-qt-pkg libqt4-sql-mysql hplip
- Now it is time to do a snapshot from your VM.
You will be able to return to this machine state whenever you want.
If and only if you have a /lib64 path, you are on an x64 distribution.
[edit] on an x64 distribution
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.
cat >.bashrc<<EOF export KDEDIR=/usr/local alias cmakekde="cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull && make -j2 && make install" alias cmakekdelibs="cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull && make -j2 && make install" EOF
Now activate this file
. /root/.bashrc
[edit] on another distribution
Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.
cat >.bashrc<<EOF export KDEDIR=/usr/local alias cmakekde="cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull && make -j2 && make install" alias cmakekdelibs="cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull && make -j2 && make install" EOF
Now activate this file
. /root/.bashrc
[edit] Compile
[edit] cmake
You need cmake 2.6.2, so go to http://www.cmake.org/cmake/resources/software.html and download the latest version, in this example we choose 2.6.2:
cd wget http://www.cmake.org/files/v2.6/cmake-2.6.2.tar.gz tar xvzf cmake-2.6.2.tar.gz cd cmake-2.6.2 ./bootstrap && make -j2 && make install
[edit] Qt
As of 2009, QT 4.5 is needed for building KDE. So we need to compile it on our own. Before, remove all old Qt 4.4 packages.
- Note
- The compile lasts 80 minutes on a 2x2.4 GHz machine.
cd svn co https://svn.kde.org/home/kde/trunk/qt-copy cd qt-copy ./apply_patches && yes yes | ./configure -dbus -openssl -plugin-sql-mysql -prefix /usr && make -j2 && make install
[edit] libical
For kdepimlibs, libical 0.42 or higher is needed
cd wget http://heanet.dl.sourceforge.net/sourceforge/freeassociation/libical-0.43.tar.gz tar xvzf libical-0.43.tar.gz cd libical-0.43 ./configure && make -j2 && make install
[edit] kdesupport
cd svn co https://svn.kde.org/home/kde/trunk/kdesupport cd kdesupport cmakekde
[edit] kdelibs
KDELIBS requires an out-of-source build, that is why it is more complicated to build:
cd svn co https://svn.kde.org/home/kde/trunk/KDE/kdelibs mkdir kdelibs-build cd kdelibs-build cmakekdelibs
Verify it has been correctly installed - the following must be possible:
kde4-config --prefix /usr/local
[edit] kdepimlibs
cd svn co https://svn.kde.org/home/kde/trunk/KDE/kdepimlibs cd kdepimlibs cmakekde
[edit] kdebase
cd svn co https://svn.kde.org/home/kde/trunk/KDE/kdebase cd kdebase cmakekde
[edit] Config
Now stop your running display manager:
/etc/init.d/xdm stop
And start your self-compiled display manager:
kdm
To enable automated startup of your kdm, you need to change some SUSE-specific paths in /etc/init.d/xdm:
KDM_BIN=/usr/local/bin/kdm KDM4_BIN=/usr/local/bin/kdm
