Using the Wayland port of QT

Darxus at Darxus at
Sun Nov 21 15:52:14 PST 2010

I spent a lot of time today trying to get this to work under ubuntu, with
input from Benjamin Franzke in the IRC channel.

I was not successful.

On 11/21, Benjamin Franzke wrote:

That doesn't work, apparently due to hardcoding the path to drm.h instead
of using the version from the defined library path.

On 11/21, Benjamin Franzke wrote:
> 2010/11/21 Benjamin Franzke <benjaminfranzke at>:
> > I've also created a merge request for that stuff now, so you could
> > also use that:
> >

> oh I forgot to say the merge request needs the scanner PATCH i posted earlier..
> so you should use the first patch for now

The scanner patch (for wayland, not qt) is:

These two patches together (one for qt, one for wayland) result in a

< Darxus> $ examples/widgets/analogclock/analogclock -platform wayland
< Darxus> Segmentation fault
< bnf> Darxus: had that too...  only doing a clean rebuild helped me
< Darxus> bnf: Rebuild of what?
< bnf> Darxus: qt (yes it sucks)

I rebuilt wayland and qt (after "git reset --hard && git clean -x -f" in
both), and got the segfault again.

A script of what I did (applying the qt-wayland merge request, and the
scanner patch for wayland):

You'll probably need some more stuff built from git which is done by my
ubuntu build script.

Some useful Qt build debugging stuff:

03:39PM < Darxus> Failed to load platform plugin "wayland". Available platforms are:
03:39PM < Darxus> Minimal
03:40PM < bnf> Darxus: search for
03:40PM < bnf> *
03:41PM < Darxus> No
03:42PM < bnf> go to config.tests/qpa/wayland/
03:42PM < bnf> ist there a file "wayland"?
03:42PM < Darxus> No.  Just Makefile  wayland.cpp
03:43PM < bnf> qmake && make wayland
03:45PM < Darxus> wayland.cpp:2: fatal error: wayland-client.h: No such file or directory
03:45PM < Darxus> $ export | grep INCL
03:45PM < Darxus> declare -x C_INCLUDE_PATH="/home/darxus/install/include"
03:46PM < Darxus> $ ls -l /home/darxus/install/include/wayland-client.h
03:46PM < Darxus> -rw-r--r-- 1 darxus darxus 2907 2010-11-20 22:53 /home/darxus/install/include/wayland-client.h
03:46PM < bnf> Darxus: oh maybe you need CPLUS_INCLUDE_PATH?
03:48PM < Darxus> Yup, that did it, thanks.

04:17PM < Darxus> In file included from /home/darxus/install/include/xf86drm.h:40, from qwaylandintegration.cpp:20:
04:17PM < Darxus> /usr/include/libdrm/drm.h:376: error: expected unqualified-id before ‘virtual’
04:17PM < bnf> Darxus: update you libdrm
04:18PM < Darxus> bnf: from git:// ?
04:19PM < Darxus> $ git pull
04:19PM < Darxus> Already up-to-date.
04:21PM < bnf> Darxus: /usr/include/libdrm/drm.h is used thats a problem of the first patch..

This is the problem with hardcoding the path to drm.h, which is fixed by

"Forget not that the earth delights to feel your bare feet and the winds
long to play with your hair." - Kahlil Gibran

More information about the wayland-devel mailing list