当前位置: 首页 > 工具软件 > Spice-GTK > 使用案例 >

编译新版本spice-gtk

凌蕴藉
2023-12-01

在CentOS 7环境下编译新版本spice-gtk,但是碰到几个问题:

spice-protocol协议版本要求。
在spice-gtk中,运行./autogen,提示spice-protocol版本不匹配。从git上clone当前spice-protocol,autogen,configure,make,make install。还是同样的错误提示出来。
经过比较发现,CentOS通过yum install的spice-protocol安装的位置/usr/include下,其中pkg-config的pc文件路径在/usr/share/pkgconfig/spice-protocol.pc。
但是git下代码安装的路径在/usr/local下。
pkg-config首先判断到/usr/share下的pc文件,那/usr/local/share下的pc文件就不起作用了。

那重新编译git下的内容,./configure –prefix=/opt/local,安装到指定路径下。

尝试:
export SPICE_PROTOCOL_CFLAGS=/opt/local/include/spice-1
export SPICE_PROTOCOL_LIBS=
不起作用。

最后:
export PKG_CONFIG_PATH=/opt/local/share/pkgconfig
顺利通过这个问题。

安装spice-gtk需要的包
spice-gtk的README要求安装很多包:

. or install:

gtk3-devel spice-protocol intltool
openssl-devel pulseaudio-libs-devel pixman-devel
gobject-introspection-devel libjpeg-turbo-devel zlib-devel
cyrus-sasl-devel gtk-doc

. The GStreamer backend needs:

gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-plugins-good gstreamer1-plugins-bad-free

. If you build from git, you'll also need:

libtool automake vala vala-tools perl-Text-CSV

大部分直接安装都没有问题,除了perl-Text-CSV。
通过yum install perl-Text-CSV是找不到的,只有一个perl-Text-CSV-XS的包。但是在spice-gtk的autogen的时候,还是会找不到perl-Text-CSV。

$ perl -MCPAN -e shell
cpan> install Text::CSV_XS

即可解决该包的缺失。

然后,autogen提示epoxy包缺失,继续yum install libepoxy-develyum install libepoxy

后提示configure: WARNING: The avdec_h264 GStreamer element(s) are missing. You should be able to find them in the gstreamer-libav 1.0 package.
yum也找不到相关的库,目前无法继续编译

 类似资料: