Difference between revisions of "Getting Started/Build/KDE4/on virtual machines"

Jump to: navigation, search
(soprano)
(qtcreatOr)
 
(54 intermediate revisions by one user not shown)
Line 1: Line 1:
{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 11.4|happyreaders=2|unhappyreaders=0}}
+
{{Infobox tutorial|time=3 hours|type=HowTo|distribution=SUSE Linux 12.2|happyreaders=2|unhappyreaders=0}}
  
This describes the potential of using a virtual machine to contain development, for testing system level KDE tools like KDM without mucking up the rest of your system. Also, virtual machine snapshots can be shared with casual developers so they can have an up to date, rich environment for their minor fixes.
+
This describes how to use a virtual machine for building the latest KDE from sources.
 
+
In the included example, we set up KDE trunk on a Suse 11.4 Linux Virtual Machine. 
+
 
+
Basically nothing special except using root account directly.. And it is in a virtual machine, Note that the build requirements are moving targets so examples are all but useless.
+
 
+
We use KVM because it is faster than other free alternatives, and can use multiple processors.
+
  
 
= Virtual Machine Setup =
 
= Virtual Machine Setup =
Create a KVM virtual machine. KDE 4 fits into 10 GB minimum, [[User:Tstaerk|I]] recommend 40GB, one partition. As much ram as you can spare, You will need at least 1GB ram for the virtual machine, 4 doesnt hurt if you have it, install SUSE Linux 11.4.
+
Create a virtual machine, e.g. using [http://www.linuxintro.org/wiki/VirtualbOx VirtualBox]. Regarding harddisk: KDE 4 fits into 10 GB, however [[User:Tstaerk|I]] recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.
  
 
;You will need to set your SUSE CD as your virtual machine's cdrom.  
 
;You will need to set your SUSE CD as your virtual machine's cdrom.  
Line 22: Line 16:
 
  chkconfig sshd on
 
  chkconfig sshd on
 
Inside the VM, install some needed packages:
 
Inside the VM, install some needed packages:
  yast -i libopenssl-devel subversion gcc-c++ boost-devel libbz2-devel libxml2-devel pcre-devel \
+
  yast -i libqt4-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cyrus-sasl-devel libiodbc-devel \
libxslt-devel giflib-devel libjpeg-devel libgpgme-devel xorg-x11-devel glib2-devel libpng-devel \
+
  libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \
  make dbus-1-devel taglib-devel \
+
  boost-devel libqjson-devel libredland-devel xcb-util-image-devel
libmysqlclient-devel libmysqld-devel cmake libical-devel git cyrus-sasl-devel libredland-devel \
+
  libqt4-devel docbook-xsl-stylesheets libQtWebKit-devel phonon-devel doxygen
+
  
 
;Now it is time to do a snapshot or clone from your VM.
 
;Now it is time to do a snapshot or clone from your VM.
 
You will be able to return to this machine state whenever you want.
 
You will be able to return to this machine state whenever you want.
(you may want to do this again after you have downloaded all the stuff but before you muck with stuff)
 
  
 
== a few more steps ==
 
== a few more steps ==
Open a console as root
+
[http://www.linuxintro.org/wiki/open_a_console Open a console] as root
 
  su -
 
  su -
  
Line 76: Line 67:
  
 
= Aquire and Build KDE as root =
 
= Aquire and Build KDE as root =
If something fails you may need to make clean.
+
If something fails you may need to make clean and rm CMakeCache.
  
== kdesupport ==
+
== cmake ==
 +
Install the latest version of cmake:
 
  cd
 
  cd
  svn co svn://anonsvn.kde.org/home/kde/trunk/kdesupport
+
  wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
  cd kdesupport
+
  tar xvzf cmake-2.8.10.2.tar.gz
cmakekde
+
  cd cmake-2.8.10.2
 
+
  ./configure && make -j4 && make install
== raptor2 ==
+
You will need to compile raptor2 from http://librdf.org/raptor/ in order for Soprano to build its raptor2 parser plugin.
+
 
+
== soprano ==
+
Nepomuk from the kdelibs package requires soprano and its raptor2 parser plugin in order to be built.
+
  cd  
+
  git clone git://anongit.kde.org/soprano
+
cd soprano
+
cmakekde
+
  
 
== automoc ==
 
== automoc ==
 
automoc is needed for akonadi.
 
automoc is needed for akonadi.
 
  cd
 
  cd
  git clone git://anongit.kde.org/automoc
+
  git clone kde:automoc
 
  cd automoc
 
  cd automoc
cmakekde
 
 
== akonadi ==
 
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.
 
cd
 
git clone kde:akonadi
 
cd akonadi
 
 
  cmakekde
 
  cmakekde
  
Line 114: Line 90:
 
  cmakekde
 
  cmakekde
  
== strigi ==
+
== shared desktop ontologies ==
=== libstream ===
+
shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)
 
  cd
 
  cd
  git clone git://anongit.kde.org/libstreams
+
  wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2
  cd libstreams
+
tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2
  cmakekde
+
  cd shared-desktop-ontologies-0.10.0/
 +
  cmake . && make && make install
  
=== libstreamanalyzer ===
+
== soprano ==
 
  cd
 
  cd
  git clone git://anongit.kde.org/libstreamanalyzer
+
  git clone kde:soprano
  cd libstreamanalyzer
+
  cd soprano
 
  cmakekde
 
  cmakekde
 
== dbusmenuqt ==
 
cd
 
git clone git://gitorious.org/dbusmenu/dbusmenu-qt.git
 
cd dbusmenu-qt
 
cmakekde
 
 
== shared desktop ontologies ==
 
shared desktop ontologies is needed by kdepimlibs
 
cd
 
wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.5/shared-desktop-ontologies-0.5.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fapps%2Ftrac%2Foscaf%2F&ts=1283713100&use_mirror=freefr
 
bunzip2 shared-desktop-ontologies-0.5.tar.bz2
 
tar xvf shared-desktop-ontologies-0.5.tar
 
cd shared-desktop-ontologies-0.5/
 
cmake . && make && make install
 
  
 
== phonon ==
 
== phonon ==
 
Phonon is needed for kdebase-runtime
 
Phonon is needed for kdebase-runtime
 
  cd
 
  cd
  git clone git://anongit.kde.org/phonon
+
  git clone kde:phonon
git clone git://anongit.kde.org/phonon-directshow
+
git clone git://anongit.kde.org/phonon-gstreamer
+
git clone git://anongit.kde.org/phonon-mmf
+
git clone git://anongit.kde.org/phonon-quicktime
+
git clone git://anongit.kde.org/phonon-waveout
+
git clone git://anongit.kde.org/phonon-xine
+
 
  cd phonon
 
  cd phonon
 +
cmakekde
 +
 +
== akonadi ==
 +
Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.
 +
cd
 +
git clone kde:akonadi
 +
cd akonadi
 
  cmakekde
 
  cmakekde
  
 
== kdelibs ==
 
== kdelibs ==
 
KDELIBS requires an out-of-source build, that is why it is more complicated to build:
 
KDELIBS requires an out-of-source build, that is why it is more complicated to build:
 
 
  cd
 
  cd
 
  git clone kde:kdelibs
 
  git clone kde:kdelibs
Line 166: Line 128:
 
  kde4-config --prefix
 
  kde4-config --prefix
 
  /usr/local
 
  /usr/local
 +
 +
== nepomuk-core ==
 +
cd
 +
git clone kde:nepomuk-core
 +
cd nepomuk-core
 +
cmakekde
  
 
== kdepimlibs ==
 
== kdepimlibs ==
 +
kdepimlibs is needed for kde-runtime.
 
  cd
 
  cd
 
  git clone kde:kdepimlibs
 
  git clone kde:kdepimlibs
Line 173: Line 142:
 
  cmakekde
 
  cmakekde
  
=== TroubleShooting ===
+
== kactivities ==
If you get an error like
+
kactivities is needed for kde-workspace.
<pre>
+
cd
-----------------------------------------------------------------------------
+
  git clone kde:kactivities
-- The following REQUIRED packages could NOT be located on your system.
+
cd kactivities
-- You must install these packages before continuing.
+
cmakekde
-----------------------------------------------------------------------------
+
  * Nepomuk <http://www.kde.org>
+
    Support for the semantic desktop, including indexing of PIM data
+
    Nepomuk is part of kdelibs
+
</pre>
+
you must make sure Nepomuk is installed. Nepomuk is part of kdelibs. However, if you build kdelibs, you may or may not build Nepomuk. This depends on if soprano is installed.
+
  
 
== kdebase ==
 
== kdebase ==
 
  cd  
 
  cd  
git clone kde:konsole
 
 
  git clone kde:kde-baseapps
 
  git clone kde:kde-baseapps
 +
git clone kde:konsole
 
  git clone kde:kde-workspace
 
  git clone kde:kde-workspace
  git clone kde:kde-runtime
+
  git clone kde:kde-runtime  
  cd konsole
+
  cd kde-baseapps
 
  cmakekde
 
  cmakekde
 
  cd
 
  cd
  cd kde-baseapps
+
  cd konsole
 
  cmakekde
 
  cmakekde
 
  cd
 
  cd
Line 204: Line 167:
 
  cmakekde
 
  cmakekde
  
= Config =
+
= Next step =
First allow root login. You will need it as you do not have another login:
+
Now you can start developing. Best, install QtCreator:
  sed -i "s/AllowRootLogin.*/AllowRootLogin=true/g" /usr/local/share/config/kdm/kdmrc
+
  yast -i qt-creator
Now stop your running display manager:
+
And learn how to create a new KDE project or import an existing one by reading [[qtcreator]].
/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
+

Latest revision as of 09:34, 27 January 2013


Tutorial Factbox
Time to replay 3 hours
Example Distro SUSE Linux 12.2
Type HowTo
Happy readers 2
Unhappy readers 0

This describes how to use a virtual machine for building the latest KDE from sources.

Contents

[edit] Virtual Machine Setup

Create a virtual machine, e.g. using VirtualBox. Regarding harddisk: KDE 4 fits into 10 GB, however I recommend 40GB, one partition. Regarding RAM: You will need at least 1GB ram for the virtual machine, of course more is better.

You will need to set your SUSE CD as your virtual machine's cdrom.

[edit] setup for SSH

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
/etc/init.d/sshd start
chkconfig sshd on

Inside the VM, install some needed packages:

yast -i libqt4-devel pcre-devel libxslt-devel libxml2-devel docbook-xsl-stylesheets git cyrus-sasl-devel libiodbc-devel \
libdbusmenu-qt-devel giflib-devel strigi-devel libQtWebKit-devel libqimageblitz-devel libical-devel libgpgme-devel \
boost-devel libqjson-devel libredland-devel xcb-util-image-devel
Now it is time to do a snapshot or clone from your VM.

You will be able to return to this machine state whenever you want.

[edit] a few more steps

Open a console as root

su -

[edit] on an x64 distribution

If and only if you have a /lib64 path, you are on an x64 distribution. Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.

cd
cat >.bashrc<<EOF 
export KDEDIR=/usr/local         
alias cmakekde="cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull && make -j8 && make install"
alias cmakekdelibs="cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DLIB_SUFFIX=64 -DCMAKE_BUILD_TYPE=debugfull && make -j8 && make install"
alias makeqt="./configure -dbus -openssl -plugin-sql-mysql -libdir /usr/lib64 -prefix /usr && make -j8 && make install"
export QTDIR=/usr
EOF
cat >.gitconfig<<EOF
[url "git://anongit.kde.org/"]
    insteadOf = kde:
[url "ssh://git@git.kde.org/"]
    pushInsteadOf = kde:
EOF

Now activate this file

. /root/.bashrc

[edit] on another distribution (incl 32bit)

Make sure you have the needed environment variables and alias set by having a file /root/.bashrc.

cd
cat >.bashrc<<EOF
export KDEDIR=/usr/local         
alias cmakekde="cmake . -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull && make -j8 && make install"
alias cmakekdelibs="cmake ../kdelibs -DCMAKE_INSTALL_PREFIX=\$KDEDIR -DCMAKE_BUILD_TYPE=debugfull && make -j8 && make install"
alias makeqt="./configure -dbus -openssl -plugin-sql-mysql -prefix /usr && make -j8 && make install"
export QTDIR=/usr
EOF
cat >.gitconfig<<EOF
[url "git://anongit.kde.org/"]
    insteadOf = kde:
[url "ssh://git@git.kde.org/"]
    pushInsteadOf = kde:
EOF

Now activate this file

. /root/.bashrc

[edit] Aquire and Build KDE as root

If something fails you may need to make clean and rm CMakeCache.

[edit] cmake

Install the latest version of cmake:

cd
wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz
tar xvzf cmake-2.8.10.2.tar.gz
cd cmake-2.8.10.2
./configure && make -j4 && make install

[edit] automoc

automoc is needed for akonadi.

cd
git clone kde:automoc
cd automoc
cmakekde

[edit] libattica

cd
git clone kde:attica
cd attica
cmakekde

[edit] shared desktop ontologies

shared desktop ontologies is needed by kdepimlibs in order to build Nepomuk (which is a part of kdelibs)

cd
wget http://downloads.sourceforge.net/project/oscaf/shared-desktop-ontologies/0.10.0/shared-desktop-ontologies-0.10.0.tar.bz2
tar xvjf shared-desktop-ontologies-0.10.0.tar.bz2
cd shared-desktop-ontologies-0.10.0/
cmake . && make && make install

[edit] soprano

cd
git clone kde:soprano
cd soprano
cmakekde

[edit] phonon

Phonon is needed for kdebase-runtime

cd
git clone kde:phonon
cd phonon
cmakekde

[edit] akonadi

Akonadi keeps personal information management data in a mysql database. It is needed for KDEPIMLIBS.

cd
git clone kde:akonadi
cd akonadi
cmakekde

[edit] kdelibs

KDELIBS requires an out-of-source build, that is why it is more complicated to build:

cd
git clone 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] nepomuk-core

cd
git clone kde:nepomuk-core
cd nepomuk-core
cmakekde

[edit] kdepimlibs

kdepimlibs is needed for kde-runtime.

cd
git clone kde:kdepimlibs
cd kdepimlibs
cmakekde

[edit] kactivities

kactivities is needed for kde-workspace.

cd
git clone kde:kactivities
cd kactivities
cmakekde

[edit] kdebase

cd 
git clone kde:kde-baseapps
git clone kde:konsole
git clone kde:kde-workspace
git clone kde:kde-runtime 
cd kde-baseapps
cmakekde
cd
cd konsole
cmakekde
cd
cd kde-workspace
cmakekde
cd
cd kde-runtime
cmakekde

[edit] Next step

Now you can start developing. Best, install QtCreator:

yast -i qt-creator

And learn how to create a new KDE project or import an existing one by reading qtcreator.


This page was last modified on 27 January 2013, at 09:34. This page has been accessed 33,281 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal