52

I am trying reinstall pacman on my Arch Linux distribution. When I run the configure script "configure.ac", I get a bunch of undefined macros:

error: possibly undefined macro: AM_INIT_AUTOMAKE.
If this token and others are legitimate, please use m4_pattern_allow.
See the autoconf documentation.
error: possibly undefined macro: AC_PROG_LIBTOOL
error: possibly undefined macro: AM_GNU_GETTEXT 
error: possibly undefined macro: AM_GNU_GETTEXT_VERSION
error: possibly undefined macro: AM_CONDITIONAL

Does anyone know what would cause these macros to be undefined? Having come from Ubuntu (where everything just works, and is therefore boring), I don't really know about automake.

  • Why are you building from source? Why don't you download the packages on another machine, copy them across and extract them to root as per wiki.archlinux.org/index.php/… – jasonwryan Aug 13 '11 at 4:31
  • It appears that what? Is that the whole sequence of errors? How did you retrieve the source? – Gilles Aug 13 '11 at 14:24
  • 2
    Jason, I do not have pacman on my other machine, and I would rather not download another package manager. Plus if I was not building from source I would not have this wonderful opportunity to learn about M4 and automake. Sorry about the bad edit, I removed it. Yes, that is the whole sequence of errors. I retrieved the source from the ArchLinux website at projects.archlinux.org/pacman.git with wget. – SirTasty Aug 13 '11 at 20:14
  • configure.ac is not a configure script and is not runnable. – qdii Apr 24 '13 at 23:19
  • 2
    "Why are you building from source?" None of your gd business :) – Greg Schmit Dec 25 '17 at 2:19
61

Try this, maybe it can help:

autoreconf --install

(See the manpage, there is a --force option also)

  • cvs program not found; autopoint failed with exit status 1. I am installing cvs from sources, will let you know how it goes. – SirTasty Aug 13 '11 at 19:41
  • 1
    @SirTasty: cvs?? hmm, maybe try to use autoconf and automake directly? – Stéphane Gimenez Aug 13 '11 at 19:53
  • Autoconf gives me the undefined macro warnings. automake gives me (semicolons separate lines): Makefile.am:2: WANT_DOC does not appear in AM_CONDITIONAL ; Makefile.am: required file ./ChangeLog not found ; configure.ac:57: required file config.h.in not found` – SirTasty Aug 13 '11 at 20:10
  • I'm not an autotools expert (or fan either). Maybe wait for one to show up… By chance, what about aclocal first? – Stéphane Gimenez Aug 13 '11 at 20:21
  • I had a similar autoconf error (on redhat fc19) and the autoreconf --install solved it. – gaoithe May 25 '15 at 11:14
23

The macros in the error message you posted are defined by automake and libtool; it looks like you need to install those packages.

Then try autoreconf --install

  • Both of those packages are installed, or at least "which automake" and "which libtool" return reasonable results. – SirTasty Aug 13 '11 at 8:51
  • 2
    @SirTasty Then you probably need to run "autoreconf" as Stéphane suggests. – Riccardo Murri Aug 13 '11 at 13:51
  • 3
    On my CentOS6.7 system, I had to do this: sudo yum install autoconf automake libtool cmake autoconf-archive gcc-c++ – Mark Hudson Mar 16 '17 at 17:54
3

For anybody else looking: While automake and libtool are very likely candidates, some systems won't install gettext automatically. This is also required.

1

I was pretty confused when getting these errors, because I had everything installed and autoreconf --install wasn't helping. The problem was just corrupted aclocal.m4 and deleting it before autoreconf solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.