On 2024-06-29 07:28, Dave Hart wrote:
> I'm seeing a regression building ntpd on FreeBSD 12.1 amd64 with
> Autoconf 2.71 between Automake 1.16.5 and 1.16.92.  I haven't filed a
> bug report yet as I'm trying to do my part to characterize it well and
> provide an easy reproduction.  It may well be a bug in our use of
> Automake, in which case I apologize in advance, but I wanted to give a
> heads-up in case it affects a decision to release 1.17 before I get a
> good report together.
> 
> The divergence in behavior starts with:
> 
> autoreconf: configure.ac: not using Libtool

This is the first problem, so if you focus on solving this one probably
the later problems are all related.

Without a reproducer to look at I can only speculate why things are going
wrong for you.  But here is some details which might help your debug:

autoreconf decides to run libtoolize based on an m4 trace right after
it runs aclocal, looking for expansion of LT_INIT (or the older
AC_PROG_LIBTOOL).

This means that for this to work at all:

 (1) a macro definition of LT_INIT must be available at this time, and
 (2) the LT_INIT macro must actually be expanded directly, and
 (3) tracing must not be disabled.

Normally aclocal will take care of (1).  Since this tool is part of
Automake, this is something you have changed in your setup so it's
plausible this is the underlying cause of your problem.

aclocal works basically by grepping your configure.ac and all the files
it knows about looking for things that look like macro definitions and 
things that look like macro expansions, and copying in any missing
definitions.  So for this to work:

  (1.1) aclocal must know where to find the definition of LT_INIT.
  (1.2) aclocal must see the place where LT_INIT is expanded.

Normally, aclocal and libtool are installed to the same prefix, libtool
will install its macros into the default aclocal search path, and
aclocal will find the macro definitions.  If they are installed into
different prefixes, aclocal will need help, you can use the dirlist
mechanism (recommended for a permanent installation) or for a quick fix,
set the ACLOCAL_PATH environment variable to the installed location of
the libtool macros.

Another way this can work is if aclocal happens to pick up the macros
copied into the package from a prior run of libtoolize.

So check the generated aclocal.m4 after running autoreconf when you
encounter this problem.  I suspect that the libtool macros are missing
(noting that they may be incorporated indirectly via m4_include).

Hope that helps,
  Nick

Reply via email to