Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c++

linux

qt

debian

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?

like image 577
sashoalm Avatar asked Sep 13 '14 11:09

sashoalm


4 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

like image 133
Miss Blit Avatar answered Nov 11 '22 08:11

Miss Blit


My OS is centos7. After I installed libX11* libxcb* packages, I still get the problem:

The test for linking against libxcb and support libraries failed

$ cat qtbase/src/plugins/platforms/xcb/README

On Fedora, the following packages are required:

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

The libraries about xcb* are missing, I install packages using yum install xcb* to solve problem.

like image 34
green new Avatar answered Oct 10 '22 21:10

green new


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,

like image 7
Anas Avatar answered Nov 11 '22 06:11

Anas


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
like image 5
Softmixt Avatar answered Nov 11 '22 06:11

Softmixt