./configure error: The test for linking against libxcb and support libraries failed

I'm trying to build Qt5 on Debian Wheezy. I run the configure script:

./configure -developer-build -opensource -nomake examples -nomake tests

But it fails with this error:

Running configuration tests...
The test for linking against libxcb and support libraries failed!
 You might need to install dependency packages, or pass -qt-xcb.
 See src/plugins/platforms/xcb/README.

I get this error even though libxcb1-dev has already been installed.

There is a similar question, you can look at it for reference - Qt5 install on OSX -qt-xcb, but it is about OS X, and the suggested solutions there won't work for Linux I think.

Is there a way to enable XCB, or should I just pass -qt-xcb as suggested in the error message? Would the build be missing any vital features then?

Answers


The page Qt for X11 Requirements lists some packages required to build Qt on Debian.

The README mentioned in the error message also lists packages for Ubuntu and Fedora, so check one of those two places if the following dependencies don't help.

Alternatively you could try the "-qt-xcb" flag as it suggests. According to the above page this just builds some libraries in instead of linking against the system libraries.

Debian:

libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev

Ubuntu:

libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-sync0 libxcb-sync0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-glx0-dev

Fedora

libxcb libxcb-devel libXrender libXrender-devel xcb-util-wm xcb-util-wm-devel xcb-util xcb-util-devel xcb-util-image xcb-util-image-devel xcb-util-keysyms xcb-util-keysyms-devel


This is actually just my experience with the same problem in Ubuntu. The libraries as given by Miss Blit are correct, except from libxcb-sync0 libxcb-sync0-dev, these should be libxcb-sync1 libxcb-sync-dev. I have Ubuntu 14.10

Regards,


Try to install these libraries for my fix the issue on ubuntu 16.4.

sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev

Need Your Help

Git submodule add: "a git directory is found locally" issue

git git-submodules

I'm actually trying to learn how to use git, including the git submodule subcommands.