Not able to build weston following the instructions in the website.

Bill Spitzak spitzak at gmail.com
Tue May 13 10:48:08 PDT 2014


I was hoping to clean this up, but I thought I would post my current 
notes on getting Wayland compiled, on an Ubuntu 12.04 machine. This 
machine had been used to compile X11 programs, thus it may have packages 
already installed that are required for Wayland.

I did start with http://wayland.freedesktop.org/building.html, but had 
to do (or recommend) the following modifications:

- The environment setting lines should be prefixed with "export", rather 
than having a separate export line. This makes it easier to change the 
set of environment variables, and harder to forget to enter the "export" 
line (which is a big mistake I did).

- Add a "cd .." after each compilation step. If you literally follow the 
instructions you will end up with each git repository checked out inside 
each other.

- Wayland requires:
   sudo apt-get install doxygen
   (or use --disable-documentation for ./autogen.sh?)

- drm requires:
   sudo apt-get install libpciaccess.dev

- mesa is by far the biggest pita. It requires:
   sudo apt-get build-dep mesa
   sudo apt-get install llvm
   sudo apt-get install xutils-dev flex bison libx11-dev x11proto-gl-dev
   sudo apt-get install xcb

   git clone git://anongit.freedesktop.org/xorg/proto/glproto
   (autogen + make install)

   git clone git://anongit.freedesktop.org/xorg/proto/dri2proto
   (autogen + make install)

   git clone git://anongit.freedesktop.org/xorg/proto/dri3proto
   (autogen + make install) (this may not be needed with --disable-dri3)

   git clone git://anongit.freedesktop.org/xorg/proto/presentproto
   (autogen + make install)

   My configuration line:
   ./autogen.sh --prefix=$WLD --enable-gles2 --disable-gallium-egl \
        --with-egl-platforms=x11,wayland,drm --enable-gbm \
        --enable-shared-glapi \
        --with-gallium-drivers=r300,r600,swrast,nouveau \
        --disable-dri3 --disable-llvm-shared-libs
   changes from the Wayland page are:

   --disable-dri3 to remove requirements for:
    xcb-dri3
    xcb-present
    xcb-sync
    xshmfence

    My understanding is that this is useless unless your kernel has
    dri3, in which case you probably *will* have the ability to
    install these? It also looks like you could install them from git.
    xshmfence is there in an obvious place. I believe the others are
    aquired by compiling and installing xcb-proto, but this probably
    also requires compiling xcb.

   --disable-llvm-shared-libs as there are no shared libs in llvm
     package. My impression from the web is that this is an error
     in the Ubuntu package?

   Removing r300 seems to remove need for llvm, but I suspect that is
   disabling shader compilation also?

   I think the x11 backend could be removed if there was some way to
   make the compositor link with your system's EGL library while Wayland
   clients use this one. This may even allow the X11 compositor to run
   using EGL on an Nvidia x server?

- libxcbcommon:
   Added --disable-x11 to autogen to avoid dependency on xcb-xkb
   This is available in libxkbcommon-dev package but only a tiny
   part of libxcbcommon is used by Wayland I believe.

- pixman/cairo:
   I did not compile these. It seems to work ok with the built-in ones.
   Since I cannot get EGL to work I believe any GL rendering would be
   unused anyway.

- libunwind:
   I compiled this but there is a package called libunwind7-dev that
   may provide it.

- Weston requires:
   sudo apt-get install libxcb-composite0-dev
   sudo apt-get install libmtdev-dev
   sudo apt-get install libpam0g-dev

   And configuration was done this way, fixing the wayland-scanner, and
   make it possible to install without sudo:

   PATH=$WLD/bin:$PATH ./autogen.sh --prefix=$WLD --disable-setuid-install

- To post patches you will need:
   sudo apt-get install git-email
   And you need to edit ~/.gitconfig (or the local .git/config in the
   package you are patching) to add these lines to talk to smtp:

   [sendemail]
	smtpencryption = tls
         smtpserver = smtp.gmail.com
	smtpuser = spitzak at gmail.com
	smtpserverport = 587
         to = wayland-devel at lists.freedesktop.org
         from = spitzak at gmail.com

- I have not tried the XServer yet

- Above instructions may contain unnecessary steps as config only 
complains about one thing at a time and a later fix may have had the 
side-effect of fixing the earlier one.

Hope this is useful, and it would be nice to update the how-to-build page.


More information about the wayland-devel mailing list