svn builds for the commoner

January 12th, 2009

I had a small revelation this week. I got svn builds working, both with Mono, and at along last, KDE4. It turns out it doesn't have to be maddeningly error prone.

Mono SVN

To build Mono you should look at the release tarballs of a recent release, like 2.0.1. That tells you which modules you need. It doesn't really tell you much about the order in which you should build them, however. Then you grab the sources from svn. The names of the modules in trunk/ largely match the names of the tarballs in the release.

I found this order to work okay:

  1. libgdiplus
  2. mcs (download only, mono module builds both)
  3. mono
  4. debugger
  5. mono-addins
  6. mono-tools
  7. gtk-sharp
  8. gnome-sharp
  9. monodoc-widgets
  10. monodevelop
  11. paint-mono (from http://paint-mono.googlecode.com, yes it runs!)

When you're checking out from svn, don't check out the entire history (this would take forever to download), use

svn checkout -r HEAD <url>

so that you only get the current HEAD.

Before you set out, it's also a really good idea to set up a special build/runtime environment for this process. That way your existing Mono (if you have it installed) won't interfere with the svn build.

Now for the building. Generally, this is all you need:

  1. ./autogen.sh --prefix=/opt/mono-svn
  2. make
  3. make install

There are slight variations in that some packages use bootstrap.sh instead of autogen.sh, but this you'll find in the respective READMEs. And those instructions actually worked for me. The mono module is a bit more complicated, because there is the whole concern about building mono using mono. So I recommend using

make get-monolite-latest

first to bootstrap the build. And then it works.

Sometimes you'll have failures because of missing dependencies. There will be a message like "You need package Hello". In that case look in your package manager for something resembling libhello-dev and that's more than likely it.

Last but not least, you obviously need a working toolchain.

KDE4

To build KDE4 there is a great tool called kdesvn-build. It comes with a sample config file you just tweak and then run the script.

Again, you'll probably have some failures, but kdesvn-build saves *all* output. So just look in log/latest/<module>/<operation>.log and you should be able to figure out what happened. Cmake has a very nice summary at the end of its output, where you can see exactly what was set up to be built.

The same note applies with respect to missing libraries as with Mono.

NOTE: KDE and Qt are massive and the amount of disk space this will cost you runs in gigabytes, so make sure you have plenty. My kde-sources directory with a full KDE build in progress is now 7gb, I kid you not. Mono is much smaller: 2gb.

:: random entries in this category ::

2 Responses to "svn builds for the commoner"

  1. [...] it’s time for part two. If you’re here it’s probably because someone said “fixed in svn”, and for [...]