Not able to build Weston.

Bryce W. Harrington b.harrington at samsung.com
Tue Apr 1 16:16:42 PDT 2014


On Tue, Apr 01, 2014 at 12:14:17PM +0530, Srivardhan M S wrote:
> Hi,
> 
> I followed the instruction from
> http://wayland.freedesktop.org/building.html and was able to build
> Wayland, Mesa, libxkbcommon, cairo-gl, libunwind. But got struck while
> building Weston. When I do a make, I get the following error:
> sri.hebbar at sri-hebbar:~/Wayland/weston$ make
>   GEN    protocol/text-cursor-position-server-protocol.h
> <stdin>:6: unknown type
> make: *** [protocol/text-cursor-position-server-protocol.h] Error 1
> 
> Can anybody pls help me in resolving this issue.
> Am building on Ubuntu 12.04 32 bit machine.
> 
> Thank-you,
> Sri

Have you done builds previously in your ~/Wayland/weston directory?  If
so, you might try doing `git clean -xfd`.

I seem to recall a month or two ago there were some changes that left
stray protocol bits in my tree, and that command got it sorted.


I do monthly from-scratch rebuilds of wayland + dependencies on ubuntu
12.04, and have accumulated some deltas from the building.html
directions.  I am not sure if these are the best solutions but they
still produce a working build for me.

1.  When building drm, disable kms

    cd $WLROOT/drm
    git clean -xfd
    ./autogen.sh --prefix=$WLD --disable-libkms

2.  When building mesa, I've run into build problems with DRI3, opencl,
    and llvm, so disabled those:

    cd $WLROOT/mesa
    git clean -xfd
    ./autogen.sh --prefix=$WLD --enable-gles2 --disable-gallium-egl \
      --disable-dri3 --disable-llvm-shared-libs --disable-opencl \
      --with-egl-platforms=x11,wayland,drm --enable-gbm
      --enable-shared-glapi \
      --with-gallium-drivers=r300,r600,swrast,nouveau

3.  libxkbcommon requires a newer libxcb, but this can be worked around
    by disabling X support:

    ./autogen.sh --prefix=$WLD --with-xkb-config-root=/usr/share/X11/xkb \
    --disable-x11

    (I also tried adding libxcb from git to the build dependencies, but
    it depended on a bunch of other newer X bits not in stock U 12.04).

4.  My build options for Weston.  Of course everyone will build weston
    their own way depending on their needs, but here's how I do it:

    cd $WLROOT/weston
    git clean -xfd
    ./autogen.sh --prefix=$WLD --with-cairo=gl --enable-setuid-install=no \
        --enable-clients \
        --enable-headless-compositor \
        --enable-demo-clients-install

    For this build I only run it from inside X, so these might not work
    as well if building a weston for running on the drm layer.

5.  Finally, I had to manually copy weston-keyboard into install/bin/.
    Without that, I got error messages when starting up weston.

HTH,
Bryce


More information about the wayland-devel mailing list