From unknown Tue Jun 17 03:40:08 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#25740 <25740@debbugs.gnu.org> To: bug#25740 <25740@debbugs.gnu.org> Subject: Status: Error reporting with confess mangles messages Reply-To: bug#25740 <25740@debbugs.gnu.org> Date: Tue, 17 Jun 2025 10:40:08 +0000 retitle 25740 Error reporting with confess mangles messages reassign 25740 autoconf submitter 25740 Christophe de Dinechin severity 25740 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 15 11:25:41 2017 Received: (at submit) by debbugs.gnu.org; 15 Feb 2017 16:25:42 +0000 Received: from localhost ([127.0.0.1]:41241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ce2Oj-0000Ki-0c for submit@debbugs.gnu.org; Wed, 15 Feb 2017 11:25:41 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51971) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdvTk-0003ZR-TS for submit@debbugs.gnu.org; Wed, 15 Feb 2017 04:02:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdvTb-0002kW-8s for submit@debbugs.gnu.org; Wed, 15 Feb 2017 04:02:19 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.4 required=5.0 tests=BAYES_50,RCVD_IN_SORBS_SPAM, URI_HEX autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42500) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cdvTb-0002kH-5d for submit@debbugs.gnu.org; Wed, 15 Feb 2017 04:02:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdvTZ-00034d-6o for bug-automake@gnu.org; Wed, 15 Feb 2017 04:02:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdvTV-0002hT-Ub for bug-automake@gnu.org; Wed, 15 Feb 2017 04:02:13 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:38595) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cdvTV-0002gb-Ob for bug-automake@gnu.org; Wed, 15 Feb 2017 04:02:09 -0500 Received: by mail-wm0-f47.google.com with SMTP id r141so35287837wmg.1 for ; Wed, 15 Feb 2017 01:02:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=Jm/+fIZ0f4aO3whie1deHbnnmPPjKMiNuH9M6Zny5cY=; b=I82gGYcx3YKwj9DHQR0Jo3vkw8lvUnr872CZKygSUgHKoCHNscU+8RJheP3GTt+Ofq s6s+WlP8nigqHYP+JRBpstxpDzaFptTQt7ZidUhQpupr3n+54xBLoFfrU7lEfH7WifMe Rcb+qEwI/Gapi3lJy8PLXGvFisY8sfhSdi7pr2bFiEC6EyeXfwgYx7aw2LF+mVu+OmJg CFOg62yB9nV4tSRspvcmPKLAsF17za1zl/zlyM8oSygM1L90zFjlHaW8EUaFmz/ghg7Y LdntmTGPEbrQ3EHx/m58i0Xd/sOMBFDNaVOGv5lBW8em9dZdxXVbulP8xmrcO20E8OBD gzyg== X-Gm-Message-State: AMke39lc291WJ//zh5ooaTZiGcrMk739RvOavlVnqztEcqylayC7+rjniIlDR5RhiE8Wt/qA X-Received: by 10.28.229.193 with SMTP id c184mr7537169wmh.83.1487149327387; Wed, 15 Feb 2017 01:02:07 -0800 (PST) Received: from [192.168.77.22] (val06-1-88-182-161-34.fbx.proxad.net. [88.182.161.34]) by smtp.gmail.com with ESMTPSA id w16sm6705659wmd.4.2017.02.15.01.02.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Feb 2017 01:02:06 -0800 (PST) From: Christophe de Dinechin Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Error reporting with confess mangles messages Message-Id: Date: Wed, 15 Feb 2017 10:02:03 +0100 To: bug-automake@gnu.org X-Mailer: Apple Mail (2.3259) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 15 Feb 2017 11:25:40 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.8 (--) I had the following output from running autogen.sh in the spice project = on macOS: Use of uninitialized value $msg in concatenation (.) or string at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032. Use of uninitialized value $stacktrace in pattern match (m//) at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032. unknown channel m4trace: -1- AS_VAR_APPEND(ac_configure_args, " = '$ac_arg'") at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/Channels.pm = line 638. Autom4te::Channels::msg('m4trace: -1- = AS_VAR_APPEND(ac_configure_args, " \'$ac_arg\'")\x{a}', undef, 'warning: = ', 'partial', 0) called at /usr/local/Cellar/autoconf/2.69/bin/autom4te = line 1032 This is with automake 1.15 and autoconf 2.69, installed using Homebrew. Google search showed that this kind of error pops up rather frequently, = here are a few examples: https://github.com/jedisct1/libsodium/issues/217 https://lists.samba.org/archive/samba/2009-November/152184.html = https://lists.gnu.org/archive/html/autoconf/2016-12/msg00003.html = http://lists-archives.com/samba/49430-autogen-sh-failing-over-samba-share.= html http://dangerousprototypes.com/forum/viewtopic.php?f=3D37&t=3D3957= = http://samba.2283325.n4.nabble.com/autogen-sh-failing-over-samba-share-td2= 456468.html Notice how in at least two cases, there is no follow up, because the = message gives no clue at what is actually happening. I added the following instrumentation in autom4te around line 1015: open (my $fh, '>', '/tmp/perldebug'); print $fh "-- Begin warnings --\n"; print $fh contents ("$tmp/warnings=E2=80=9D); print $fh "-- End warnings --\n"; print $fh "Separator '$separator'\n"; close($fh); # Swallow excessive newlines. for (split (/\n*$separator\n*/o, contents ("$tmp/warnings"))) What this showed is that, at that stage, the message was apparently = perfectly legitimate, but nowhere to be found on the console output: -- Begin warnings =E2=80=94 obsolete::configure.ac:34::'AM_CONFIG_HEADER': this macro is obsolete. You should use the 'AC_CONFIG_HEADERS' macro = instead.::/usr/local/Cellar/automake/1.15/share/aclocal-1.15/obsolete.m4:1= 5: AM_CONFIG_HEADER is expanded from... configure.ac:34: the top level ------------------------- END OF WARNING ------------------------- obsolete::configure.ac:189::The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.::../../lib/autoconf/general.m4:2530: = AC_TRY_CPP is expanded from... configure.ac:189: the top level ------------------------- END OF WARNING ------------------------- obsolete::configure.ac:286::AC_OUTPUT should be used without arguments. You should run autoupdate.:: ------------------------- END OF WARNING ------------------------- m4trace: -1- AS_VAR_APPEND(ac_configure_args, " '$ac_arg'") -- End warnings =E2=80=94 The original message seems to be coming from Channels.pm around line = 642, a line that reads: confess "unknown channel $channel" unless exists $channels{$channel}; The same kind of instrumentation added there open (my $fh, '>', '/tmp/perldebug'); print $fh "Unknown channel $channel - We are going to die = horribly\n"; close($fh); This instrumentation showed that the channel name at that level is legit = (it=E2=80=99s =E2=80=9Cfatal=E2=80=9D), nothing like the mangled = =E2=80=98m4trace: -1=E2=80=A6=E2=80=99 mangled stuff that is later sent = to the console: Unknown channel fatal - We are going to die horribly I also checked that the Perl installation is not the problem with the = following test: use Carp qw/croak confess/; sub zoo () { confess "Boo, I'm dead"; } sub bar () { zoo(); } sub foo () { bar(); } foo(); This results in the expected output: Boo, I'm dead at /tmp/truc.pl line 4. main::zoo() called at /tmp/truc.pl line 6 main::bar() called at /tmp/truc.pl line 7 main::foo() called at /tmp/truc.pl line 8 I=E2=80=99ll keep investigating, but I thought this was worth a bug = report as is.= From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 07 17:00:56 2017 Received: (at 25740) by debbugs.gnu.org; 7 Mar 2017 22:00:56 +0000 Received: from localhost ([127.0.0.1]:45127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clNA8-00071P-7N for submit@debbugs.gnu.org; Tue, 07 Mar 2017 17:00:56 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:37625) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clNA6-00071A-HA for 25740@debbugs.gnu.org; Tue, 07 Mar 2017 17:00:55 -0500 Received: by mail-wm0-f52.google.com with SMTP id n11so16652345wma.0 for <25740@debbugs.gnu.org>; Tue, 07 Mar 2017 14:00:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=Q2OKiTv0y6WULIZeBX+TN249dWUADb0Tf9gC192M2z8=; b=bcpZnezfzV6i39t0UlFlCUapHW5pKxSGMhySshKW3/8RstpXpdNT5Z/MuQFXKJ/p0K 05MFrMNtJ9FK6s5shVOM22GKCqRDFmR8eFR8iaWqzhIZzVWb7L1RP4nIbuMBMSg85kON 63c0kY0pWq4QCd4fb0/fgdvsx+0Vv9ubRXnrAPSzz8lwp6O/MnhaHhLJ5QOrVTKW7rQH 80E5nLryptDUtVK+z6QtCNz3P1CWEtD67VEq4/3vdsiAnBQE81YkNiCwwqlzLmeRVmk9 DcC/e05zhrZGNk4Do/WBIFOkcv4CuPpjHLlknZIViPiURMcWFBZr5HR9UHxhkU7W6qrE OtCQ== X-Gm-Message-State: AMke39loLNsyRjr+uOubKMsk6EZod5SSWe4cz9OJneGAkcG3XEaPC7znoMcQyulqgXGGRGCw X-Received: by 10.28.167.203 with SMTP id q194mr11492059wme.111.1488924048343; Tue, 07 Mar 2017 14:00:48 -0800 (PST) Received: from [192.168.77.22] (val06-1-88-182-161-34.fbx.proxad.net. [88.182.161.34]) by smtp.gmail.com with ESMTPSA id v186sm2134169wmv.2.2017.03.07.14.00.47 for <25740@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Mar 2017 14:00:47 -0800 (PST) From: Christophe de Dinechin Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: [PATCH] Swallow m4traces that have no file/line number Message-Id: <466E4AC8-E690-4CFC-B8CB-2BD3699DD9F1@redhat.com> Date: Tue, 7 Mar 2017 23:00:46 +0100 To: 25740@debbugs.gnu.org X-Mailer: Apple Mail (2.3259) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25740 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) The symptoms are something like: Use of uninitialized value $msg in concatenation (.) or string at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032. Use of uninitialized value $stacktrace in pattern match (m//) at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032. unknown channel m4trace: -1- AS_VAR_APPEND(ac_configure_args, " = '$ac_arg'") at = /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/Channels.pm line = 638. Autom4te::Channels::msg('m4trace: -1- = AS_VAR_APPEND(ac_configure_args, " \'$ac_arg\'")\x{a}', undef, 'warning: = ', 'partial', 0) called at /usr/local/Cellar/autoconf/2.69/bin/autom4te = line 1032 The root cause is m4 traces without a file/line number shown. So instead of something like: m4trace:configure.ac:48: -1- ... you have something like: m4trace: -1- ... In the scenarios I ran into, this is due to some error that throws m4 = out. Eliminating these messages from the temporary m4 file being generated (which will not complete anyway) is sufficient for the rest of autoconf to complete, until it prints errors. In my case, the final error looks like: common/Makefile.am:20: error: Libtool library used but 'LIBTOOL' is = undefined common/Makefile.am:20: The usual way to define 'LIBTOOL' is to add = 'LT_INIT' common/Makefile.am:20: to 'configure.ac' and run 'aclocal' and = 'autoconf' again. common/Makefile.am:20: If 'LT_INIT' is in 'configure.ac', make sure common/Makefile.am:20: its definition is in aclocal's search path. autoreconf: automake failed with exit status: 1 But I've seen various reports for other root causes that ran into the = same problem (see bug report) Signed-off-by: Christophe de Dinechin --- bin/autom4te.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/autom4te.in b/bin/autom4te.in index 964ac1a..b3f3831 100644 --- a/bin/autom4te.in +++ b/bin/autom4te.in @@ -821,6 +821,8 @@ EOF my $traces =3D new Autom4te::XFile ($tcache . $req->id, "<"); while ($_ =3D $traces->getline) { + # Traces without file/line + next if (m{^m4trace: -(\d+)- ([^(]+)\((.*)$}); # Trace with arguments, as the example above. We don't try # to match the trailing parenthesis as it might be on a # separate line. --=20 2.10.1 (Apple Git-78) From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 07 17:51:55 2017 Received: (at 25740) by debbugs.gnu.org; 7 Mar 2017 22:51:55 +0000 Received: from localhost ([127.0.0.1]:45155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clNxT-0001Wz-EF for submit@debbugs.gnu.org; Tue, 07 Mar 2017 17:51:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clNxR-0001Wj-Kw for 25740@debbugs.gnu.org; Tue, 07 Mar 2017 17:51:54 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CF9E361BA8; Tue, 7 Mar 2017 22:51:48 +0000 (UTC) Received: from [10.10.124.84] (ovpn-124-84.rdu2.redhat.com [10.10.124.84] (may be forged)) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v27Mpl3g004687; Tue, 7 Mar 2017 17:51:47 -0500 Subject: Re: bug#25740: [PATCH] Swallow m4traces that have no file/line number To: Christophe de Dinechin , 25740@debbugs.gnu.org, Autoconf Patches List References: <466E4AC8-E690-4CFC-B8CB-2BD3699DD9F1@redhat.com> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Organization: Red Hat, Inc. Message-ID: <6ef6ea08-3d23-7c6b-35e4-fb9493ea02c4@redhat.com> Date: Tue, 7 Mar 2017 16:51:46 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <466E4AC8-E690-4CFC-B8CB-2BD3699DD9F1@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vKhbA1EnwgES41ambsg5tV3xa6IOWWpJk" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 07 Mar 2017 22:51:48 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25740 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vKhbA1EnwgES41ambsg5tV3xa6IOWWpJk Content-Type: multipart/mixed; boundary="j08IH2QHANo68aQd7t2UhhW7tM8RCbtpt"; protected-headers="v1" From: Eric Blake To: Christophe de Dinechin , 25740@debbugs.gnu.org, Autoconf Patches List Message-ID: <6ef6ea08-3d23-7c6b-35e4-fb9493ea02c4@redhat.com> Subject: Re: bug#25740: [PATCH] Swallow m4traces that have no file/line number References: <466E4AC8-E690-4CFC-B8CB-2BD3699DD9F1@redhat.com> In-Reply-To: <466E4AC8-E690-4CFC-B8CB-2BD3699DD9F1@redhat.com> --j08IH2QHANo68aQd7t2UhhW7tM8RCbtpt Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable autom4te is maintained by autoconf, not automake; redirecting your patch there. On 03/07/2017 04:00 PM, Christophe de Dinechin wrote: > The symptoms are something like: >=20 > Use of uninitialized value $msg in concatenation (.) or string at /us= r/local/Cellar/autoconf/2.69/bin/autom4te line 1032. > Use of uninitialized value $stacktrace in pattern match (m//) at /usr= /local/Cellar/autoconf/2.69/bin/autom4te line 1032. > unknown channel m4trace: -1- AS_VAR_APPEND(ac_configure_args, " '$ac_= arg'") > at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/Channels.= pm line 638. > Autom4te::Channels::msg('m4trace: -1- AS_VAR_APPEND(ac_configure_= args, " \'$ac_arg\'")\x{a}', undef, 'warning: ', 'partial', 0) called at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032 >=20 > The root cause is m4 traces without a file/line number shown. >=20 > So instead of something like: >=20 > m4trace:configure.ac:48: -1- ... >=20 > you have something like: >=20 > m4trace: -1- ... >=20 > In the scenarios I ran into, this is due to some error that throws m4 o= ut. > Eliminating these messages from the temporary m4 file being generated > (which will not complete anyway) is sufficient for the rest of autoconf= > to complete, until it prints errors. >=20 > In my case, the final error looks like: >=20 > common/Makefile.am:20: error: Libtool library used but 'LIBTOOL' is u= ndefined > common/Makefile.am:20: The usual way to define 'LIBTOOL' is to add = 'LT_INIT' > common/Makefile.am:20: to 'configure.ac' and run 'aclocal' and 'aut= oconf' again. > common/Makefile.am:20: If 'LT_INIT' is in 'configure.ac', make sure= > common/Makefile.am:20: its definition is in aclocal's search path. > autoreconf: automake failed with exit status: 1 >=20 > But I've seen various reports for other root causes that ran into the s= ame > problem (see bug report) >=20 > Signed-off-by: Christophe de Dinechin > --- > bin/autom4te.in | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/bin/autom4te.in b/bin/autom4te.in > index 964ac1a..b3f3831 100644 > --- a/bin/autom4te.in > +++ b/bin/autom4te.in > @@ -821,6 +821,8 @@ EOF > my $traces =3D new Autom4te::XFile ($tcache . $req->id, "<"); > while ($_ =3D $traces->getline) > { > + # Traces without file/line > + next if (m{^m4trace: -(\d+)- ([^(]+)\((.*)$}); Would it be better to keep the error message, but set the file and line to placeholders, instead of completely discarding the message? > # Trace with arguments, as the example above. We don't try > # to match the trailing parenthesis as it might be on a > # separate line. >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --j08IH2QHANo68aQd7t2UhhW7tM8RCbtpt-- --vKhbA1EnwgES41ambsg5tV3xa6IOWWpJk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYvzmCAAoJEKeha0olJ0NqkNMH/i24ZtcpAT+r2MJ+WLv3TwwB hiSuMfWVOKgQdTh15n6lh3RJZu6WNdLG9tnFV8luUl4Oj5Hy8zsDm9cOK2BEp7WP Rl1zlMuFHsWl6eqFrm8b7xqEMifhKWf18pNtFBSfO4lHooyBFUdeQRmczCwDFDpx /vFZqHWTd3M+VbQ5SMk3MNGDyZq4gZ493G3H6Bb8rMtr9y9m5uGUsomvKXWcXSwm yyG8pSh6cTR9gn3KppF+IS7H8/rtIHJnMRXDAVVX1oYZGBFHJ98tt2xUeJ+XQuuJ lnIetEBZ2yIC09dNLmsTJQEnj6JmgLv7ezw5uOIIgLdUrZH9l4PGGymlSylAE4E= =xial -----END PGP SIGNATURE----- --vKhbA1EnwgES41ambsg5tV3xa6IOWWpJk-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 08 02:46:01 2017 Received: (at 25740) by debbugs.gnu.org; 8 Mar 2017 07:46:02 +0000 Received: from localhost ([127.0.0.1]:45313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clWIL-000685-16 for submit@debbugs.gnu.org; Wed, 08 Mar 2017 02:46:01 -0500 Received: from mail-wr0-f170.google.com ([209.85.128.170]:33399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clWIH-00067m-PQ for 25740@debbugs.gnu.org; Wed, 08 Mar 2017 02:45:59 -0500 Received: by mail-wr0-f170.google.com with SMTP id u48so17329997wrc.0 for <25740@debbugs.gnu.org>; Tue, 07 Mar 2017 23:45:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=uS1R4/m+jZVe/cQhJI1mUVbJScbox/jHKXMCoVs0DP8=; b=IzBdOFKyRWlWkHxOFO/dpALbefXjQNq1ESFZlbWHf9nhnzy68QKlHZAsGBksvp+Dgj bX08LZRzCu2kh2Ayyr1HQmvjBZTe0mz4Trz1WuJQhiWV4/EFNSNuc6muGDp5443ZxtTu bsKAekzuDgSjvF4a4HJwOHvxYR2pA5k49+X8fZM/EXgx5w0M9bOSlvg2ZoJ1u4jjkqbP Cg2SEJmq0kQtxmIWOdGuUiZU1IJoWx0yZfx/q56rKor0d+MN4yvKAfwt23FItBJDnHIa YwCxa1gm/M5RBVT5AamSUgx55FII9HlOMf+vNHAuGXWoY9aEslht2/HgbqyolY9F0Roz TOXA== X-Gm-Message-State: AMke39n7ujhQYYYxe+Q9bJDBe3VCvwtgZHxoAr+ffRSYfSJ0ZO3Nj2eY0Hr/Cw14bI0m5jKi X-Received: by 10.223.133.228 with SMTP id 33mr4357871wru.0.1488959151996; Tue, 07 Mar 2017 23:45:51 -0800 (PST) Received: from [192.168.77.22] (val06-1-88-182-161-34.fbx.proxad.net. [88.182.161.34]) by smtp.gmail.com with ESMTPSA id b10sm22043638wmi.34.2017.03.07.23.45.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Mar 2017 23:45:51 -0800 (PST) From: Christophe de Dinechin Message-Id: <5A074384-0EB7-4EE8-BD60-432BFABED957@redhat.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_1B1D5E62-D1FB-4748-B03F-BB178ACFB032" Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: bug#25740: [PATCH] Swallow m4traces that have no file/line number Date: Wed, 8 Mar 2017 08:45:49 +0100 In-Reply-To: <6ef6ea08-3d23-7c6b-35e4-fb9493ea02c4@redhat.com> To: Eric Blake References: <466E4AC8-E690-4CFC-B8CB-2BD3699DD9F1@redhat.com> <6ef6ea08-3d23-7c6b-35e4-fb9493ea02c4@redhat.com> X-Mailer: Apple Mail (2.3259) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25740 Cc: Autoconf Patches List , 25740@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_1B1D5E62-D1FB-4748-B03F-BB178ACFB032 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 7 Mar 2017, at 23:51, Eric Blake wrote: >=20 > autom4te is maintained by autoconf, not automake; redirecting your = patch > there. >=20 > On 03/07/2017 04:00 PM, Christophe de Dinechin wrote: >> The symptoms are something like: >>=20 >> Use of uninitialized value $msg in concatenation (.) or string at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032. >> Use of uninitialized value $stacktrace in pattern match (m//) at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032. >> unknown channel m4trace: -1- AS_VAR_APPEND(ac_configure_args, " = '$ac_arg'") >> at = /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/Channels.pm line = 638. >> Autom4te::Channels::msg('m4trace: -1- = AS_VAR_APPEND(ac_configure_args, " \'$ac_arg\'")\x{a}', undef, 'warning: = ', 'partial', 0) called at /usr/local/Cellar/autoconf/2.69/bin/autom4te = line 1032 >>=20 >> The root cause is m4 traces without a file/line number shown. >>=20 >> So instead of something like: >>=20 >> m4trace:configure.ac:48: -1- ... >>=20 >> you have something like: >>=20 >> m4trace: -1- ... >>=20 >> In the scenarios I ran into, this is due to some error that throws m4 = out. >> Eliminating these messages from the temporary m4 file being generated >> (which will not complete anyway) is sufficient for the rest of = autoconf >> to complete, until it prints errors. >>=20 >> In my case, the final error looks like: >>=20 >> common/Makefile.am:20: error: Libtool library used but 'LIBTOOL' is = undefined >> common/Makefile.am:20: The usual way to define 'LIBTOOL' is to add = 'LT_INIT' >> common/Makefile.am:20: to 'configure.ac' and run 'aclocal' and = 'autoconf' again. >> common/Makefile.am:20: If 'LT_INIT' is in 'configure.ac', make = sure >> common/Makefile.am:20: its definition is in aclocal's search path. >> autoreconf: automake failed with exit status: 1 >>=20 >> But I've seen various reports for other root causes that ran into the = same >> problem (see bug report) >>=20 >> Signed-off-by: Christophe de Dinechin >> --- >> bin/autom4te.in | 2 ++ >> 1 file changed, 2 insertions(+) >>=20 >> diff --git a/bin/autom4te.in b/bin/autom4te.in >> index 964ac1a..b3f3831 100644 >> --- a/bin/autom4te.in >> +++ b/bin/autom4te.in >> @@ -821,6 +821,8 @@ EOF >> my $traces =3D new Autom4te::XFile ($tcache . $req->id, "<"); >> while ($_ =3D $traces->getline) >> { >> + # Traces without file/line >> + next if (m{^m4trace: -(\d+)- ([^(]+)\((.*)$}); >=20 > Would it be better to keep the error message, but set the file and = line > to placeholders, instead of completely discarding the message? I had tried, and that works too in my case. I.e. you can use if this = seems to be better: > Subject: [PATCH 2/2] Alternate fix for #25740 (error reporting mangles > messages) >=20 > The symptoms are something like: >=20 > Use of uninitialized value $msg in concatenation (.) or string at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032. > Use of uninitialized value $stacktrace in pattern match (m//) at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032. > unknown channel m4trace: -1- AS_VAR_APPEND(ac_configure_args, " = '$ac_arg'") > at = /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/Channels.pm line = 638. > Autom4te::Channels::msg('m4trace: -1- = AS_VAR_APPEND(ac_configure_args, " \'$ac_arg\'")\x{a}', undef, 'warning: = ', 'partial', 0) called at /usr/local/Cellar/autoconf/2.69/bin/autom4te = line 1032 >=20 > The root cause is m4 traces without a file/line number shown. >=20 > So instead of something like: >=20 > m4trace:configure.ac:48: -1- ... >=20 > you have something like: >=20 > m4trace: -1- ... >=20 > In the scenarios I ran into, this is due to some error that throws m4 = out. > Eliminating these messages from the temporary m4 file being generated > (which will not complete anyway) is sufficient for the rest of = autoconf > to complete, until it prints errors. >=20 > In my case, the final error looks like: >=20 > common/Makefile.am:20: error: Libtool library used but 'LIBTOOL' is = undefined > common/Makefile.am:20: The usual way to define 'LIBTOOL' is to add = 'LT_INIT' > common/Makefile.am:20: to 'configure.ac' and run 'aclocal' and = 'autoconf' again. > common/Makefile.am:20: If 'LT_INIT' is in 'configure.ac', make = sure > common/Makefile.am:20: its definition is in aclocal's search path. > autoreconf: automake failed with exit status: 1 >=20 > But I've seen various reports for other root causes that ran into the = same > problem (see bug report) >=20 > Signed-off-by: Christophe de Dinechin > --- > bin/autom4te.in | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/bin/autom4te.in b/bin/autom4te.in > index b3f3831..406ebfe 100644 > --- a/bin/autom4te.in > +++ b/bin/autom4te.in > @@ -821,8 +821,6 @@ EOF > my $traces =3D new Autom4te::XFile ($tcache . $req->id, "<"); > while ($_ =3D $traces->getline) > { > - # Traces without file/line > - next if (m{^m4trace: -(\d+)- ([^(]+)\((.*)$}); > # Trace with arguments, as the example above. We don't try > # to match the trailing parenthesis as it might be on a > # separate line. > @@ -831,6 +829,8 @@ EOF > # Traces without arguments, always on a single line. > s{^m4trace:(.+):(\d+): -(\d+)- ([^)]*)\n$} > {AT_$4([$1], [$2], [$3], [$4])\n}; > + s{^m4trace: -(\d+)- ([^(]+)\((.*)$} > + {AT_$2([nowhere], [0], [$1], [$2], $3}; > print $trace_m4 "$_"; > } > $trace_m4->close; > --=20 > 2.10.1 (Apple Git-78) I thought discarding lines that did not seem to correspond to any known = file was more efficient and less risky. >=20 >> # Trace with arguments, as the example above. We don't try >> # to match the trailing parenthesis as it might be on a >> # separate line. >>=20 >=20 > --=20 > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org = --Apple-Mail=_1B1D5E62-D1FB-4748-B03F-BB178ACFB032 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
On 7 Mar 2017, at 23:51, Eric Blake <eblake@redhat.com> = wrote:

