summaryrefslogtreecommitdiff
path: root/books/docbook/chunks/ch02s02.html
blob: 001880a1ca3f93ec412fc06e4408ca6b9d06ba48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title>Building Spice in Generic Linux</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"><link rel="home" href="index.html" title="Spice User Manual"><link rel="up" href="ch02.html" title="Chapter&nbsp;2.&nbsp;Installation"><link rel="prev" href="ch02.html" title="Chapter&nbsp;2.&nbsp;Installation"><link rel="next" href="ch03.html" title="Chapter&nbsp;3.&nbsp;Spice basics"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Building Spice in Generic Linux</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02.html">Prev</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;2.&nbsp;Installation</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch03.html">Next</a></td></tr></table><hr></div><div class="section" title="Building Spice in Generic Linux"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="linux_generic"></a>Building Spice in Generic Linux</h2></div></div></div><p>
            This section is for distributions that don't have *spice* packages in their repositories.
            It will show you step by step how to build required spice components.
        </p><div class="section" title="Client requirements"><div class="titlepage"><div><div><h3 class="title"><a name="req_client"></a>Client requirements</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p><span class="bold"><strong>autotools</strong></span></p></li><li class="listitem"><p><span class="bold"><strong>pixman &gt;= 1.7.1</strong></span></p></li><li class="listitem"><p><span class="bold"><strong>celt = 0.5.1.3</strong></span> The exact version is required due no backwards compatibility of celt.</p></li><li class="listitem"><p><span class="bold"><strong>alsa</strong></span></p></li><li class="listitem"><p><span class="bold"><strong>log4cpp</strong></span></p></li><li class="listitem"><p><span class="bold"><strong>openssl</strong></span></p></li><li class="listitem"><p><span class="bold"><strong>libXrandr</strong></span></p></li><li class="listitem"><p><span class="bold"><strong>cegui</strong></span></p></li><li class="listitem"><p><span class="bold"><strong>libgcrypt-devel</strong></span></p></li><li class="listitem"><p><span class="bold"><strong>pyparsing</strong></span></p></li><li class="listitem"><p><span class="bold"><strong>dev86</strong></span></p></li><li class="listitem"><p><span class="bold"><strong>iasl</strong></span></p></li><li class="listitem"><p><span class="bold"><strong>nss</strong></span></p></li></ol></div></div><div class="section" title="Host requirements"><div class="titlepage"><div><div><h3 class="title"><a name="req_host"></a>Host requirements</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p><span class="bold"><strong>KVM supported by kernel</strong></span> (It should work also without KVM, but
                        it's not being tested as most Linux distrubitions already support
                        KVM.)</p></li></ol></div></div><div class="section" title="Guest requirements"><div class="titlepage"><div><div><h3 class="title"><a name="d0e312"></a>Guest requirements</h3></div></div></div><div class="section" title="Linux Guest"><div class="titlepage"><div><div><h4 class="title"><a name="d0e315"></a>Linux Guest</h4></div></div></div><p>
                    spice-vdagent requires virtio-serial support should to be enabled. This will be described in <a class="link" href="SpiceUserManual-Basics.xml#basics" target="_top">chapter Spice basics</a>.
                    Guest should have installed qxl driver (xorg-x11-drv-qxl on Fedora and RHEL).
                </p></div><div class="section" title="Windows Guest"><div class="titlepage"><div><div><h4 class="title"><a name="d0e323"></a>Windows Guest</h4></div></div></div><p>
                    Drivers for QXL and drivers for virtio-serial assume Win XP SP3 and Win 7.
                </p></div><div class="section" title="Setting up build environment"><div class="titlepage"><div><div><h4 class="title"><a name="setting_be"></a>Setting up build environment</h4></div></div></div><p>
                    <span class="bold"><strong>This is list of prerequisities on RHEL or Fedora. Install
                        package equivalents for your distrubition in case that you're not using RHEL
                        or Fedora.</strong></span>
                </p><p>
                    <span class="bold"><strong>All prerequisities for Windows are available in one big package which is available 
                        at <a class="link" href="http://spice-space.org/download.html" target="_top">http://spice-space.org/download.html</a>.</strong></span>
                </p><pre class="screen">yum install git pixman-devel celt051-devel cegui-devel libjpeg-devel alsa-lib-devel log4cpp-devel \
                openssl-devel libXrandr-devel libgcrypt-devel SDL-devel nss-devel dev86 iasl pyparsing</pre><p>
                    <span class="bold"><strong>Package prerequisities for Ubuntu</strong></span>
                </p><pre class="screen">apt-get install build-essential autoconf git-core libtool liblog4cpp5-dev libavcodec-dev \
                libssl-dev xlibmesa-glu-dev libasound-dev libpng12-dev libfreetype6-dev libfontconfig1-dev \
                libogg-dev libxrandr-dev kvm libgcrypt-dev libsdl-dev</pre></div><div class="section" title="Building libcacard"><div class="titlepage"><div><div><h4 class="title"><a name="building_libcacard"></a>Building libcacard</h4></div></div></div><p>Fedora &gt;=14 RHEL &gt;=6.1 has libcacard already available. So you can install it directly trough yum.</p><pre class="screen">yum install libcacard</pre><p>Otherwise follow these instructions. <span class="bold"><strong>Environmental
                        variable $BUILD_ROOT will point to a directory with stored sources and will
                        be used during whole build process. Variable $INST_ROOT will point to a
                        directory in which will be spice installed.</strong></span></p><pre class="screen">export BUILD_ROOT=/tmp/spice; mkdir $BUILD_ROOT; cd $BUILD_ROOT;
