Sunday, 13 June 2010

What's in a build?

Build systems. Love them or hate them, the process of going from source code to executable binary and redistributable package is facilitated by these complex and often unwieldy tools.


As part of Google Summer of Code 2010, I'll be working with the GNOME project and my mentor Alberto Ruiz to define and develop a new build system, buildj, suited to compiling modules from the GNOME desktop and third party applications based around the GNOME platform.

Some of our goals include:
  • Less boilerplate. Hand-editable build definitions that Just Work.
  • IDE-friendly. Integration with existing tools.
  • IJW cross-platform and cross-compilation support.
Most of all, the aim is to make build systems for simple applications and libraries trivial while catering for more complex projects with a simplified syntax.

Making life easier for developers

One of my first goals is to add support for automatic generation of pkg-config .pc files when building libraries and generation of .desktop files in the case of desktop applications. Although these are simple enough to write manually, it's clear that the fields they contain can be derived from the build system (project title, description, release version).

Automating this process will mean there are two less things for new developers to learn, and will also simplify the procedure for each release, ensuring well-formed .pc and .desktop files. My Ubuntu system shows 11 malformed .desktop files in a almost-new installation. Many of the .pc files shipped with the distribution also have redundant source dependencies left behind from previous releases. We can avoid both of these unfortunate situations with buildj. And that's just the beginning...

No silver bullet

At the same time, I should point out that this is not going to become a general purpose build system overnight. We do aim to avoid the need for autoconf and automake in all common cases but our other goals include modularity and the ability to cooperate with existing tools and environments, particularly in the context of a desktop environment project like GNOME. If this sounds like your kind of build system, I'd love to hear your thoughts and feature requests!

8 comments:

  1. Hi Emel,

    This looks like a worthwhile project. One of my biggest frustrations with GNOME has been the complexity of building with Automake and Autoconf using macros. That is why for my own projects, I have switched to CMake, which in my view is simpler and cleaner.

    One of the things I like about both Autotools and CMake is the ability to write nontrivial extensions. While this is a very complex undertaking, and perhaps should not be added right away, it's something to consider and maybe add at a later date once the basis is constructed.

    Good luck on this project!

    Cheers,
    Patrick Niedzielski

    ReplyDelete
  2. I have just one feature request, Documentation. The reason I have not bothered to learn any build system is that there I have not found any good NEWBIE style documentation.

    ReplyDelete
  3. Looks promising :) I hope to see this in action soon.

    -Üstün

    ReplyDelete
  4. Don't forget windows.... Being able to build the windows packages from the same system is pretty much essential !

    ReplyDelete
  5. I wonder if such a build system could/should offer help with packaging. Say, by taking care of dependencies once.

    ReplyDelete
  6. I wanted to vote for waf :(

    Best of luck with your project, it's definitely an interesting one.

    ReplyDelete
  7. "Love them or hate them, the process of going from source code to executable binary and redistributable package is facilitated by these complex and often unwieldy tools."

    And of course, the world is made an infinitely better place by the existence of _even more_ of the damn things.

    Excuse me while I go drink heavily!

    ReplyDelete
  8. Great! Good luck with this, Emel. I have been using BuilDj + Waf for a few little projects and it's been delightful. Hopefully with your project its value will be widely recognized and more projects will start to adopt it :)

    ReplyDelete