2

autogen.sh failed, the output shows that i need an autoconf of higher version. but in fact i have a 2.6x autoconf....

why it still failed?

[mirror@home 4]$ ./autogen.sh
+ autoreconf -i -f -v
autoreconf: Entering directory `.'
autoreconf: configure.in: not using Gettext
autoreconf: running: aclocal --force -I m4
configure.in:4: error: Autoconf version 2.60 or higher is required
configure.in:4: the top level
autom4te: /usr/bin/m4 failed with exit status: 63
aclocal: autom4te failed with exit status: 63
autoreconf: aclocal failed with exit status: 63

// content in configure:4
it's AC_PREREQ(2.60)

[mirror@home 4]$ autoconf
autoconf      autoconf2.59  autoconf2.6x
[mirror@home 4]$ autoconf
[mirror@home 4]$ ls -l autocon
[mirror@home 4]$ ls /usr/bin/autoconf* -l
lrwxrwxrwx 1 root root    12 Aug 27 13:55 /usr/bin/autoconf -> autoconf2.6x
-rwxr-xr-x 1 root root  7663 Jan  6  2007 /usr/bin/autoconf2.59
-rwxr-xr-x 1 root root 14635 Feb  3  2011 /usr/bin/autoconf2.6x

2.63 > 2.60, but autogen failed, it's really confusing:(

[mirror@home 4]$ autoconf --version
autoconf (GNU Autoconf) 2.63
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later
<http://gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

more details:

    autoreconf --version
    autoreconf (GNU Autoconf) 2.59

what i want to know is why autogen.sh failed?

hugemeow
  • 7,777
  • 13
  • 50
  • 63
  • What's actually on line 4 of `configure.in`? – ptomato Aug 27 '12 at 08:54
  • `configure.in` is really the old name for `configure.ac`, so i guess you are trying to update an old project? try renaming the file (maybe autoconf assumes some compat things when it encounters a `configure.in` file) – umläute Aug 27 '12 at 09:18
  • what does `autoreconf --version` print? – ptomato Aug 27 '12 at 12:33
  • @ptomato autoreconf (GNU Autoconf) 2.59 – hugemeow Aug 27 '12 at 18:33
  • That's your problem then. `autogen.sh` runs `autoreconf`, `autoreconf` runs `autoconf` automatically, and apparently it is running the 2.59 version. Make sure you call the 2.63 version of `autoreconf`. – ptomato Aug 27 '12 at 18:36
  • there are three autoreconf autoreconf2.59 autoreconf2.6x on my system, why one is 2.6x, but not 2.63? should i make change to configure.in to specify which autoconf it should use? – hugemeow Aug 27 '12 at 18:38
  • 1
    Maybe fix your system so that autoreconf points to autoreconf2.6x just like autoconf points to autoconf2.6x. – adl Aug 28 '12 at 08:56
  • Uninstall all of the autotools from the system (leave m4, but remove autoconf, automake, and libtool), and install only one version. If you don't have the correct privileges to do that, install modern versions of autoconf, automake, and libtool in $HOME and put $HOME/bin/ early in your path. – William Pursell Aug 30 '12 at 18:21
  • @WilliamPursell how to install automake and etc. to $HOME? – hugemeow Sep 01 '12 at 09:29
  • Download and unpack the tarballs; in each, run `./configure --prefix=$HOME && make && make install` – William Pursell Sep 05 '12 at 17:22
  • @WilliamPursell why i don't need to remove m4? – hugemeow Sep 05 '12 at 19:53
  • Other software may require `m4`. It's not really necessary to remove the autotools, but I find it simplifies things, and there really is no reason to have them installed on the system. Having them in $HOME is perfectly adequate. – William Pursell Sep 05 '12 at 20:32
  • failed to build autoconf:( – hugemeow Sep 05 '12 at 21:18

1 Answers1

1

You have two versions of autoconf installed, and when aclocal runs autom4te, this launches the old one. Do you have a autom4te-2.6x in your path? If so, set export AUTOM4TE=autom4te2.6x before running autoreconf-2.64.

Or just run:

AUTOM4TE=autom4te2.6x ./autogen.sh

See also:

update autoconf to at least 2.6

why i failed to build autoconf with autoconf2.6x, its version is newer than 2.6 anyhow

Community
  • 1
  • 1
kenorb
  • 155,785
  • 88
  • 678
  • 743