Friday, January 29, 2010

Stupid build systems

There was a time when building software was easy. You typed make and it almost always worked. Sometimes you had to know the secret incantation of xmkmf -a, but usually if make didn't work straight off the software wasn't worth using.

In the advanced days of the 21st century, of course, such simplicity - something that actually works - is rarely to be found. We have things like the autotools (the evil behind ./configure) that basically involves making a bunch of unsubstantiated guesses about your system and constructing a random build configuration based on it. And heaven help you if libtool gets its teeth into your software - it's almost guaranteed to miscompile your software in a manner that's undebuggable and unfixable.

So cmake promised to be a welcome relief from this madness. Only it's not. I've been having a go at building the awesome window manager on Solaris. When it works I'll post more details, but I almost flipped when having fought it into submission and built it successfully, I did the install and saw:

-- Removed runtime path from "/packages/awesome/bin/awesome"

And, on checking, it had done exactly that - stripped out the RPATH information so the binary it had carefully built stood no chance whatsoever of actually working.

And this is progress?


gagendel said...


Thanks for the smile. I've been fighting this same battle for more years than I can remember and I agree with your sentiments 100%. KISS has always been my mantra.

Recently, I had some intractable problem from a developer's library I was using. He finally fixed the problem with some "magic" stating that it was a common problem. Funny that I've never seen it in my several decades of software development. It still required an autoreconfig and a configuration. I love having the obfuscated Makefiles to boot.

For all of my projects, I've been partial to using jam instead of make. I've developed a modular rules infrastructure so a project's Jamfile consists of just a list of the external libraries needed (boost, mysql, etc.) and the list of files to compile. Any programmer can easily understand a Jamfile and know what's up. Oh, and they build on Solaris 8, OpenSolaris, Windows, Mac OS/X, and a variety of Linux flavors without a hitch, almost no "#ifdef'ing", and seamless integration into our auto-build and test infrastructure.

Moinak said...

True. I had struggled with cmake while building KDE4 for BeleniX. I had this same problem and one needs to specify "-DCMAKE_SKIP_RPATH:BOOL=YES" to avoid rpath stripping. This is simply ridiculous.
Cmake has a quite a learning curve but once you get to some understanding it has one benefit over autotools. It is possible to go and change the cmake scripts unlike libtool or configure which are human-unreadable shell muck.

.:: AuroraUX ::. said...

I know,

I actually did the first port of Awesome WM to Solaris and had to fight a little to get the patches upstream, Many things where not fun :(

Be sure to upstream your patches also!


coolvibe said...

There is something to be said for using standard Makefiles.

Sebastian Kayser said...

Peter, Edward,

how about sharing your awesome WM efforts with the wider public? :) I am with the OpenCSW packaging project ( and I am sure many people - including me - would very much appreciate an awesome WM SVR4 package for Solaris 8/9+ .. ok, let's say 10 (the more platforms it supports, the better though).

We might lend a hand when it comes to autohell/libtool-horror/cmake-specialities, many of us have run into these beasts on lots of occassions (judging from your post, you have too, still someone might have had similar problems). We usually use Sun Studio 11, but gcc3/4 and Sun Studio 11+ are also available, plus the surrounding build tools are mostly up to date as we use them all the time. We have got a package build system named GAR which makes building packages a bit more streamlined (docu at, granted it's not juicer) and we have got a build farm with Solaris 8-10 x86/SPARC. There is a user list at and most easiest an IRC channel on freenode #opencsw. So if you have some spare cycles, why don't you pop by? Would be very much appreciated.


P.S.: And yes, our website looks oldish, I know. A new web presence is in the making. Feedback and helping hands always welcome!