Neil Hopcroft

A digital misfit

automake configuration

I have noticed a few projects failing during autogen or automake stages, with errors that don’t make much sense, things like missing gettext and libtool, although they are both installed: not using Gettext not using Libtool
A bit of hunting around the internet suggests that automake looks in the same directory as itself for those supporting tools, and I had updated automake to version 1.15, as required by another project. While doing this I had installed it in /usr/local/bin rather than /usr/bin, meaning it lost gettext and libtool as the local version was found earlier on my path. I have now removed the local version and re-installed my updated 1.15 version in /usr/bin.
The projects affected by this configuration error are:

  • librsvg
  • libxcb
  • pango

However, this still doesn’t resolve the problem – the automatic build is still missing gettext while running the same build from command line completes the configure stage.
Looking more closely at librsvg, I see that it is missing calls to libtoolize and gettextize. Adding those allows the build to continue a little further, but it is still giving an error: “error: HAVE_INTROSPECTION does not appear in AM_CONDITIONAL”. Copying introspection.m4 to m4/ resolves this problem and allows the build to run to completion.
But this doesn’t seem like the proper solution to this problem – it is a hack to make it work. How to find the proper solution?
I ran the builds from a terminal where they worked as expected. So perhaps the problem is an environmental issue? Checking the path between the Jenkins build and terminal shows some differences. Indeed, using the Jenkins path in the terminal gives the same errors as I see in the CI build. Aha! It turns out that Jenkins is picking up the wrong version of aclocal, removing aclocal from /usr/local/bin fixes this problem, now everything is in /usr/bin and all of the above projects are now building.
I am a bit nervous about doing these kinds of sweeping configuration changes, so now I feel like I need to rebuild everything, just to make sure that I haven’t broken other things with this change.

Leave a Reply

Your email address will not be published.