Building qtwebkit with wayland 0.85

darxus at darxus at
Thu Mar 22 10:07:46 PDT 2012

Good:  Youtube works, via html5 playback.
Bad:  Keyboard input doesn't work, weston crashes occasionally:


This is pretty straight forward, but takes a while.  The build is about 37
minutes for me.  You will probably run the download overnight.

#qt-labs on is the place to get help.  jlind_ seems to
maintain qtwayland, and thiago has been most responsive about problems with
the qt5 build system.  But they're busy folks, so direct your questions at
the channel.  Most of these folks are in Norway.

Ubuntu oneric packages likely to be helpful to install:  
Recommended by qtwebkit instructions: 
  curl ruby apache2 libapache2-mod-php5
Found necessary while building qtwebkit:
  libicu-dev libxt-dev libgail-dev libsqlite3-dev libxslt1-dev libgeoclue-dev
Found necessary while building the rest of qt5:

Mostly, build wayland 0.85, then follow

After running init-repository, and before running configure:

mv qtwayland qtwayland.0
git clone git:// -b 0.85
# Because the repo init-repository grabs doesn't have a 0.85 branch and
# won't build against wayland 0.85

When running make, instead run it as: 
make make_default module-qtwayland
(I ran "make", then "make module-qtwayland", but this should work.)

Because qtwayland is the only module not built by default.  
(You should have $MAKEFLAGS set to something like "-j 5" to use multiple
cores.  Where "5" is your number of cores +1.)

Then maybe run "make install".  I know it tells you not to, but I think
that's what put fancybrowser (qtwebkit) in

Because init-repository checks out "detached heads" for known good
commits of *some* of the repos it downloads, either:
1) Never git pull any of these qt5 repos.
2) Checkout master in all of the repos, then pull them all at once.

Otherwise you end up with nightmarish problems due to the repos being out
of sync, that nobody else will have or be able to help you with because
they're all building from master in all the repos.

If the build complains about needing something that starts with "qt",
or any other file you can find with "find . -name 'filename'" in the qt5
directory, don't install it from your linux distribution.  You're building
*all* of qt, missing qt libraries is a problem with the build system.
Go to #qt-labs and tell them you believe you have found another problem
in the dependencies, and give them the error.  (Two fixes for
this have been committed for problems I've found in the last couple days.)

If the build complains about needing something that's not part of qt, do
install it from your linux distribution, and let me know I missed something
if it's Ubuntu (Oneric or Precise).

To run qt applications through wayland, you need to use the command line
argument "-platform wayland".  For example:

qt5/qtwebkit-examples-and-demos/examples/webkit/fancybrowser/fancybrowser -platform wayland

And the environment variables set during the build process are important
for running the applications too:
      unset QTDIR
      export PATH="$PWD/qtbase/bin:$PWD/qtrepotools/bin:$PATH"
(Where $PWD is the qt5 directory you ran init-repository in.)

Bonus:  There's a wayland compositor in here, that should be usable in
place of weston:
It runs.  I haven't gotten weston-terminal to run with it (haven't tested
anything else).
There are a couple other compositor looking things in
qt5/qtwayland/examples.   I just looked up how to run qml:
"qmlviewer file.qml".  

There's a patch in qtwayland master related to the xkbcommon path, which
*might* fix the keyboard input.  It applies cleanly to qtwayland branch

commit 7df558db7bb8958cf2baa506c17b4960c19f0916
Author: Pierre Vorhagen <pvorhagen at>
Date:   Wed Mar 21 11:02:09 2012 +0100

    Use new xkbcommon includepath
    Change-Id: I294e5e8511ae8319f11d516d452f9b8a0d149b75
    Reviewed-by: Samuel Rødal <samuel.rodal at>

"Don't go around saying the world owes you a living. The world owes you
nothing. It was here first."  - Mark Twain

More information about the wayland-devel mailing list