[Development] Is Xlib a hard requirement for Qt5 xcb?

Jørgen Lind jorgen.lind at gmail.com
Tue Jul 30 13:21:08 CEST 2013


>From what I can remember, the xlib dependency was introduced into the
xcb backend because glx requires it, as it needs the xlib display.
Since most people want to use glx then it has become a defacto
dependency. Then it would seem that porting old functionality to the
xcb backend has been simplified by having the xlib dependency.

I don't think its a big problem to have the dependency there, but we
should also keep in mind that it should be a long term goal not to
have the dependency.

Jørgen

On 26 July 2013 23:19, Nicolás Alvarez <nicolas.alvarez at gmail.com> wrote:
> Hi everyone,
>
> I attempted to build Qt5 and KF5 in a minimal system, only installing
> dependencies when configure/cmake asks for them, in order to find bugs
> (such as missing dependency checks) in the build system. I was
> successful, in the sense that I found missing checks :)
>
> I'm configuring Qt with the options suggested in the KF5 wiki:
>     ./configure -prefix $PWD/qtbase -opensource -developer-build
> -nomake tests -nomake examples -dbus -no-separate-debug-info -xcb -qpa
> xcb -no-gtkstyle -no-pch
>
> My minimal system does not have X11 development files (such as
> Xlib.h), but it does have XCB stuff.
>
> Compilation fails with:
> make[2]: Entering directory `/home/nicolas/src/qt5/qtbase/src/widgets'
> util/qsystemtrayicon_x11.cpp:60:22: fatal error: X11/Xlib.h: No such
> file or directory
> make[2]: Leaving directory `/home/nicolas/src/qt5/qtbase/src/widgets'
>
> make[5]: Entering directory
> `/home/nicolas/src/qt5/qtbase/src/plugins/platforms/xcb'
> qxcbmime.cpp:49:23: fatal error: X11/Xutil.h: No such file or directory
> qxcbcursor.cpp:52:28: fatal error: X11/cursorfont.h: No such file or directory
> qxcbxsettings.cpp:46:36: fatal error: X11/extensions/XIproto.h: No
> such file or directory
> make[5]: Leaving directory
> `/home/nicolas/src/qt5/qtbase/src/plugins/platforms/xcb'
>
>
> The question is: is Qt5/XCB *supposed* to work without Xlib? I got the
> feeling that there was some attempt to make it work, since some code
> is protected with #ifdef XCB_USE_XLIB checks (though perhaps that
> define is for something else?). If supposed to work, then it's
> currently broken and likely needs some more ifdefs. If not supposed to
> work, then the configure script should abort Xlib isn't present while
> configuring for XCB. I'm interested in fixing it either way, but I
> can't take the decision of what's supported :)
>
> --
> Nicolás
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development



More information about the Development mailing list