autom4te is maintained by autoconf, not = automake; redirecting your patch
there.

On 03/07/2017 04:00 PM, Christophe de Dinechin = wrote:
The symptoms are something = like:

 Use of uninitialized value $msg = in concatenation (.) or string at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032.
 Use of uninitialized value $stacktrace in pattern match = (m//) at /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032.
 unknown channel m4trace: -1- = AS_VAR_APPEND(ac_configure_args, " '$ac_arg'")
  at = /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/Channels.pm line = 638.
     Autom4te::Channels::msg('m4trace:= -1- AS_VAR_APPEND(ac_configure_args, " \'$ac_arg\'")\x{a}', undef, = 'warning: ', 'partial', 0) called at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032

The root cause is m4 traces without a file/line number = shown.

So instead of something like:

  m4trace:configure.ac:48: -1- = ...

you have something like:

 m4trace: -1- ...

In the scenarios I ran into, this is due to some error that = throws m4 out.
Eliminating these messages from the = temporary m4 file being generated
(which will not complete = anyway) is sufficient for the rest of autoconf
to = complete, until it prints errors.

In my = case, the final error looks like:

 common/Makefile.am:20: error: Libtool library used but = 'LIBTOOL' is undefined
 common/Makefile.am:20: =   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
 common/Makefile.am:20:   to 'configure.ac' = and run 'aclocal' and 'autoconf' again.
 common/Makefile.am:20:   If 'LT_INIT' is in = 'configure.ac', make sure
 common/Makefile.am:20: =   its definition is in aclocal's search path.
 autoreconf: automake failed with exit status: 1

But I've seen various reports for other root = causes that ran into the same
problem (see bug report)

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
---
bin/autom4te.in | 2 ++
1 file changed, 2 = insertions(+)

diff --git a/bin/autom4te.in = b/bin/autom4te.in
index 964ac1a..b3f3831 100644
--- a/bin/autom4te.in
+++ b/bin/autom4te.in
@@ -821,6 +821,8 @@ EOF
  my $traces = =3D new Autom4te::XFile ($tcache . $req->id, "<");
  while ($_ =3D $traces->getline)
    {
+ =      # Traces without file/line
+ =      next if (m{^m4trace: -(\d+)- = ([^(]+)\((.*)$});

Would it be better to keep the error = message, but set the file and line
to placeholders, instead of completely = discarding the message?

I had tried, and = that works too in my case. I.e. you can use if this seems to be = better:

Subject: [PATCH 2/2] Alternate fix for = #25740 (error reporting mangles
 messages)

The = symptoms are something like:

  = Use of uninitialized value $msg in concatenation (.) or string at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032.
  = Use of uninitialized value $stacktrace in pattern match (m//) at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032.
  = unknown channel m4trace: -1- AS_VAR_APPEND(ac_configure_args, " = '$ac_arg'")
   at = /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/Channels.pm line = 638.
      = Autom4te::Channels::msg('m4trace: -1- AS_VAR_APPEND(ac_configure_args, " = \'$ac_arg\'")\x{a}', undef, 'warning: ', 'partial', 0) called at = /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032

The = root cause is m4 traces without a file/line number = shown.

So = instead of something like:

   m4trace:configure.ac:48: -1- = ...

you = have something like:

  = m4trace: -1- ...

In the = scenarios I ran into, this is due to some error that throws m4 = out.
Eliminating these messages from the = temporary m4 file being generated
(which = will not complete anyway) is sufficient for the rest of = autoconf
to complete, until it prints = errors.

In my = case, the final error looks like:

  = common/Makefile.am:20: error: Libtool library used but 'LIBTOOL' is = undefined
  common/Makefile.am:20:   The = usual way to define 'LIBTOOL' is to add 'LT_INIT'
  = common/Makefile.am:20:   to 'configure.ac' and run 'aclocal' and = 'autoconf' again.
  = common/Makefile.am:20:   If 'LT_INIT' is in 'configure.ac', make = sure
  common/Makefile.am:20:   its = definition is in aclocal's search path.
  = autoreconf: automake failed with exit status: 1

But = I've seen various reports for other root causes that ran into the = same
problem (see bug = report)

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
---
 bin/autom4te.in | 4 = ++--
 1 file changed, 2 insertions(+), 2 = deletions(-)

diff = --git a/bin/autom4te.in b/bin/autom4te.in
index = b3f3831..406ebfe 100644
--- = a/bin/autom4te.in
+++ = b/bin/autom4te.in
@@ = -821,8 +821,6 @@ EOF
   my $traces =3D new Autom4te::XFile ($tcache . = $req->id, "<");
   while ($_ =3D = $traces->getline)
     {
-  =     # Traces without file/line
-  =     next if (m{^m4trace: -(\d+)- = ([^(]+)\((.*)$});
       # Trace with arguments, as the = example above.  We don't try
       # to match the trailing = parenthesis as it might be on a
       # separate line.
@@ = -831,6 +829,8 @@ EOF
       # Traces without arguments, always = on a single line.
       s{^m4trace:(.+):(\d+): -(\d+)- = ([^)]*)\n$}
        {AT_$4([$1], = [$2], [$3], [$4])\n};
+  =     s{^m4trace: -(\d+)- ([^(]+)\((.*)$}
+ =       {AT_$2([nowhere], [0], [$1], [$2], = $3};
       print = $trace_m4 "$_";
     }
   $trace_m4->close;
-- 
2.10.1 = (Apple Git-78)


I thought = discarding lines that did not seem to correspond to any known file was = more efficient and less risky.


      # Trace with arguments, = as the example above.  We don't try
      # to match the trailing = parenthesis as it might be on a
      # separate line.


-- 
Eric Blake =   eblake redhat com =    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

= --Apple-Mail=_1B1D5E62-D1FB-4748-B03F-BB178ACFB032-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 15 19:53:29 2017 Received: (at control) by debbugs.gnu.org; 15 Jul 2017 23:53:30 +0000 Received: from localhost ([127.0.0.1]:40856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWWsL-0004fT-P3 for submit@debbugs.gnu.org; Sat, 15 Jul 2017 19:53:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWWsL-0004fC-2h for control@debbugs.gnu.org; Sat, 15 Jul 2017 19:53:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWWs9-0002WD-P1 for control@debbugs.gnu.org; Sat, 15 Jul 2017 19:53:24 -0400 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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWWs9-0002W9-LX for control@debbugs.gnu.org; Sat, 15 Jul 2017 19:53:17 -0400 Received: from arennes-653-1-267-199.w109-218.abo.wanadoo.fr ([109.218.42.199]:51242 helo=pc10.home) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dWWs9-0004PM-2r for control@debbugs.gnu.org; Sat, 15 Jul 2017 19:53:17 -0400 Date: Sun, 16 Jul 2017 01:53:15 +0200 Message-Id: <87lgnpcl5g.fsf@pc10.home> To: control@debbugs.gnu.org From: Mathieu Lirzin Subject: control message for bug #25740 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) reassign 25740 autoconf From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 07 14:08:40 2017 Received: (at 25740) by debbugs.gnu.org; 7 Nov 2017 19:08:40 +0000 Received: from localhost ([127.0.0.1]:56993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC9El-0005SO-Pj for submit@debbugs.gnu.org; Tue, 07 Nov 2017 14:08:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC9Ej-0005S3-Rz for 25740@debbugs.gnu.org; Tue, 07 Nov 2017 14:08:38 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BB191C057FA6; Tue, 7 Nov 2017 19:08:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BB191C057FA6 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=eblake@redhat.com Received: from [10.10.125.14] (ovpn-125-14.rdu2.redhat.com [10.10.125.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DF10512F7; Tue, 7 Nov 2017 19:08:27 +0000 (UTC) Subject: Re: bug#25740: [PATCH] Swallow m4traces that have no file/line number To: Christophe de Dinechin References: <466E4AC8-E690-4CFC-B8CB-2BD3699DD9F1@redhat.com> <6ef6ea08-3d23-7c6b-35e4-fb9493ea02c4@redhat.com> <5A074384-0EB7-4EE8-BD60-432BFABED957@redhat.com> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Organization: Red Hat, Inc. Message-ID: <2eabf51d-6fb6-75c2-3aa2-50a09576ef39@redhat.com> Date: Tue, 7 Nov 2017 13:08:26 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <5A074384-0EB7-4EE8-BD60-432BFABED957@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uX3O76A1N1J7TgB7QKCb8s7o8KHTdjq0d" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 07 Nov 2017 19:08:31 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25740 Cc: Autoconf Patches List , 25740@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --uX3O76A1N1J7TgB7QKCb8s7o8KHTdjq0d Content-Type: multipart/mixed; boundary="D2RcmuDMpISSd4xEovLXaNvnVGBRcx4br"; protected-headers="v1" From: Eric Blake To: Christophe de Dinechin Cc: 25740@debbugs.gnu.org, Autoconf Patches List Message-ID: <2eabf51d-6fb6-75c2-3aa2-50a09576ef39@redhat.com> Subject: Re: bug#25740: [PATCH] Swallow m4traces that have no file/line number References: <466E4AC8-E690-4CFC-B8CB-2BD3699DD9F1@redhat.com> <6ef6ea08-3d23-7c6b-35e4-fb9493ea02c4@redhat.com> <5A074384-0EB7-4EE8-BD60-432BFABED957@redhat.com> In-Reply-To: <5A074384-0EB7-4EE8-BD60-432BFABED957@redhat.com> --D2RcmuDMpISSd4xEovLXaNvnVGBRcx4br Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Reviving an old thread: On 03/08/2017 01:45 AM, Christophe de Dinechin wrote: >>> The root cause is m4 traces without a file/line number shown. >>> >>> So instead of something like: >>> >>> m4trace:configure.ac:48: -1- ... >>> >>> you have something like: >>> >>> m4trace: -1- ... >>> >>> +++ b/bin/autom4te.in >>> @@ -821,6 +821,8 @@ EOF >>> my $traces =3D new Autom4te::XFile ($tcache . $req->id, "<"); >>> while ($_ =3D $traces->getline) >>> { >>> + # Traces without file/line >>> + next if (m{^m4trace: -(\d+)- ([^(]+)\((.*)$}); >> >> Would it be better to keep the error message, but set the file and lin= e >> to placeholders, instead of completely discarding the message? >=20 > I had tried, and that works too in my case. I.e. you can use if this se= ems to be better: >=20 >> Subject: [PATCH 2/2] Alternate fix for #25740 (error reporting mangles= >> messages) >> >> The symptoms are something like: >> >> Use of uninitialized value $msg in concatenation (.) or string at /u= sr/local/Cellar/autoconf/2.69/bin/autom4te line 1032. >> Use of uninitialized value $stacktrace in pattern match (m//) at /us= r/local/Cellar/autoconf/2.69/bin/autom4te line 1032. >> unknown channel m4trace: -1- AS_VAR_APPEND(ac_configure_args, " '$ac= _arg'") >> at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/Channels= =2Epm line 638. >> Autom4te::Channels::msg('m4trace: -1- AS_VAR_APPEND(ac_configure= _args, " \'$ac_arg\'")\x{a}', undef, 'warning: ', 'partial', 0) called at= /usr/local/Cellar/autoconf/2.69/bin/autom4te line 1032 >> >> The root cause is m4 traces without a file/line number shown. >> >> So instead of something like: >> >> m4trace:configure.ac:48: -1- ... >> >> you have something like: >> >> m4trace: -1- ... >> >> In the scenarios I ran into, this is due to some error that throws m4 = out. >> Eliminating these messages from the temporary m4 file being generated >> (which will not complete anyway) is sufficient for the rest of autocon= f >> to complete, until it prints errors. >> >> In my case, the final error looks like: >> >> common/Makefile.am:20: error: Libtool library used but 'LIBTOOL' is = undefined >> common/Makefile.am:20: The usual way to define 'LIBTOOL' is to add= 'LT_INIT' >> common/Makefile.am:20: to 'configure.ac' and run 'aclocal' and 'au= toconf' again. >> common/Makefile.am:20: If 'LT_INIT' is in 'configure.ac', make sur= e >> common/Makefile.am:20: its definition is in aclocal's search path.= >> autoreconf: automake failed with exit status: 1 >> >> But I've seen various reports for other root causes that ran into the = same >> problem (see bug report) >> >> Signed-off-by: Christophe de Dinechin >> --- >> bin/autom4te.in | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/bin/autom4te.in b/bin/autom4te.in >> index b3f3831..406ebfe 100644 >> --- a/bin/autom4te.in >> +++ b/bin/autom4te.in >> @@ -821,8 +821,6 @@ EOF >> my $traces =3D new Autom4te::XFile ($tcache . $req->id, "<"); >> while ($_ =3D $traces->getline) >> { >> - # Traces without file/line >> - next if (m{^m4trace: -(\d+)- ([^(]+)\((.*)$}); >> # Trace with arguments, as the example above. We don't try >> # to match the trailing parenthesis as it might be on a >> # separate line. >> @@ -831,6 +829,8 @@ EOF >> # Traces without arguments, always on a single line. >> s{^m4trace:(.+):(\d+): -(\d+)- ([^)]*)\n$} >> {AT_$4([$1], [$2], [$3], [$4])\n}; >> + s{^m4trace: -(\d+)- ([^(]+)\((.*)$} >> + {AT_$2([nowhere], [0], [$1], [$2], $3}; Yes, I like this approach better. I really need to find time to get autoconf 2.70 out the door... --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org --D2RcmuDMpISSd4xEovLXaNvnVGBRcx4br-- --uX3O76A1N1J7TgB7QKCb8s7o8KHTdjq0d Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAloCBKoACgkQp6FrSiUn Q2ok8gf9FzHXw73STgXkaDiYps2cH88mF3Xwa2KRsLpc3TRHqAM+/+e1i8qPoGzZ /x7EV/v/B+cNsmO1mCt9b6q/O2GbPx57TFP7kfLfMnXcQBXhmxA59kboh5VQp7QT JSMOBU4s2GdZDOsqAemoGlO4soaDoCovIwgxfc1I0xGlbX9wiYalHrn7WBnq/Ean DEW34g66F/Dk+8kgELhN7uB71NvnwQcsUkAFqg4epG0MDZIZRK8Fp1Sg381L3fAW j1tASRWRwWqjTJl9uRepm4906gVZG3LuDuXvMsbcxiUeMpb3je11lChJo/WqyAio oBe9NW77AuBtY0w0rAAbFwJVRxxmlw== =VDin -----END PGP SIGNATURE----- --uX3O76A1N1J7TgB7QKCb8s7o8KHTdjq0d-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 07 14:33:21 2017 Received: (at 25740) by debbugs.gnu.org; 7 Nov 2017 19:33:21 +0000 Received: from localhost ([127.0.0.1]:57032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC9cf-00065l-60 for submit@debbugs.gnu.org; Tue, 07 Nov 2017 14:33:21 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC9cd-00065X-OC for 25740@debbugs.gnu.org; Tue, 07 Nov 2017 14:33:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eC9cX-0003oC-VO for 25740@debbugs.gnu.org; Tue, 07 Nov 2017 14:33:14 -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,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57007) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eC9cP-0003ig-QI; Tue, 07 Nov 2017 14:33:05 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1eC9cP-0006Mx-GP; Tue, 07 Nov 2017 14:33:05 -0500 From: Glenn Morris To: Eric Blake Subject: Re: bug#25740: [PATCH] Swallow m4traces that have no file/line number References: <466E4AC8-E690-4CFC-B8CB-2BD3699DD9F1@redhat.com> <6ef6ea08-3d23-7c6b-35e4-fb9493ea02c4@redhat.com> <5A074384-0EB7-4EE8-BD60-432BFABED957@redhat.com> <2eabf51d-6fb6-75c2-3aa2-50a09576ef39@redhat.com> X-Spook: import Burst Suspicious package Drug trade Tuberculosis X-Ran: C6dO#+sC?U(sd$aJM9u`VMY|J3:sno)["{T'Ry+C+-P[xd=hEimd3gvTYZ-'[f-~bpZM}7 X-Hue: red X-Attribution: GM Date: Tue, 07 Nov 2017 14:33:05 -0500 In-Reply-To: <2eabf51d-6fb6-75c2-3aa2-50a09576ef39@redhat.com> (Eric Blake's message of "Tue, 7 Nov 2017 13:08:26 -0600") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25740 Cc: Christophe de Dinechin , Autoconf Patches List , 25740@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) I was wondering why this mail ended up on the help-debbugs list. I see it was reassigned from automake (which uses debbugs.gnu.org) to autoconf (which doesn't and therefore has no maintainer address). Bug#25740 should perhaps be dropped from the cc and closed. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 04 10:18:46 2020 Received: (at 25740) by debbugs.gnu.org; 4 Sep 2020 14:18:46 +0000 Received: from localhost ([127.0.0.1]:40249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kECYA-0005Uh-51 for submit@debbugs.gnu.org; Fri, 04 Sep 2020 10:18:46 -0400 Received: from mailbackend.panix.com ([166.84.1.89]:57586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kECY6-0005UW-J3 for 25740@debbugs.gnu.org; Fri, 04 Sep 2020 10:18:44 -0400 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by mailbackend.panix.com (Postfix) with ESMTPSA id 4BjftB2d3pz18T3 for <25740@debbugs.gnu.org>; Fri, 4 Sep 2020 10:18:42 -0400 (EDT) Received: by mail-ed1-f53.google.com with SMTP id g4so6308560edk.0 for <25740@debbugs.gnu.org>; Fri, 04 Sep 2020 07:18:42 -0700 (PDT) X-Gm-Message-State: AOAM532+Cph49n+4KjRI9HB3LfTs1FVhPZaevCjnfBn9meHfBwrnclla yrxSe555qRjxJv6Wfg/2QEMUEPVjK5kU8r7N2hA= X-Google-Smtp-Source: ABdhPJyqteq1knufRoUlkMNBIJGvUuubdXGkvFOvBLUf+tplrCKVy8FZzAgHjtIHBUqx/HnNhywmc0tw35miMgcG49Q= X-Received: by 2002:a50:f081:: with SMTP id v1mr9002009edl.161.1599229121217; Fri, 04 Sep 2020 07:18:41 -0700 (PDT) MIME-Version: 1.0 From: Zack Weinberg Date: Fri, 4 Sep 2020 10:18:30 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Swallow m4traces that have no file/line number To: Christophe de Dinechin Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 25740 Cc: Autoconf patches , 25740@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) I would like to get this bug fixed for autoconf 2.70, but the trouble is I have no idea how to reproduce the problem on my computer. The various old reports you originally linked to, all seem to involve filesystem-level bugs on MacOS, which I don't have convenient access to, or with archaic versions of the Linux CIFS driver. You wrote: > The root cause is m4 traces without a file/line number shown. > So instead of something like: > > m4trace:configure.ac:48: -1- ... > > you have something like: > > m4trace: -1- ... > > In the scenarios I ran into, this is due to some error that throws m4 out. Are you aware of a way to reproduce this effect on an ordinary local file system? If so, can you send me a minimal configure.ac, plus any other necessary files, and instructions for using them to make m4 do this? zw