This is list of all known issues and problems which we had to solve during our first Qt installation on Linux, Windows and Mac.
Known errors
Error: undefined interface
What to do when compilation of QT crash with message “Error: undefined interface”.
http://www.qtforum.org/article/31561/error-when-building-libraries.html
http://www.qtcentre.org/threads/26245-Qt-4.6-api/qscriptextensionplugin.h(43)-Error-Undefined-interface
make: g++: Command not found
it’s necessary to instal g++ support (sudo apt-get install g+)
Basic XLib functionality test failed!
it’s necessary to instal xlib(xorg??) support (sudo apt-get install xorg-dev)
*** [sub-corelib-make_default-ordered] Error 2
Probably mishmash on 32bit / 64bit system and QT versions.
undefined reference to `QEventDispatcherGlib::versionSupported()’
Probably missing libglib2.0-dev on your system. (sudo apt-get install libglib2.0-dev).
Undefined reference to QSslSocket::*
Missing OpenSSL library on your system. (sudo apt-get install libssl-dev)
gtk/gtk.h: No such file or directory
Missing gtk package. (sudo apt-get install libgtk2.0-dev ). After that its necessary to update db (sudo updatedb).
if system can’t find file gtk/gtk.h because gtk is stored in gtk-2.0 directory, add -I (capitalised i) param to configure with gtk path:
./configure -opensource -I /usr/include/gtk-2.0
cups/cups.h: No such file or directory
install libcups2. (sudo apt-get install libcups2-dev)
gst/gst.h: No such file or directory
install gstreamer 0.10. (sudo apt-get install libgstreamer0.10-dev)
Missing Include/glibconfig.h
it’s because this file isn’t in /usr/include/glib-2.0, but in /usr/lib/glib-2.0. So you have to include also this /usr/lib path or copy file to include/glib-2.0
Hints and tips
How to create symbolic link to directory
create symbolic link using ln -nsf /usr/include/gtk-2.0/gtk /usr/include/gtk
Minimal required libraries
List of libraries required by Qt:
- libfontconfig1-dev
- libfreetype6-dev
- libx11-dev
- libxcursor-dev
- libxext-dev
- libxfixes-dev
- libxft-dev
- libxi-dev
- libxrandr-dev
- libxrender-dev
And other which are required by some modules of Qt:
To install all required on Linux, use following commands
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxcups/cups.h: No such file or directory ft-dev libxi-dev libxrandr-dev libxrender-dev
sudo apt-get install bison flex libqt4-dev libqt4-opengl-dev libphonon-dev libicu-dev libsqlite3-dev libxext-dev libxrender-dev gperf libfontconfig1-dev libphonon-dev
If error doesn’t disappear after installing correct library
Sometimes it’s necessary to reconfigure Qt using make confclean
How to find where is missing header file located on disk
Use find /path -iname xxx.h command
How to find package which contains missing header file
use apt-file application with following syntax:
apt-file search gdk/gdk.h
Useful links about instalation Qt on linux
List of links about installation:
Building Qt on Linux
Qt configuration for succesfull build
This is currently my latest configure command to compile Qt on my Ubuntu 10.10.
Compilation fixes
This is necessary when search path for following libraries isn’t entered to configure.
sudo ln -nsf /usr/include/gstreamer-0.10/gst /usr/include/gst
Todo
Figure out how works pkg-config (pkg-config –cflags gstreamer-0.10)