Using the Wayland port of QT

nerdopolis bluescreen_avenger at verizon.net
Tue Nov 23 15:44:24 PST 2010


On Sunday, November 21, 2010 06:52:14 pm Darxus at chaosreigns.com wrote:
> 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:
> > http://git.overlays.gentoo.org/gitweb/?p=user/benf.git;a=blob;f=x11-libs/
> > qt-wayland/files/config-test-wayland.patch
> 
> 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 googlemail.com>:
> > > I've also created a merge request for that stuff now, so you could
> > > also use that:
> > > http://qt.gitorious.org/~krh/qt/qt-wayland/merge_requests/1
> > 
> > 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:
> http://lists.freedesktop.org/archives/wayland-devel/2010-November/000222.ht
> ml
> 
> These two patches together (one for qt, one for wayland) result in a
> segfault.
> 
> < 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):
> http://www.chaosreigns.com/wayland/wayland-qt-build.sh
> 
> 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 qwayland.so
> 03:40PM < bnf> *libqwayland.so
> 03:41PM < Darxus> No libqwayland.so.
> 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  wayland.pro
> 03:43PM < bnf> qmake wayland.pro && 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://anongit.freedesktop.org/git/mesa/drm ?
> 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
> http://qt.gitorious.org/~krh/qt/qt-wayland/merge_requests/1


Hi.
I got it to build and work under Kubuntu Natty, I don't know how your system 
is configured, or that much about compiling things, but from the looks of it 
here is what I did different: I did not use the merge request (as I did know 
how to apply it) But I did use the patch. I only used the development packages 
that come installed by defualt in Kubuntu, and the ones I needed to use to 
build Wayland Cairo Mese and some xproto stuff. I was using kubuntu natty, 
maybe there is a version differance, or some dependancy already installed with 
Kubuntu.

And be careful, I did not do this on a production install, but the install now 
causes KDE apps to fail to load, so be careful.

I hope this helps a little bit.

I noticed that only ./bin/qtdemo works, others say symbol lookup error: 
/usr/lib/egl/egl_dri2.so: undefined symbol: _glapi_get_proc_address



More information about the wayland-devel mailing list