sudo autotools - recursion limit of 1024

Stepan Kasal skasal at redhat.com
Fri Aug 24 11:58:08 UTC 2007


Hello,

in short, to fix sudo, run:

	patch -i ltsugar.m4.patch acsite.m4

Gory details follow:  ;-)

On Thu, Aug 23, 2007 at 07:53:27PM +0200, Dan Horák wrote:
> Peter Vrabec píše v Čt 23. 08. 2007 v 18:02 +0200:
> > $ cvs -d anoncvs at anoncvs.sudo.ws:/cvs get sudo
> > $ cd sudo
> > $ autoreconf
> > /usr/bin/m4:configure.in:2321: ERROR: recursion limit of 1024 exceeded,
> > use -L<N> to change it
> > autom4te: /usr/bin/m4 failed with exit status: 1
...
> Another iteration - it is libtool

Indeed, it is.

> my versions:
> libtool-1.5.22-6.1.x86_64
> autoconf-2.61-2.noarch

But note that your installed libtool-1.5.22 is not used at all.
(Actually, libtool-1.5 does not use any macro named LT_INIT.)

All libtool components which come into the play are already checked
to the sudo cvs tree.  Most importantly, the libtool m4 macro files
from libtool-1.9f are stored in acsite.m4.  IOW, acsite.m4 is a
slightly edited (!) version of
	cat libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4

OTOH, the Autoconf version matters; if you use Autoconf 2.59, like
the sudo developers, it works.

The infinite looping is around m4_car and m4_cdr, from m4sugar.m4
from Autoconf.

When someone broken, errm, I mean, when I fixed the implementation of
those two macros, the macro lt_combine from ltsugar.m4 stopped
working.  Ralf Wildenhues has immediately fixed the problem; the fix
can be extracted from the libtool CVS:
  export CVSROOT=:pserver:anonymous at cvs.savannah.gnu.org:/cvsroot/libtool
  cvs -z3 co -r branch-2-0 libtool/m4
  cvs diff -u -r 1.2.2.1 libtool/m4/ltsugar.m4 >ltsugar.m4.patch

For your convenience, I'm attaching the patch here, together with the
corresponding ChangeLog entries.

I'm going to submit the patch to the sudo project in a few minutes.

Have a nice day,
	Stepan
-------------- next part --------------
2005-06-27  Stepan Kasal  <kasal at ucw.cz>

	* m4/ltsugar.m4 (lt_combine, _lt_combine): Fix default separator.

2005-06-17  Ralf Wildenhues  <Ralf.Wildenhues at gmx.de>

	* m4/ltsugar.m4 (lt_car, lt_cdr): New macros, clones of
	m4_car/m4_cdr with the fixed semantics of Autoconf-2.59c CVS, in
	order to work with 2.59.
	(lt_combine): Use it.
	Reported by Christoph Egger <Christoph_Egger at gmx.de>.

2005-06-11  Ralf Menzel  <menzel at ls6.cs.uni-dortmund.de>,
	    Ralf Wildenhues  <Ralf.Wildenhues at gmx.de>

	* m4/ltsugar.m4 (lt_combine): Don't test against empty quotes,
	test against empty arg.  Fixes infinite m4 loop with CVS
	Autoconf.

Index: m4/ltsugar.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/Attic/ltsugar.m4,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.4
diff -u -r1.2.2.1 -r1.2.2.4
--- m4/ltsugar.m4	9 Jan 2005 13:48:56 -0000	1.2.2.1
+++ m4/ltsugar.m4	27 Jun 2005 14:55:14 -0000	1.2.2.4
@@ -32,19 +32,32 @@
 ])
 
 
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+
+
 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
 # ----------------------------------------------------------
 # Produce a SEP delimited list of all paired combinations of elements of
 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
 # has the form PREFIXmINFIXSUFFIXn.
 m4_define([lt_combine],
-[m4_if([$2], [[]], [],
-       [lt_join(m4_quote(m4_default([$1], [, ])),
-		_$0([$1], m4_car($2)[$3], m4_shiftn(3, $@)),
-		$0([$1], m4_cdr($2), m4_shiftn(2, $@)))])])
+[m4_if([$2], [], [],
+       [lt_join(m4_quote(m4_default([$1], [[, ]])),
+		_$0([$1], lt_car($2)[$3], m4_shiftn(3, $@)),
+		$0([$1], lt_cdr($2), m4_shiftn(2, $@)))])])
 m4_define([_lt_combine],
 [m4_if([$3], [], [],
-       [lt_join(m4_quote(m4_default([$1], [, ])),
+       [lt_join(m4_quote(m4_default([$1], [[, ]])),
 		[$2$3],
 		$0([$1], [$2], m4_shiftn(3, $@)))])[]dnl
 ])


More information about the devel mailing list