Error "cannot enable SPICE if pixman is not available"
I am running Ubuntu 22.04.3 on a normal x86_64, which comes with QEMU 6.2. I want to simulate a Raspberry Pi 3, but I get a black screen, that is, the frame buffer emulation does not work. I heard that there were some problems in the past emulating the Raspberry Pi video card, so I thought I should try with a newer QEMU version.
Unfortunately, I found no pre-built PPA, Docker image, AppImage or the like, so am now trying to build QEMU 8.2.1 from sources. I found some build instructions here:
https://wiki.qemu.org/Hosts/Linux
I thought that those instructions are somewhat simplistic. A few examples: There is no indication about what QEMU features you may want to enable in order to simulate a Raspberry Pi with video. There is a "PNG support" feature, which I wonder whether it is worth enabling for my purposes. There is no advice either about what dependencies each QEMU feature actually needs. The standard way of specifying compiler flags with ./configure CFLAGS="xxx" does not work. The standard "make install" is not mentioned (do you need to keep all build artifacts then?). Enabling 'spice' does not enable the "spice protocol support" (is that spice protocol worth enabling then?). It wouldn't hurt having some more extra information in the configuration tool or in the Wiki page about such things.
After some struggle, I managed to build QEMU, and then I was surprised that qemu-img wasn't there. It turns out that you need to enable "tools", described as "build support utilities that come with QEMU". All a little complicated really.
Anyway, I came up with the following incantation, which may not be quite right:
./configure --extra-cflags="-O3 -march=native -flto" \
--extra-cxxflags="-O3 -march=native -flto" \
--prefix="$HOME/rdiez/LocalSoftware/QEMU/qemu-8.2.1-bin" \
--target-list=aarch64-linux-user \
--enable-sdl \
--enable-spice \
--enable-gtk
That yielded this error:
ERROR: Feature spice cannot be enabled: cannot enable SPICE if pixman is not available
I found that surprising because libpixman-1-dev was actually installed.
But then I realised the following: If I add option --enable-tools
to the ./configure command above, then pixman is actually detected:
User interface
SDL support : YES 2.0.20
SDL image support : YES 2.0.5
GTK support : YES
pixman : YES 0.40.0
VTE support : NO
PNG support : NO
VNC support : NO
spice protocol support : NO
curses support : NO
brlapi support : NO
I found that a little too awkward, so I decided to file this bug.