Search code examples
buildpthreadsqemudebian-buster

ERROR building qemu: pthread check failed


I am trying to build qemu on Debian buster for amd64 with --target-list="i386-softmmu x86_64-softmmu".

But getting error

ERROR: pthread check failed
       Make sure to have the pthread libs and headers installed.

Searched on internet and stackoverflow and checked that I have installed the following libraries that were told to provide the pthread libs and headers.

libc6 libc6-dev libpth-dev libpthread-stubs0-dev

What am I missing? Which Debian package to install to solve this issue?

Thanks in advance.


Solution

  • With Debian based distributions, the easiest way to ensure you have all the build dependencies installed is to make sure your apt sources.list includes deb-src lines, and then use "apt build-dep qemu". This will install everything needed to build the distro's version of QEMU, which is generally pretty much what you want for a build from source.

    If you've done that and are still seeing issues: make sure you're building a recent QEMU and not some ancient version.