在ubuntu10.04上安装spice-gtk-0.9:
一、安装glib
glib-2.31.0依赖包:apt-get install (libffi-dev,gettext,zlib1g-dev)
二、安装cairo
cairo-1.10.0依赖包:pixman-0.24.0,libpng12-dev,libfreetype6-dev,libX11-1.4.99.1(libx11-xcb-dev)
在安装libX11时候需要安装依赖包:xextproto-7.0.3、inputproto-2.1.99.6、xtrans-dev、libxcb1-dev、x11proto-kb-dev
报错:configure.ac:24: error: must install xorg-macros 1.15 or later before running autoconf/autogen
安装依赖包:util-macros-1.16.0.tar.gz (--prefix=/usr)
报错checking keysym definitions... configure: error: Cannot find keysymdef.h
安装依赖包:xproto-xproto-7.0.19
三、安装gobject-introspection
gobject-introspection之前,先安装glib和cairo。
编译atk、gtk之前最好先编译gobject-introspection,以免出现不必要的问题。
gobject-introspection-1.30.0:flex,bison,(python-gobject-dev)
四、安装atk
atk-2.2.0:编译atk-2.2.0是依赖glib,在configure的时候,提示发现多个版本的glib,配置LD_LIBRARY_PATH变量到需要指 定的glib库路径.
五、安装pango
pango-1.29.4
编译pango时候,./configure 出现下面信息才能成功编译gtk:
config.status: pango/pango-features.h is unchanged
configuration:
backends:Cairo FreeType X
编译pango报错:
./.libs/libpangocairo-1.0.so: undefined reference to `cairo_ft_font_options_substitute'
./.libs/libpangocairo-1.0.so: undefined reference to `cairo_ft_font_face_create_for_pattern'
重新编译cairo:./autogen.sh --prefix=/usr/local --enable-xlib=yes --enable-ft=yes &&make &&make install
六、编译gtk
gtk+-3.2.0:gdk-pixbuf-2.24.0、libtiff4-dev,fontconfig-2.8.0(libxml2-dev),libglib2.0-dev,libxrandr-dev
编译时候报错:
Gdkdeviceprivate-xi.h:28:35: error: X11/extensions/XInput.h:No such file or directory
编译libXi-1.5.99.3包,XInput.h头文件在该包中。(依赖包:libxext-dev)
七、安装spice-gtk部分依赖包
python-pyparsing
cp CSV.pm CSV_PP.pm /usr/lib/per/5.10/Text
celt-0.5.1.3:libogg-dev
spice-protocol-0.10.1
libglobus-openssl-dev
libgudev-1.0-dev
libusb-1.0.9
Usbredir-0.3.3
vala-0.14.2
编译vala-0.14.2版本的时候报错:
valacodewriter.vala:1498.54-1498.59: error: The name `name' does not
exist in the context of `G'
attributes.insert_sorted (attr, (a, b) => strcmp (a.name, b.name));
解决方法:在网上查了很多,都没解决得了,最后把包删了,重新解压下载包编
译没问题
八、最后安装spice-gtk
spice-gtk-0.9
./autogen.sh --prefix=/usr/local --enable-smartcard=no --with-sasl=no --with-audio=no --enable-usbredir=yes
本文总结为本人第一次编译成功,还存在大量不足之处,如有问题,还望大家帮助,谢谢!