Compiling a static x11 program fails using the output of: pkg-config --static --libs x11
The problem appears to be -lpthread shows up only before -lxcb. There's something a bit odd in the pkg-config files. x11.pc has pthread in Libs.private, and xcb has pthread-stubs in Requires.private. However pthread-stubs isn't actually adding the -l flag to the output, and the resulting ordering breaks my build. So, which package should be correct: x11 or xcb? Should the pthread-stubs have -lpthread in Libs.private? My versions: ibxcb1-dev 1.11.1-1 libx11-dev 2:1.6.3-1 libpthread-stubs0-dev 0.3-4 Rafi