export INST_ROOT="/opt/spice"; mkdir $INST_ROOT
git clone git://anongit.freedesktop.org/~alon/libcacard
cd libcacard
./configure --prefix=/usr --libdir=/usr/lib64 # Ignore --libdir at Ubuntu
make
make install</pre></div><div class="section" title="Getting client sources"><div class="titlepage"><div><div><h4 class="title"><a name="getting_client"></a>Getting client sources</h4></div></div></div><pre class="screen">cd $BUILD_ROOT
git clone git://cgit.freedesktop.org/spice/spice-protocol
git clone git://cgit.freedesktop.org/spice/spice
wget http://downloads.us.xiph.org/releases/celt/celt-0.5.1.3.tar.gz
tar xvzf celt-0.5.1.3.tar.gz
                </pre></div><div class="section" title="Getting client/server sources"><div class="titlepage"><div><div><h4 class="title"><a name="getting_server"></a>Getting client/server sources</h4></div></div></div><p>Skip this section if you don't want to build server side.</p><pre class="screen">cd $BUILD_ROOT
git clone git://cgit.freedesktop.org/spice/qemu
cd qemu; git checkout -b spice.v13 origin/spice.v13; cd ..
git clone git://cgit.freedesktop.org/spice/spice-protocol
git clone git://cgit.freedesktop.org/spice/spice
git clone git://cgit.freedesktop.org/spice/win32/vd_agent
git clone git://cgit.freedesktop.org/spice/win32/qxl
git clone git://cgit.freedesktop.org/spice/slirp
wget http://downloads.us.xiph.org/releases/celt/celt-0.5.1.3.tar.gz
tar xvzf celt-0.5.1.3.tar.gz</pre></div><div class="section" title="Building common sources."><div class="titlepage"><div><div><h4 class="title"><a name="building_common"></a>Building common sources.</h4></div></div></div><p>This part applies to both server and client build process.</p><pre class="screen">cd $BUILD_ROOT/spice-protocol
mkdir m4
./autogen.sh --prefix=$INST_ROOT
sudo make install
cd $BUILD_ROOT/celt-0.5.1.3
./configure --prefix=$INST_ROOT
sudo make install
</pre></div><div class="section" title="Building client side tools"><div class="titlepage"><div><div><h4 class="title"><a name="d0e385"></a>Building client side tools</h4></div></div></div><pre class="screen">cd $BUILD_ROOT/spice
./autogen.sh --prefix=$INST_ROOT --enable-smartcard
cd client
sudo make install</pre></div><div class="section" title="Building server side tools"><div class="titlepage"><div><div><h4 class="title"><a name="d0e390"></a>Building server side tools</h4></div></div></div><p>These instruction contains flags for minimal working build of qemu with spice support enabled.
                    You might want to build qemu with  --enable-io-thread options</p><pre class="screen">cd $SRC_ROOT/qemu
./configure --prefix=$INST_ROOT --target-list=x86_64-softmmu --enable-spice
make</pre></div></div><div class="section" title="Setting up PATH"><div class="titlepage"><div><div><h3 class="title"><a name="d0e397"></a>Setting up PATH</h3></div></div></div><p>Last steps before starting with spice are to set proper PATH variable.
            For example RHEL is using /usr/libexec as directory for spicec and qemu-kvm binaries.
            Following setup should be suitable for qemu and spice build according to instructions in 
            this chapter.</p><pre class="screen">echo "export PATH=$PATH:$INST_ROOT/bin:$BUILD_ROOT/x86_64-softmmu &gt;&gt; ~/.bashrc
source ~/.bashrc</pre><p>You should now be able to access qemu-system-x86_64 and spicec binaries.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;2.&nbsp;Installation&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;3.&nbsp;Spice basics</td></tr></table></div></body></html>