2

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.

zzzhhh
  • 227
  • 3
  • 10
  • All packages required for building source code with e.g. meson must be (lib)name-dev → Example → `sudo apt install libpango1.0-dev` https://packages.ubuntu.com/search?keywords=pango&searchon=names – Knud Larsen Nov 29 '21 at 17:44

1 Answers1

2

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
    
N0rbert
  • 97,162
  • 34
  • 239
  • 423