This section is for distributions that don't have *spice* packages in their repositories. It will show you step by step how to build the required spice components.
autotools
gtk+2 > 2.18 or gtk+3
celt = 0.5.1.3 The exact version is required due to the lack of backwards compatibility in newer celt releases.
cyrus-sasl
pixman
openssl
pyparsing
usbredir
PolicyKit
KVM supported by kernel (It should work also without KVM, but it's not being tested as most Linux distrubitions already support KVM.)
spice-vdagent requires virtio-serial support to be enabled. This is described in the chapter Spice basics. Guest should have installed qxl driver (xorg-x11-drv-qxl on Fedora and RHEL).
This is a list of prerequisites on RHEL or Fedora. Install equivalent packages for your distribution in case that you're not using RHEL or Fedora.
All prerequisites for Windows are available in one big package which is available at http://spice-space.org/download.html.
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
Package prerequisites for Ubuntu
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
Fedora >=14 RHEL >=6.1 has libcacard already available. So you can install it directly trough yum.
yum install libcacard
Otherwise follow these instructions. The environment variable $BUILD_ROOT will point to a directory with stored sources and will be used during the whole build process. The variable $INST_ROOT will point to a directory in which Spice will be installed.
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
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
Skip this section if you don't want to build server side.
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
This part applies to both server and client build process.
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
cd $BUILD_ROOT/spice ./autogen.sh --prefix=$INST_ROOT --enable-smartcard cd client sudo make install
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. The following setup should be suitable for qemu and Spice built according to the instructions in this chapter.
echo "export PATH=$PATH:$INST_ROOT/bin:$BUILD_ROOT/x86_64-softmmu >> ~/.bashrc source ~/.bashrc
You should now be able to access the qemu-system-x86_64 and spicec binaries.