Another rant about a development tool: guess who?

Actually it is not a single tool, but a set of tools. I am talking about autotools again.

I wanted to build konversation from svn. I did the following:

- First, checkout extragear/network/konversation from KDE svn: svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/network/konversation
- Enter the konversation directory: cd konversation
- Get the kde-common/admin directory for the buildsystem: svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kde-common/admin
- Run the cvs.sh script for the KDE buildsystem: sh admin/cvs.sh cvs

What I get is:

$ sh admin/cvs.sh cvs
*** YOU'RE USING UNSERMAKE 0.4.
*** Creating acinclude.m4
*** Creating list of subdirectories
*** Creating configure.files
*** Creating configure.in
*** Creating aclocal.m4
configure.in:8: error: m4_defn: undefined macro: _m4_divert_diversion
acinclude.m4:4532: KDE_CHECK_HEADER is expanded from...
configure.in:8: the top level
autom4te-2.5x: /usr/bin/m4 failed with exit status: 1
aclocal: /usr/bin/autom4te failed with exit status: 1

undefined macro: \_m4_divert_diversion“. What kind of error message is that?

This is why I don’t like autotools: how is someone supposed to know where the real problem is, from this message? It is impossible to tell what is wrong from this message, unless you have written autoconf yourself.

Yes, I did something very wrong above, regarding the KDE buildsystem. I will see if someone is able to tell where the real problem was. But the rant is about the non-intuitive error message I was getting. I took days to find out what I was doing wrong.

3 thoughts on “Another rant about a development tool: guess who?

  1. Yes, autotool’s greatest problem is the total uselessness of its error messages. This is largely an inevitable consequence of the way it’s built (a chaotic mix of sh, m4, make, C and perl), and I think it simply cannot be fixed.

    Autoconf does two jobs, help with portability and source configuration. Automake uses autoconf, and does automatic generation of common, automatizable makefile targets. I wish we had an autoconf less portable than the current one, and an autoconf-less automake (or a better make).

    Autoconf is pretty stable these days, but it’s still ugly. Most of its ugliness is a pre-requisite for achieving the level of portability it aims to (for example, some versions of sh don’t have functions, so it run as a sh code generator instead of creating functions). But, being a 90s-generation programmer, I’ve never heard of anyone interested in porting their applications for such archaich crippled unices — especially with Linux and the BSDs freely available. Most software today only cares about architectures which can run Python or Ruby, and a better-designed autoconf lookalike could be written entirely in such a high-level language.

    As for automake, I’m not even sure if it’s really needed. To me it seems that most of its functionality patches deficiencies in make. There’s a number of make alternatives already available, and I see no reason why a better make couldn’t do by itself everything automake does — without messing with autoconf or portability issues.

    That said, I don’t want to get my hands dirty with those, so I guess I’ll just do what everyone does and keep using autotools 8)

  2. Oh, and while we’re at it: I know from where you’re coming, undefined macro errors are the worst ones to hunt in an autotools build system (together with mispelling of magic variables).

  3. Oops, I forgot to tell you the solution!

    Just in case someone was looking for the solution for this problem:

    The problem was that I checked out admin/ from kde-common inside the konversation directory. But I am not supposed to do this. I had this structure:

    – extragear/network/
    – extragear/network/konversation/
    – extragear/network/conversation/admin/

    However I am supposed to have this:

    – extragear/network/
    – extragear/network/admin/
    – extragear/network/konversation/

    And I should run cvs.sh (or make -f Makefile.cvs) from extragear/network, not from the konversation directory.

Deixe uma resposta

O seu endereço de email não será publicado Campos obrigatórios são marcados *

Você pode usar estas tags e atributos de HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>