From unknown Sun Jun 22 08:06:09 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#68674] recommending autoreconf -f when version mismatch Resent-From: Karl Berry Original-Sender: "Debbugs-submit" Resent-CC: automake-patches@gnu.org Resent-Date: Tue, 23 Jan 2024 16:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68674 X-GNU-PR-Package: automake-patches X-GNU-PR-Keywords: To: 68674@debbugs.gnu.org X-Debbugs-Original-To: automake-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170602622710975 (code B ref -1); Tue, 23 Jan 2024 16:11:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jan 2024 16:10:27 +0000 Received: from localhost ([127.0.0.1]:43820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSJM3-0002qw-7l for submit@debbugs.gnu.org; Tue, 23 Jan 2024 11:10:27 -0500 Received: from lists.gnu.org ([2001:470:142::17]:56450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSJM0-0002qf-HH for submit@debbugs.gnu.org; Tue, 23 Jan 2024 11:10:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSJLq-0001fL-6T for automake-patches@gnu.org; Tue, 23 Jan 2024 11:10:14 -0500 Received: from frenzy.freefriends.org ([198.99.81.75] helo=freefriends.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSJLn-0005yv-V7 for automake-patches@gnu.org; Tue, 23 Jan 2024 11:10:13 -0500 X-Envelope-From: karl@freefriends.org X-Envelope-To: Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 40NGA90B014964 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 23 Jan 2024 09:10:09 -0700 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 40NGA9Dl014956; Tue, 23 Jan 2024 09:10:09 -0700 Date: Tue, 23 Jan 2024 09:10:09 -0700 Message-Id: <202401231610.40NGA9Dl014956@freefriends.org> From: Karl Berry Received-SPF: pass client-ip=198.99.81.75; envelope-from=karl@freefriends.org; helo=freefriends.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) 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: -1.0 (-) The patch below changes the wording of the "version mismatch" errors to recommend running autoreconf -f. If anyone sees any problems with the idea, or the wording, let me know. I discovered this when trying out the last automake pretest. After configuring with the new automake, I then went back to the released automake version, provoking the error: configure.ac:26: error: version mismatch. This is Automake 1.16.5, configure.ac:26: but the definition used by this AM_INIT_AUTOMAKE configure.ac:26: comes from Automake 1.16j. You should recreate configure.ac:26: aclocal.m4 with aclocal and run automake again. However, running aclocal && automake did not change anything. The problem was not (just) aclocal.m4, but the autom4te.cache/ files, which aclocal and automake do not touch. The new message is: configure.ac:6: error: version mismatch. This is Automake 1.16.90, configure.ac:6: but the definition used by this AM_INIT_AUTOMAKE configure.ac:6: comes from Automake 1.16.5. You should run configure.ac:6: autoreconf -f (or otherwise erase all old files, run configure.ac:6: aclocal to recreate aclocal.m4, and rerun automake). I also tweaked the manual to suggest autoreconf in another place. Comments/corrections/criticisms/whatever welcome ... --thanks, karl. ----------------------------------------------------------------------------- automake: recommend autoreconf -f with version mismatches. * bin/automake.in (scan_autoconf_traces): change error to suggest running autoreconf -f. The version mismatch is most likely to happen due to the cache files, which aclocal && automake (the previous recommendation) does not delete. (scan_autoconf_files): likewise. * doc/automake.texi (Auto-generating aclocal.m4): mention autoreconf. Other minor wording changes. diff --git a/bin/automake.in b/bin/automake.in index f568773eb..0499d81eb 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -5442,8 +5442,9 @@ sub scan_autoconf_traces error ($where, "version mismatch. This is Automake $VERSION,\n" . "but the definition used by this AM_INIT_AUTOMAKE\n" . - "comes from Automake $args[1]. You should recreate\n" . - "aclocal.m4 with aclocal and run automake again.\n", + "comes from Automake $args[1]. You should run\n" . + "autoreconf -f (or otherwise erase all old files,\n" . + "recreate aclocal.m4 with aclocal, and rerun automake).", # $? = 63 is used to indicate version mismatch to missing. exit_code => 63) if $VERSION ne $args[1]; @@ -5621,9 +5622,10 @@ sub scan_autoconf_files () if (-f 'aclocal.m4') { error ($seen_init_automake, - "your implementation of AM_INIT_AUTOMAKE comes from " . - "an\nold Automake version. You should recreate " . - "aclocal.m4\nwith aclocal and run automake again", + "your implementation of AM_INIT_AUTOMAKE comes from\n" . + "an old Automake version. You should run\n" . + "autoreconf -f (or otherwise erase all old files, run\n" . + "aclocal to remake aclocal.m4, and rerun automake).", # $? = 63 is used to indicate version mismatch to missing. exit_code => 63); } @@ -5632,8 +5634,8 @@ sub scan_autoconf_files () error ($seen_init_automake, "no proper implementation of AM_INIT_AUTOMAKE was " . "found,\nprobably because aclocal.m4 is missing.\n" . - "You should run aclocal to create this file, then\n" . - "run automake again"); + "You should run autoreconf -f (or aclocal to create\n" . + "this file, then rerun automake)."); } } } diff --git a/doc/automake.texi b/doc/automake.texi index ecefe2dc6..d30905e0f 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -3276,7 +3276,7 @@ macros installed in a system-wide directory; @pxref{aclocal Invocation}). @node aclocal Invocation @section Auto-generating aclocal.m4 -@c This node used to be named "Invoking automake". This @anchor +@c This node used to be named "Invoking aclocal". This @anchor @c allows old links to still work. @anchor{Invoking aclocal} @@ -3335,9 +3335,15 @@ autoconf, The Autoconf Manual}) in order to trace the macros that are used, and omit from @file{aclocal.m4} all macros that are mentioned but otherwise unexpanded (this can happen when a macro is called conditionally). @command{autom4te} is expected to be in the -@env{PATH}, just as @command{autoconf}. Its location can be +@env{PATH}, just like @command{autoconf}. Its location can be overridden using the @env{AUTOM4TE} environment variable. +Although this section explains the details of @command{aclocal}, in +practice it is usually simpler to run @command{autoreconf}, instead of +worrying about the required order of the various tools +(@pxref{autoreconf Invocation, , Using @command{autoreconf}, +autoconf, The Autoconf Manual}). + @menu * aclocal Options:: Options supported by aclocal * Macro Search Path:: How aclocal finds .m4 files @@ -5686,13 +5692,13 @@ this issue because older Automake versions used to call @command{libtoolize}. Since Automake 1.6, it has been decided that running -@command{libtoolize} was none of Automake's business. Instead, that +@command{libtoolize} was not Automake's business. Instead, that functionality has been moved into the @command{autoreconf} command (@pxref{autoreconf Invocation, , Using @command{autoreconf}, autoconf, The Autoconf Manual}). If you do not want to remember what to run and -when, just learn the @command{autoreconf} command. Hopefully, -replacing existing @file{bootstrap} or @file{autogen.sh} scripts by -a call to @command{autoreconf} should also free you from any similar +when, just remember the @command{autoreconf} command. Hopefully, +replacing existing @file{bootstrap} or @file{autogen.sh} scripts by a +call to @command{autoreconf} should also free you from any similar incompatible change in the future. @node Objects created both with libtool and without @@ -8092,8 +8098,8 @@ Here are the current support plans. Currently Automake provides support for Texinfo and man pages. @menu -* Texinfo:: Texinfo -* Man Pages:: Man pages +* Texinfo:: +* Man Pages:: @end menu @@ -8214,7 +8220,7 @@ included when @command{automake} is invoked with the If you have multiple Texinfo files, and you want to use the @file{version.texi} feature, then you have to have a separate version file for each Texinfo file. Automake will treat any include in a -Texinfo file that matches @file{vers*.texi} just as an automatically +Texinfo file that matches @file{vers*.texi} just like an automatically generated version file. Often an Info file depends on more than one @file{.texi} file. For compile finished at Mon Jan 22 18:13:52 2024 From unknown Sun Jun 22 08:06:09 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Karl Berry Subject: bug#68674: closed () Message-ID: References: <202401252152.40PLqmGO009149@freefriends.org> <202401231610.40NGA9Dl014956@freefriends.org> X-Gnu-PR-Message: they-closed 68674 X-Gnu-PR-Package: automake-patches Reply-To: 68674@debbugs.gnu.org Date: Thu, 25 Jan 2024 21:53:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1706219584-9974-1" This is a multi-part message in MIME format... ------------=_1706219584-9974-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #68674: recommending autoreconf -f when version mismatch which was filed against the automake-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 68674@debbugs.gnu.org. --=20 68674: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D68674 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1706219584-9974-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 68674-done) by debbugs.gnu.org; 25 Jan 2024 21:52:58 +0000 Received: from localhost ([127.0.0.1]:49417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT7ec-0002Zr-Ad for submit@debbugs.gnu.org; Thu, 25 Jan 2024 16:52:58 -0500 Received: from frenzy.freefriends.org ([198.99.81.75]:57618 helo=freefriends.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT7ea-0002ZM-Gj for 68674-done@debbugs.gnu.org; Thu, 25 Jan 2024 16:52:57 -0500 X-Envelope-From: karl@freefriends.org X-Envelope-To: <68674-done@debbugs.gnu.org> Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 40PLqmnv009150 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <68674-done@debbugs.gnu.org>; Thu, 25 Jan 2024 14:52:48 -0700 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 40PLqmGO009149; Thu, 25 Jan 2024 14:52:48 -0700 Date: Thu, 25 Jan 2024 14:52:48 -0700 Message-Id: <202401252152.40PLqmGO009149@freefriends.org> From: Karl Berry To: 68674-done@debbugs.gnu.org Subject: X-Spam-Score: 4.3 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Content analysis details: (4.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 2.0 BLANK_SUBJECT Subject is present but empty 2.3 EMPTY_MESSAGE Message appears to have no textual parts X-Debbugs-Envelope-To: 68674-done 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 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Content analysis details: (3.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 2.0 BLANK_SUBJECT Subject is present but empty 2.3 EMPTY_MESSAGE Message appears to have no textual parts -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager ------------=_1706219584-9974-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 23 Jan 2024 16:10:27 +0000 Received: from localhost ([127.0.0.1]:43820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSJM3-0002qw-7l for submit@debbugs.gnu.org; Tue, 23 Jan 2024 11:10:27 -0500 Received: from lists.gnu.org ([2001:470:142::17]:56450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSJM0-0002qf-HH for submit@debbugs.gnu.org; Tue, 23 Jan 2024 11:10:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSJLq-0001fL-6T for automake-patches@gnu.org; Tue, 23 Jan 2024 11:10:14 -0500 Received: from frenzy.freefriends.org ([198.99.81.75] helo=freefriends.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSJLn-0005yv-V7 for automake-patches@gnu.org; Tue, 23 Jan 2024 11:10:13 -0500 X-Envelope-From: karl@freefriends.org X-Envelope-To: Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 40NGA90B014964 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 23 Jan 2024 09:10:09 -0700 Received: (from apache@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 40NGA9Dl014956; Tue, 23 Jan 2024 09:10:09 -0700 Date: Tue, 23 Jan 2024 09:10:09 -0700 Message-Id: <202401231610.40NGA9Dl014956@freefriends.org> From: Karl Berry To: automake-patches@gnu.org Subject: recommending autoreconf -f when version mismatch Received-SPF: pass client-ip=198.99.81.75; envelope-from=karl@freefriends.org; helo=freefriends.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit 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: -1.0 (-) The patch below changes the wording of the "version mismatch" errors to recommend running autoreconf -f. If anyone sees any problems with the idea, or the wording, let me know. I discovered this when trying out the last automake pretest. After configuring with the new automake, I then went back to the released automake version, provoking the error: configure.ac:26: error: version mismatch. This is Automake 1.16.5, configure.ac:26: but the definition used by this AM_INIT_AUTOMAKE configure.ac:26: comes from Automake 1.16j. You should recreate configure.ac:26: aclocal.m4 with aclocal and run automake again. However, running aclocal && automake did not change anything. The problem was not (just) aclocal.m4, but the autom4te.cache/ files, which aclocal and automake do not touch. The new message is: configure.ac:6: error: version mismatch. This is Automake 1.16.90, configure.ac:6: but the definition used by this AM_INIT_AUTOMAKE configure.ac:6: comes from Automake 1.16.5. You should run configure.ac:6: autoreconf -f (or otherwise erase all old files, run configure.ac:6: aclocal to recreate aclocal.m4, and rerun automake). I also tweaked the manual to suggest autoreconf in another place. Comments/corrections/criticisms/whatever welcome ... --thanks, karl. ----------------------------------------------------------------------------- automake: recommend autoreconf -f with version mismatches. * bin/automake.in (scan_autoconf_traces): change error to suggest running autoreconf -f. The version mismatch is most likely to happen due to the cache files, which aclocal && automake (the previous recommendation) does not delete. (scan_autoconf_files): likewise. * doc/automake.texi (Auto-generating aclocal.m4): mention autoreconf. Other minor wording changes. diff --git a/bin/automake.in b/bin/automake.in index f568773eb..0499d81eb 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -5442,8 +5442,9 @@ sub scan_autoconf_traces error ($where, "version mismatch. This is Automake $VERSION,\n" . "but the definition used by this AM_INIT_AUTOMAKE\n" . - "comes from Automake $args[1]. You should recreate\n" . - "aclocal.m4 with aclocal and run automake again.\n", + "comes from Automake $args[1]. You should run\n" . + "autoreconf -f (or otherwise erase all old files,\n" . + "recreate aclocal.m4 with aclocal, and rerun automake).", # $? = 63 is used to indicate version mismatch to missing. exit_code => 63) if $VERSION ne $args[1]; @@ -5621,9 +5622,10 @@ sub scan_autoconf_files () if (-f 'aclocal.m4') { error ($seen_init_automake, - "your implementation of AM_INIT_AUTOMAKE comes from " . - "an\nold Automake version. You should recreate " . - "aclocal.m4\nwith aclocal and run automake again", + "your implementation of AM_INIT_AUTOMAKE comes from\n" . + "an old Automake version. You should run\n" . + "autoreconf -f (or otherwise erase all old files, run\n" . + "aclocal to remake aclocal.m4, and rerun automake).", # $? = 63 is used to indicate version mismatch to missing. exit_code => 63); } @@ -5632,8 +5634,8 @@ sub scan_autoconf_files () error ($seen_init_automake, "no proper implementation of AM_INIT_AUTOMAKE was " . "found,\nprobably because aclocal.m4 is missing.\n" . - "You should run aclocal to create this file, then\n" . - "run automake again"); + "You should run autoreconf -f (or aclocal to create\n" . + "this file, then rerun automake)."); } } } diff --git a/doc/automake.texi b/doc/automake.texi index ecefe2dc6..d30905e0f 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -3276,7 +3276,7 @@ macros installed in a system-wide directory; @pxref{aclocal Invocation}). @node aclocal Invocation @section Auto-generating aclocal.m4 -@c This node used to be named "Invoking automake". This @anchor +@c This node used to be named "Invoking aclocal". This @anchor @c allows old links to still work. @anchor{Invoking aclocal} @@ -3335,9 +3335,15 @@ autoconf, The Autoconf Manual}) in order to trace the macros that are used, and omit from @file{aclocal.m4} all macros that are mentioned but otherwise unexpanded (this can happen when a macro is called conditionally). @command{autom4te} is expected to be in the -@env{PATH}, just as @command{autoconf}. Its location can be +@env{PATH}, just like @command{autoconf}. Its location can be overridden using the @env{AUTOM4TE} environment variable. +Although this section explains the details of @command{aclocal}, in +practice it is usually simpler to run @command{autoreconf}, instead of +worrying about the required order of the various tools +(@pxref{autoreconf Invocation, , Using @command{autoreconf}, +autoconf, The Autoconf Manual}). + @menu * aclocal Options:: Options supported by aclocal * Macro Search Path:: How aclocal finds .m4 files @@ -5686,13 +5692,13 @@ this issue because older Automake versions used to call @command{libtoolize}. Since Automake 1.6, it has been decided that running -@command{libtoolize} was none of Automake's business. Instead, that +@command{libtoolize} was not Automake's business. Instead, that functionality has been moved into the @command{autoreconf} command (@pxref{autoreconf Invocation, , Using @command{autoreconf}, autoconf, The Autoconf Manual}). If you do not want to remember what to run and -when, just learn the @command{autoreconf} command. Hopefully, -replacing existing @file{bootstrap} or @file{autogen.sh} scripts by -a call to @command{autoreconf} should also free you from any similar +when, just remember the @command{autoreconf} command. Hopefully, +replacing existing @file{bootstrap} or @file{autogen.sh} scripts by a +call to @command{autoreconf} should also free you from any similar incompatible change in the future. @node Objects created both with libtool and without @@ -8092,8 +8098,8 @@ Here are the current support plans. Currently Automake provides support for Texinfo and man pages. @menu -* Texinfo:: Texinfo -* Man Pages:: Man pages +* Texinfo:: +* Man Pages:: @end menu @@ -8214,7 +8220,7 @@ included when @command{automake} is invoked with the If you have multiple Texinfo files, and you want to use the @file{version.texi} feature, then you have to have a separate version file for each Texinfo file. Automake will treat any include in a -Texinfo file that matches @file{vers*.texi} just as an automatically +Texinfo file that matches @file{vers*.texi} just like an automatically generated version file. Often an Info file depends on more than one @file{.texi} file. For compile finished at Mon Jan 22 18:13:52 2024 ------------=_1706219584-9974-1--