GNU bug report logs - #19311
AC_PROG_CC can force wrong $ac_aux_dir definition in automake 1.14

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: automake; Severity: minor; Reported by: Jan Engelhardt <jengelh@HIDDEN>; dated Mon, 8 Dec 2014 17:32:02 UTC; Maintainer for automake is bug-automake@HIDDEN.
Severity set to 'minor' from 'normal' Request was from Stefano Lattarini <stefano.lattarini@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Changed bug title to 'AC_PROG_CC can force wrong $ac_aux_dir definition in automake 1.14' from 'regression: 1.14 may use ac_aux_dir before defined (again)' Request was from Stefano Lattarini <stefano.lattarini@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 19311 <at> debbugs.gnu.org:


Received: (at 19311) by debbugs.gnu.org; 17 Dec 2014 14:10:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 09:10:27 2014
Received: from localhost ([127.0.0.1]:48568 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y1FJ3-0003zJ-G3
	for submit <at> debbugs.gnu.org; Wed, 17 Dec 2014 09:10:26 -0500
Received: from mail-wi0-f181.google.com ([209.85.212.181]:48421)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <stefano.lattarini@HIDDEN>)
 id 1Y1FIz-0003z1-RJ; Wed, 17 Dec 2014 09:10:22 -0500
Received: by mail-wi0-f181.google.com with SMTP id r20so16232218wiv.2
 for <multiple recipients>; Wed, 17 Dec 2014 06:10:21 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=message-id:date:from:mime-version:to:subject:references:in-reply-to
 :content-type:content-transfer-encoding;
 bh=JvMwJ1CAxMq17FhqsXL6lt69t4EY38H3tsHzHxFwaX0=;
 b=VnFhIg5mQsMxOb8EuqPKv7Afi7TuG195xoOrKO+h1PbNoel8XPsrbWRB0UpPTVhINz
 JlvZS8dxSk0maqoJUVlkwRTxtQwN7t4tyEKjO2duHaEVNqKayWAUTmmOTPm35imak5yB
 02C4RhuNsFkN3wfeoQOnEb8oWQbLEh3fEVrVaRPl1BMx9pM65JD0jkRCvFZMW54TJekI
 vWGlfk+q+vWh8jCKWXiJ5PNRogMjEmS4ZQr0+kVS9yX3TTLifz2KO2UC4t7+Sh1PifH9
 X/RecP+0go7E86ZvRtOP63xiYHIkr6HhACzglXr6Kf/tQcGnyf13KqBSAcCwNSz9Ye7l
 T9LQ==
X-Received: by 10.194.90.193 with SMTP id by1mr63489098wjb.12.1418825421146;
 Wed, 17 Dec 2014 06:10:21 -0800 (PST)
Received: from [192.168.0.101]
 (host159-94-dynamic.7-79-r.retail.telecomitalia.it. [79.7.94.159])
 by mx.google.com with ESMTPSA id x2sm5270695wjx.9.2014.12.17.06.10.20
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 17 Dec 2014 06:10:20 -0800 (PST)
Message-ID: <54918ECB.3010601@HIDDEN>
Date: Wed, 17 Dec 2014 15:10:19 +0100
From: Stefano Lattarini <stefano.lattarini@HIDDEN>
MIME-Version: 1.0
To: Jan Engelhardt <jengelh@HIDDEN>, 19311 <at> debbugs.gnu.org, 
 Eric Blake <eblake@HIDDEN>
Subject: Re: bug#19311: regression: 1.14 may use ac_aux_dir before defined
 (again)
References: <alpine.LSU.2.11.1412081805220.11820@HIDDEN>
In-Reply-To: <alpine.LSU.2.11.1412081805220.11820@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19311
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

retitle 19311 AC_PROG_CC can force wrong $ac_aux_dir definition in automake 1.14
severity 19311 minor
thanks

