I've been trying to build Qt-4.6.3 (from 2010.04 SDK) on Ubuntu 10.04, and have run into a multitude of errors. The main cause of problems is that many source files are expecting to find one or other of a group of include files: X11/extensions/X*.h, among which are XInput.h, Xrandr.h, Xcursor.h, Xfixes.h ... Explicitly excluding these in the configure options has no effect. These options are not supposed to be part of the linux-g++ build anyway. The MAKEFILE_GENERATOR for linux-g++ is UNIX, and these X11 extensions are not tested for in config.tests/unix, while they are tested for in config.tests/x11. I don't know how they get into the makefiles. I thought I was clever by thinking of placing a set of #defines in mkspecs/linux-g++/qplatformdefs.h:
#define QT_NO_XINPUT
#define QT_NO_XFIXES
#define QT_NO_XRANDR
#define QT_NO_XRENDER
#define QT_NO_XINERAMA
#define QT_NO_XCURSOR
#define QT_NO_XSYNC
#define QT_NO_XSHAPE
#define QT_NO_XKB
#define QT_NO_XLIB
#define QT_NO_MITSHM
but to my disappointment this had no effect either - these defines are not passed through to the makefiles.

Does anyone know how to exclude all these X11 extensions from a Linux (Ubuntu) build? To be more precise, how to stop the build from compiling X11-specific source files like qcursor_x11.cpp? BTW these extensions do not appear to be available for Ubuntu. I have installed libxext-dev, as suggested, but it doesn't have these extensions.

I would file a Qt bug report, but from what I've seen of similar reports, the debugging team test with Qt-4.7, find that there is no problem, and mark the issue as closed.

Thanks
Gib