Which package is pango that is needed to compile Qemu with --enable-gtk enabled?

I'm compiling Qemu with --enable-gtk enabled. .configure gives me the following error messages:

Run-time dependency gtk+-3.0 found: NO

../meson.build:1042:2: ERROR: Could not generate cargs for gtk+-3.0:
Package pango was not found in the pkg-config search path.
Perhaps you should add the directory containing `pango.pc'
to the PKG_CONFIG_PATH environment variable
Package 'pango', required by 'gdk-3.0'(is this a typo?), not found


A full log can be found at .../qemu-6.2.0-rc2/build/meson-logs/meson-log.txt

ERROR: meson setup failed

I searched in Ubuntu package search webpage for 'pango', but it gives me so many results that I don't know which one is the correct 'pango' I should install to pass the gtk-3 configure. So, what is the package name for 'pango' that gtk+-3.0 needs?

PS, I'm on Ubuntu 20.04 and the Qemu I'm trying to build is 6.2.


Solution 1:

There are many tools involved into building process. One of them is pkg-config. It searches for files with .pc extension. For Gtk3 and Pango you need to install the following packages:

sudo apt-get install libgtk-3-dev libpango1.0-dev

But finding and installing every single package may be time consuming procedure. So you have two options here:

  • install build-dependencies for existing QEMU by

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get build-dep qemu
    

    and then compile newer QEMU on your own.

  • install newer binary QEMU 6.0 from PPA using commands below:

    sudo add-apt-repository ppa:flexiondotorg/quickemu
    sudo apt-get update
    sudo apt-get install qemu