View Full Version : Qt configure error: Basic XLib functionality test failed

June 10th, 2009, 09:56 AM

I am trying to install Qt from source on ubuntu 8.04 hardy.I've downloaded "qt-x11-opensource-src-4.5.1.tar.gz" from their website.

I am following this tutorial on building static Qt applications:

These are the commands I used so far:

./configure -static -release

but I am unable to get pass this step due to the following error while configuring halfway:

Basic XLib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /tmp/qt-x11-opensource-src-4.5.1/mkspecs/linux-g++.

I have tried installing libx11-dev and xlibs-static-dev but the error persist...

Can someone please advice on how to solve this or how to specify the path mentioned??

Thanks in advanced..

June 10th, 2009, 01:53 PM
I too having the same problem.

The Google results gave me this link.

Anyway the answer there doesn't work for me.

June 10th, 2009, 05:47 PM
ya i've tried that too and it seems that the mentioned package in the google link, qt4-qmake does not exist..thus am trying to modify the include and library paths as mentioned in the error but not sure how to do it right..

Does anyone have a solution?

June 10th, 2009, 08:43 PM
I had the same problem when I tried to install it, but when I tried to install QT4.5.1 for Embedded Linux, it worked fine. Link: http://www.qtsoftware.com/downloads/embedded-linux-cpp

After downloading, the only difference is instead of "./configure", use "./configure -embedded". Hope that helps.

June 10th, 2009, 11:39 PM
Actually I'm having problems after that. I got the "make" to work and everything, but after that, it's as if I never installed it. How do I check the version of QT? I don't think there were any errors, and I know it had to at least be partially successful because there's the QTEmbedded-4.5.1 folder in my /usr/local/Trolltech folder.

June 11th, 2009, 01:23 PM

I've managed to install already.However, my application is missing functionality....Please refer to here:

July 18th, 2009, 05:44 PM
Just to say thank you--I had the same problem and the solution gnuchaux linked to worked for me. (Sorry it didn't work for him/her!)


October 8th, 2009, 08:56 PM
I had the same problem. I found the config.tests/x11/xlib/ directory and did a 'make' there. That way I got an actual compile error: cannot find -lXext.

Installing the package 'libxext-dev' solved the problem for me.

October 18th, 2009, 02:05 PM
thanks martinreddy. used your solution under debian lenny and now it's compiling. at least configuring ;)

November 12th, 2009, 08:01 PM
worked for me too. Thanks martinreddy

November 12th, 2009, 08:33 PM
Martinreddy's solution worked also for me on Red Hat Linux 5.3 after:

yum install libXext-devel


May 18th, 2010, 06:57 PM
Installed libxext-dev and configure worked on Ubuntu 10.04 (Lucid) using Qt 4.7 beta.

June 11th, 2010, 08:43 AM
I had the same problem. I installed zillions of -dev X libraries to no avail. But as soon as I installed libxext-dev as suggested here, the error went away and Qt is now building...

June 27th, 2010, 03:43 AM
Hi guys,

installing the libxext-lib was probably a prerequisite for me too, but that wasn't enough on my x64 10.04 Ubuntu.

I actually checked the qt/mkspecs/linux-g++-64/qmake.conf
The two suggested variables in the error output were pointing out to a
but on my setup, there was no folder X11R6, but instead the needed stuff was directly under /usr/lib64

So I ripped the X11R6 from both paths and now it configures.

June 30th, 2010, 11:49 PM
Thanks martinreddy! Much appreciated.

Abir Valg
October 29th, 2010, 02:06 PM
Thanks for the hint
On Ubuntu 10.10 here
I downloaded libX11dev and libXext-dev,
besides I modified the spec file to point to /usr/include/X11 and /usr/lib/X11 instead of usr/X11R6/include & lib. (I donno if the last step played any role, though)

Wolfgang Griech
November 27th, 2010, 03:23 PM
hi guys, you ever read the appropriate Qt page:
"Qt for X11 Requirements" ???


got the same error messages as you described above, but perfectly worked after following that Qt page ;-)

July 18th, 2012, 07:07 PM
Still get this error on Linux Mint 13 and Martinreddy's solution worked also for me. As Wolfgang mentioned, now I should give some credit to the requirements page next time. \o/ :D

October 16th, 2012, 05:10 AM
Thanks martinreddy. It worked for me in one go.