bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Libtool test failure with current master


From: Eric Blake
Subject: Re: Libtool test failure with current master
Date: Wed, 15 Oct 2008 21:10:07 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:

>   configure.ac:4: error: m4_divert_require: circular dependency of 
_AS_LINENO_PREPARE

OK, I see it now.

_AS_LINENO_PREPARE uses AS_ERROR
AS_ERROR uses AS_MESSAGE
AS_MESSAGE, when AS_MESSAGE_LOG_FD is nonempty, uses _AS_ECHO_LOG
_AS_ECHO_LOG requires _AS_LINENO_PREPARE

So I think the immediate solution (from the m4sh side of things) is to break 
the loop by making _AS_LINENO_PREPARE assume that a logging fd is not yet set 
up.  Below is the patch I'm still testing, to see if it resolves the issue.

Ultimately, we need to make AS_ERROR and friends be functions (cf. gnulib-tool 
func_fatal_error, or m4's bootstrap with func_echo, func_error, 
func_fatal_error).  Then the functions should be smart enough to know when 
there is a log fd, and when there is not, so that m4sh clients don't need to 
mess around with when it is okay to leave AS_MESSAGE_LOG_FD defined.

Meanwhile, from the libtool side of things, let's wait for the m4sh changes 
stabilize, then rewrite libtool's use of m4sh to stick to only the things in 
the manual.  But yes, I want to make sure that autoconf 2.64 can still be used 
with stock libtool 2.2.6's abuse of m4sh internals, and conversely that the 
next libtool updated to use documented m4sh 2.64 interfaces still has fallbacks 
to work with 2.63 and earlier.

diff --git a/ChangeLog b/ChangeLog
index 8c662f0..0a3d58b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-10-15  Eric Blake  <address@hidden>
 
+       Break circular require chain in _AS_LINENO_PREPARE.
+       * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Ensure that logging is
+       disabled when reporting LINENO failure, since logging requires
+       LINENO.
+
+2008-10-15  Eric Blake  <address@hidden>
+
        Add m4_curry.
        * lib/m4sugar/m4sugar.m4 (m4_curry, _m4_curry): New macros.
        * tests/m4sugar.at (m4@&address@hidden): Rename...
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 58fef10..9bc9dc4 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -956,6 +956,9 @@ m4_defun([_AS_LINENO_PREPARE],
 [AS_REQUIRE([_AS_CR_PREPARE])dnl
 AS_REQUIRE([_AS_ME_PREPARE])dnl
 _AS_DETECT_SUGGESTED([_AS_LINENO_WORKS])dnl
+dnl Even if the logging fd is open, we don't want to use $LINENO in the
+dnl AS_ERROR complaining that LINENO is broken.
+dnl m4_pushdef([AS_MESSAGE_LOG_FD])dnl
 _AS_LINENO_WORKS || {
 
   dnl Create $as_me.lineno as a copy of $as_myself, but with $LINENO
@@ -992,6 +995,7 @@ _AS_LINENO_WORKS || {
   # Exit status is that of the last command.
   exit
 }
+dnl m4_popdef([AS_MESSAGE_LOG_FD])dnl
 ])# _AS_LINENO_PREPARE
 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]