Building Instructions

From Spice

There are already instructions in the manual on spice-space, these are more cut and paste instructions, also they are more up to date at the moment.

Contents

Requirements

Server

x86_64 (64-bit) only. 32-bit (i386) is not supported, nor is ppc or anything else.

Client

Linux

  • autotools, relatively recent (some workaround like 'mkdir m4' mentioned below)
  • pixman >= 1.7.1 (any recent)
  • celt = 0.5.1.3 (this is important, newer versions use a different protocol)
  • alsa
  • log4cpp
  • openssl
  • libXrandr
  • cegui
  • libgcrypt-devel
  • pyparsing - only if you build from git (tarball releases don't require it)
  • dev86 (required for?)
  • iasl (and this?)
  • for smartcard:
    • nss

Fedora

sudo yum install -y pixman-devel celt051-devel cegui-devel libjpeg-devel\
alsa-lib-devel log4cpp-devel openssl-devel libXrandr-devel libgcrypt-devel\
SDL-devel dev86 iasl pyparsing

(note: libjpeg-devel brings in libjpeg-turbo-devel on F15+, which outperforms libjpeg)

For smartcard:

sudo yum install nss-devel

Ubuntu / Debian

See http://docs.cslabs.clarkson.edu/wiki/SPICE

Other distributions

TODO 

Smartcard

You need libcacard. For F14+ it is packaged already:

sudo yum install libcacard

For F13 or other distributions building from source:

git clone git://anongit.freedesktop.org/~alon/libcacard

Building libcacard on Fedora, installing to default: (on Ubuntu don't add --libdir)

cd libcacard
./configure --prefix=/usr --libdir=/usr/lib64
make
sudo make install

OS X

TODO

Windows

The prerequisites are available as binaries in one package on the download page.

Host

  • kvm supported by kernel (kernel >= X.X.X and config contains Y.Y.Y) (spice should work without kvm too, but it isn't tested)

Guest

Linux

virtio-serial support should be enabled (vdagent for linux, for clipboard support, has not been released yet, but it will require this).

Windows

Drivers for QXL are Drivers for virtio-serial assume XP SP3 / Win 7 (required for 0.5.2+ clipboard and seemless mouse without tablet support via vd-agent)

Other

No drivers exist at this time for other operating systems. Submissions welcome :)

Intro

These installation instructions assume you will be installing as a regular user. if you are installing as root you do not need to use prefix and it will default to /usr/local.

SRC_ROOT=$HOME/src/spice
INST_ROOT=$HOME/spice
if [ ! -e $SRC_ROOT ]; then mkdir -p $SRC_ROOT; fi
if [ ! -e $INST_ROOT ]; then mkdir -p $INST_ROOT; fi
export PKG_CONFIG_PATH=$INST_ROOT/lib/pkgconfig:$INST_ROOT/share/pkgconfig

Sources

Client only

cd $SRC_ROOT
# only if you don't have a recent pixman-1 ( >= 0.17.7)
#git clone git://cgit.freedesktop.org/pixman
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

Server and Client

In addition to "Client only":

cd $SRC_ROOT
git clone git://cgit.freedesktop.org/spice/qemu
# the branch is in flux - as of this writing the latest was spice.v13
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

Building

To build the client, do "Common", then "Client". To build the server bits as well, do "Common" followed by "Qemu, server and client"

Common

cd $SRC_ROOT/spice-protocol
./autogen.sh --prefix=$INST_ROOT
# if it complains about missing m4 directory do a
#mkdir m4
#./autogen.sh --prefix=$INST_ROOT
make install
cd $SRC_ROOT/celt-0.5.1.3
./configure --prefix=$INST_ROOT
make install
# only if you don't have a recent enough version of pixman (spice configure will complain if you need it)
#cd $SRC_ROOT/pixman
#./autogen.sh --prefix=$INST_ROOT
#make install

Client

If you want both server and client, jump to "Server and Client"

cd $SRC_ROOT/spice
./autogen.sh --prefix=$INST_ROOT
cd client
make install

To build with smartcard support (not enabled by default):

./autogen.sh --prefix=$INST_ROOT --enable-smartcard

Qemu, server and client

cd $SRC_ROOT/spice
./autogen.sh --prefix=$INST_ROOT
make install

To build with smartcard support (not enabled by default):

./autogen.sh --prefix=$INST_ROOT --enable-smartcard


Note: This is probably not an optimal build of qemu, just a minimum of flags to get a working build. (for instance, --enable-io-thread - recommended, but broken for me)

cd $SRC_ROOT/qemu
./configure --prefix=$INST_ROOT --target-list=x86_64-softmmu --enable-spice
make

To build with smartcard support (not enabled by default):

./configure --prefix=$INST_ROOT --target-list=x86_64-softmmu --enable-spice --enable-smartcard --enable-smartcard-nss

Windows client

1. Get latest spice & spice-protocol from git

git clone git://cgit.freedesktop.org/spice/spice-protocol
git clone git://cgit.freedesktop.org/spice/spice

2. Get & extract latest wspice libs - currently wspice-x86_20110308.zip & wspice-x64_20110308.zip from http://www.spice-space.org/download.html

3. Assuming you have <spice-dir>, <spice-protocol-dir>, <wspice-dir>, <build-dir>:

set REDC_BUILD_DIR=<build-dir>
set SPICE_PROTOCOL_DIR=<spice-protocol-dir>
set SPICE_LIBS=<wspice-dir>

4. Using VS2008 (we use 9.0.30729.1 SP), open & build:

<spice-dir>\client\windows\redc.sln

Running

See Running