On 12/08/2014 06:15 PM, Jan Engelhardt wrote:
>
> When AC_SYSTEM_EXTENSIONS precedes AM_INIT_AUTOMAKE, it used to throw an
> error - which has been fixed in
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15981 .
>
> I have here another instance of what appears to be a similar issue. This
> one is also a regression (used to work in 1.13.4), and the regression is
> still present in {automake 1.14.1 + patch from #15981}. The problem
> originates in libmemcached/configure.ac, and I have produced the
> following reduced testcase that exhibits the issue:
>
> $ cat <<EOF >configure.ac
> AC_INIT([foo], [0])
> AC_PROG_CC([cc gcc clang])
> AC_CONFIG_AUX_DIR([build-aux])
> AC_CONFIG_MACRO_DIR([m4])
> AM_INIT_AUTOMAKE([1.11 subdir-objects foreign])
> AC_OUTPUT([Makefile])
> EOF
> $ echo '' >Makefile.am
> $ md m4
> $ autoreconf -fi
> configure.ac:2: installing 'build-aux/compile'
> configure.ac:5: installing 'build-aux/install-sh'
> configure.ac:5: installing 'build-aux/missing'
> $ ./configure
> checking for cc... cc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether cc accepts -g... yes
> checking for cc option to accept ISO C89... none needed
> configure: error: cannot find install-sh, install.sh, or shtool in "." "./.."
> "./../.."
>
> With automake-1.13.4, configure would succeed through to the end
> ("config.status: creating Makefile").
>
>
This is due to the fact that automake actually rewrite AC_PROG_CC
in order to integrate it with the 'compile' script, and to do so, it
needs the $am_aux_dir variable to be defined.  That in turns requires
AC_CONFIG_AUX_DIR to be called beforehand.  If that macro isn't
called explicitly before the AC_PROG_CC invocation, then the code in
AM_AUX_DIR_EXPAND will force-expand it with its default behavior,
which is to have configure look into '.', '..' and '../..' for the
required auxiliary scripts, and bail out if they are not found.
Which is what is causing your issue.

The issue can be solved by moving the AC_CONFIG_AUX_DIR call before
the AC_PROG_CC call.  Arguably, a more user-friendly behavior would
be to automake patch AC_CONFIG_AUX_DIR so that it fails hard and with
a clear error message if it gets invoked after AM_AUX_DIR_EXPAND has
been called (explicitly or implicitly).  Patches welcome (either for
code or docs).

An even better solution *might* be to shuffle the expansion of
AC_CONFIG_AUX_DIR so that it goes immediately after the AC_INIT
explansion, but that requires more m4 magic than my rusty brain
can grasp at the momwnt; and in addition, I'm not sure whether
such a change could cause new backward incompatibilities (possibly
subtle ones).  Looping in Eric,Blake explicitly, who, being the m4
maintainer and one of the main Autoconf devs, is probably the best
person to give feedback.

Thanks,
   Stefano






Information forwarded to bug-automake@HIDDEN:
bug#19311; Package automake. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Dec 2014 17:31:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 08 12:31:07 2014
Received: from localhost ([127.0.0.1]:57893 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xy29K-0003q3-Vv
	for submit <at> debbugs.gnu.org; Mon, 08 Dec 2014 12:31:07 -0500
Received: from eggs.gnu.org ([208.118.235.92]:59974)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <jengelh@HIDDEN>) id 1Xy29F-0003m6-6s
 for submit <at> debbugs.gnu.org; Mon, 08 Dec 2014 12:31:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jengelh@HIDDEN>) id 1Xy28Z-0006sS-FT
 for submit <at> debbugs.gnu.org; Mon, 08 Dec 2014 12:31:00 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:58750)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jengelh@HIDDEN>) id 1Xy28Z-0006SJ-D6
 for submit <at> debbugs.gnu.org; Mon, 08 Dec 2014 12:30:19 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58440)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jengelh@HIDDEN>) id 1Xy1uI-0001Kk-1B
 for bug-automake@HIDDEN; Mon, 08 Dec 2014 12:15:38 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jengelh@HIDDEN>) id 1Xy1uD-0001ok-P5
 for bug-automake@HIDDEN; Mon, 08 Dec 2014 12:15:33 -0500
Received: from ares08.inai.de ([46.4.84.70]:46360)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jengelh@HIDDEN>) id 1Xy1uD-0001oc-Hw
 for bug-automake@HIDDEN; Mon, 08 Dec 2014 12:15:29 -0500
Received: by ares08.inai.de (Postfix, from userid 25121)
 id CA80C100E538C; Mon,  8 Dec 2014 18:15:26 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
 by ares08.inai.de (Postfix) with ESMTP id B8DEC18056C45
 for <bug-automake@HIDDEN>; Mon,  8 Dec 2014 18:15:26 +0100 (CET)
Date: Mon, 8 Dec 2014 18:15:26 +0100 (CET)
From: Jan Engelhardt <jengelh@HIDDEN>
To: bug-automake@HIDDEN
Subject: regression: 1.14 may use ac_aux_dir before defined (again)
Message-ID: <alpine.LSU.2.11.1412081805220.11820@HIDDEN>
User-Agent: Alpine 2.11 (LSU 23 2013-08-11)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)


When AC_SYSTEM_EXTENSIONS precedes AM_INIT_AUTOMAKE, it used to throw an 
error - which has been fixed in
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15981 .

I have here another instance of what appears to be a similar issue. This 
one is also a regression (used to work in 1.13.4), and the regression is 
still present in {automake 1.14.1 + patch from #15981}. The problem 
originates in libmemcached/configure.ac, and I have produced the 
following reduced testcase that exhibits the issue:

$ cat <<EOF >configure.ac
AC_INIT([foo], [0])
AC_PROG_CC([cc gcc clang])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 subdir-objects foreign])
AC_OUTPUT([Makefile])
EOF
$ echo '' >Makefile.am
$ md m4
$ autoreconf -fi
configure.ac:2: installing 'build-aux/compile'
configure.ac:5: installing 'build-aux/install-sh'
configure.ac:5: installing 'build-aux/missing'
$ ./configure
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.."
"./../.."

With automake-1.13.4, configure would succeed through to the end 
("config.status: creating Makefile").




Acknowledgement sent to Jan Engelhardt <jengelh@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-automake@HIDDEN. Full text available.
Report forwarded to bug-automake@HIDDEN:
bug#19311; Package automake. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 17 Dec 2014 14:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.