[Top][All Lists]

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

Re: user _m4_divert_diversion error

From: Akim Demaille
Subject: Re: user _m4_divert_diversion error
Date: 25 Mar 2002 09:49:11 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

| I maintain a small open source program called kionjb. I got the following bug 
| report from a user.
| > "Configure" is o.k., but "make" is stopping with the error
| > 
| > cd . && autoheader
| > ./aclocal.m4:2508: error: m4_defn: undefined macro: _m4_divert_diversion
| > acfunctions.m4:1108: AM_FUNC_OBSTACK is expanded from...
| > ./aclocal.m4:2508: the top level
| > autoconf: tracing failed
| > make: *** [] Error 1
| Can you help me troubleshoot his problem? My first confusion is trying to 
| figure out why the auto* tools are running at all. He's simply trying to 
| compile my source tarball. My understanding of the auto* tools was that the 
| user didn't need to have them installed, and thus they shouldn't run during a 
| normal ./configure && make build process. The source tarball is built by a 
| 'make dist' using a Makefile generate by automake.

Read the documentation.

New Macros

   Because Autoconf has been dormant for years, Automake provided
Autoconf-like macros for a while.  Autoconf 2.50 now provides better
versions of these macros, integrated in the `AC_' namespace, instead of
`AM_'.  But in order to ease the upgrading via `autoupdate', bindings
to such `AM_' macros are provided.

   Unfortunately Automake did not quote the name of these macros!
Therefore, when `m4' finds something like `AC_DEFUN(AM_TYPE_PTRDIFF_T,
...)' in `aclocal.m4', `AM_TYPE_PTRDIFF_T' is expanded, replaced with
its Autoconf definition.

   Fortunately Autoconf catches pre-`AC_INIT' expansions, and will
complain, in its own words:

     $ cat
     $ aclocal-1.4
     $ autoconf
     ./aclocal.m4:17: error: m4_defn: undefined macro: _m4_divert_diversion
     actypes.m4:289: AM_TYPE_PTRDIFF_T is expanded from...
     ./aclocal.m4:17: the top level

   Future versions of Automake will simply no longer define most of
these macros, and will properly quote the names of the remaining macros.
But you don't have to wait for it to happen to do the right thing right
now: do not depend upon macros from Automake as it is simply not its job
to provide macros (but the one it requires by itself):

     $ cat
     $ rm aclocal.m4
     $ autoupdate
     autoupdate: `' is updated
     $ cat
     $ aclocal-1.4
     $ autoconf

reply via email to

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