Back to Spice

Tuesday, April 11, 2017

In order to validate the theory that the problem with 3D acceleation on f25-muse is related to the viewer only, I am rebuilding the whole Spice package.

Running the following with the built-in virt-viewer shows the same display artefacts:

virt-viewer -c qemu:///system f25-muse

Building spice-gtk

The spice-protocol packages build directly. However, the build of spice-gtk fails with:

make[4]: Entering directory '/home/ddd/Work/spice/spice-gtk/spice-common/common'
  GEN      generated_client_demarshallers.c

I had already run into that on March 8 (I love the new blog format for the speed at which I can find this kind of thing with a mere grep). But the solution that worked back then, pip install six, does not work this time.

This is a failure in spice-common/common. The Makefile looks like this:

generated_client_demarshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS)
	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include common/messages.h $< $@ >/dev/null

Running the command make -n to see the command as it is executed. Then execute it manually:

ddd@muse[master] common> /usr/bin/python ../spice_codegen.py --generate-demarshallers --client --include common/messages.h ../spice.proto generated_client_demarshallers.c
Module pyparsing not found.

Why does python send this message on stdout and not stderr? Tested that by adding > /dev/null at end of command.

Fixing with:

 pip install pyparsing 
. Next error is:
  GISCAN   SpiceClientGLib-2.0.gir
gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
Traceback (most recent call last):

This specific error is fixed by installing redhat-rpm-config:

dnf install redhat-rpm-config

Missing codecs from configure:

configure: WARNING: The avdec_h264 GStreamer element(s) are missing. You should be able to find them in the gstreamer-libav 1.0 package.

Fixed with:

dnf install gstreamer1-libav

Building virt-viewer

This one had some patches from me. Rebased on a recent master. Interestingly, the origin no longer works, it was https://git.fedorahosted.org/git/virt-viewer.git. Found https://pagure.io/virt-viewer.git with some commits from 6 days ago.

Running autogen.sh is missing some functionality, specifically GTK_VNC, LIBVIRT and OVIRT:

configure:        GLIB2: -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38     -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_38 -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -pthread -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0
configure: 
configure:          GTK: -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_10     -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_10 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
configure: 
configure:      GTK_VNC:  
configure: 
configure:    SPICE_GTK: -pthread -I/usr/local/include/spice-1 -I/usr/local/include/spice-client-gtk-3.0 -I/usr/local/include/spice-client-glib-2.0 -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -L/usr/local/lib -lspice-client-gtk-3.0 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lspice-client-glib-2.0
configure: 
configure:      LIBXML2: -I/usr/include/libxml2 -lxml2
configure: 
configure:      LIBVIRT:  
configure: 
configure:        OVIRT:  
configure: 

Had to install some additional optional elements to get a full-featured virt-viewer:

dnf install gtk-vnc-devel gtk-vnc2-devel libvirt-devel libgovirt-devel

Very strangely, autogen.sh fails after adding the packages:

checking for LIBVIRT... no
configure: error: Package requirements (libvirt >= 0.10.0 libvirt-glib-1.0 >= 0.1.8) were not met:

No package 'libvirt-glib-1.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBVIRT_CFLAGS and LIBVIRT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

Apparently, I also need

dnf install libvirt-glib-devel
.

Finally built virt-viewer from master, same issue on the display. Ah, interesting.