Wayland Display Server (part 1, Wayland libraries)

My current project is setting up the Wayland Display Server on a fresh install of Ubuntu 13.04 amd64. If it turns out well, I might try to figure out how to make live CDs so other people will be able to play with it more easily. From what I've read, there's already a terminal and I should be able to compile Firefox or Chromium for it. So, a terminal and a browser, what else do you really need?

It sounds like a lot of major libraries (GTK+, Qt 5, cairo) already have ports, so hopefully I'll be able to compile many more programs that don't have ports yet. GNOME is aiming to have their stuff fully compatible with Wayland in 2014, so I'm a little nervous about trying to tackle any of that myself. Anyway, here goes a log of my install, starting with Ubuntu 13.04 amd64 just installed on a Dell Studio XPS 15.

I'm compiling everything from source so I'll have the newest versions. I'm working off http://wayland.freedesktop.org/building.html to get a head start, but they leave some things out. I started by git cloning all the repos I'll be using ahead of time, so I wouldn't have to think about it as I went along.

Compiling Wayland libraries

$ git clone git://anongit.freedesktop.org/wayland/wayland
$ cd wayland
$ ./autogen.sh --prefix=$WLD

As with compiling anything from source, the general method is to just repeatedly try configuring it and fixing errors until it succeeds.

The first hitch is pretty simple. When trying to run the first autogen.sh, it complained it didn't have autoreconf. Just install autoconf to fix that. On my machine, I used apt-cache search to figure it out, and ran

$ sudo apt-get install autoconf2.13

which sorted the first error out.

Next up, I hit some error about libtool. I wasn't sure what it was talking about, but it sounded like some libtool-related stuff was misisng. Installing libtool over apt-get fixed it

$ sudo apt-get install libtool

The next error was more straight forward, it said it was missing libffi, so I installed it

$ sudo apt-get install libffi-dev

I'm installing the version with -dev on the end, since that's the one you use for compiling code that uses that library. I'm pretty sure I'll be needing the -dev versions of all the libraries, and it can't really hurt to grab them. apt-get will pull in the rest of the packages you need when you grab the -dev one.

The script specifically asked me to install expat. It was slightly, and it turned out I needed to install libexpat1-dev. I found that name by guessing, but you could also figure it out by using something like apt-file find expat.h and looking around.

$ sudo apt-get install libexpat1-dev

The script asked for doxygen, and this time it actually meant it.

$ sudo apt-get install doxygen

This will pull in a ton of other programs, especially if you don't have latex stuff. It'll probably take a while. If you're interested in learning how to compile things by hand, you should pay attention to this last thing's difference. doxygen is for generating the documentation and isn't compiled in to anything. It's the one thing you don't install the development headers for, since presumably it's just being run on the existing code to generate documentation.

On my system, this was the end of what I needed to do for the Wayland libraries. Finish it off with

$ make
$ sudo make install

And you're done! With the first section.