From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 20 10:45:21 2025 Received: (at submit) by debbugs.gnu.org; 20 Jun 2025 14:45:21 +0000 Received: from localhost ([127.0.0.1]:53057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uSczX-0004Fh-TD for submit@debbugs.gnu.org; Fri, 20 Jun 2025 10:45:21 -0400 Received: from lists.gnu.org ([2001:470:142::17]:46866) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uSczU-0004B1-Pa for submit@debbugs.gnu.org; Fri, 20 Jun 2025 10:45:18 -0400 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 1uSczI-0004Iu-Ox for automake-patches@gnu.org; Fri, 20 Jun 2025 10:45:07 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.23]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uSczA-0002Gj-SL for automake-patches@gnu.org; Fri, 20 Jun 2025 10:45:04 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1750430692; cv=none; d=strato.com; s=strato-dkim-0002; b=qpIsq3nDSIbmwrqM7yDbKqMaEhw3MvIwFpdCIvrMthh37hwRIzx/T131aTVKYM3eAH I/R27AAsqAT8/T2OTXv6RuHSpD0sdRG3xMk6oezZoubdF3EJg2FesO+QDoc3mXvpFkPM nTraDp15W8uS8514dKFt5V8TBqI843p2KzDyLfhd1BhZ7wvBn+VHo6whFDj5HUGn7DZY UOn9+XjSXgk9V5D3RaQIML6ipu7A4wst/twdl+ioG+mT/eQyXsa0EaQNo7mV+DvuVpj7 U1YCgHzMl3pE3BZ8Cca66KWMC5P/ouSTl7O4QqA28kjcwlSDUwepC5d5UigSf9XWrfqq dGzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1750430692; s=strato-dkim-0002; d=strato.com; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=NdpV9f4aRmMGuszJDXjO3SvzhWR9gpHCxatI8if2FRs=; b=aSsQ6IsT5oUxW0HFpqUIU9YcPBHDi7CHg3RWbX2tYgwihMxb8WWef2I8h57Kdt88sz 33pUcaZF+MlNI4DVustAlz0OimhmcU98MVjS1ZGzWIhkXlmzaiwvtY9XvqHObL49a0NL X9iPjcfKuGrLKOtOBThV2TSnA3cF8V8C78OAGXUQEXjgD8Vg7iaHQ/6WqLeh37uDBQjK tcO4c0kX63+TkhTgDFA7Czjeq8RmbvxY+DWHUpnEHj3ajzLwILIsY0vlFboGH7ONOLiA ic1yIQyW06SLMnNIPKUpdF15j3GYjFveYEfPz03dVsMul1NnP0Om8d7k9bqeE0xhQusM 3pnA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1750430692; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=NdpV9f4aRmMGuszJDXjO3SvzhWR9gpHCxatI8if2FRs=; b=tNZSJdTa+3bEfI33J5zd783XpNtP3gW33+aMICUF+EmXlmsQGrCja7u6MmN+SbG2UO VMd4qStmCNgQoatbAkUpoV3ZVtOboN1en7jTD2Lhyqohw+wFjsC8ZCFX3YFr0sLMNYgj KxQMxaTYxKGkoMo2C2We6pm8ZkRgrQ4QAc9lPzVKJW8jldSkPIibo9wgg9DSa9AkgFpi cRbpNnbjROZCiTa0NBmkWWd2kZKHZflCZJX4xIu/JV0lxlOCnduQcr6w0z0gK5wOfwqZ RtCsFIpurZ84GmeatyUguUu8oR92UiCqy4w/gV5c5jZxCCMQMVZw4kcLKsPgNBPD6LMK D/vg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1750430692; s=strato-dkim-0003; d=clisp.org; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=NdpV9f4aRmMGuszJDXjO3SvzhWR9gpHCxatI8if2FRs=; b=dcpFWmGBfgTq3cxnhi7aKbnvoVno3TavPKsyONKg1wBqhbs6FWt3xQB6uEW5SjlEI2 h+vdB2UWUVG54ybGgGAA== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlLnY4jECd2hdUURIbZgL8PX2QiTuZ3cdB8X/nqmmbE2wABGGX6kfWrV+f247yqcTq" Received: from nimes.localnet by smtp.strato.de (RZmta 51.3.0 AUTH) with ESMTPSA id N7dcf815KEiqbrK (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 20 Jun 2025 16:44:52 +0200 (CEST) From: Bruno Haible To: automake-patches@gnu.org Subject: improve debuggability of installcheck failures Date: Fri, 20 Jun 2025 16:44:52 +0200 Message-ID: <1909700.VaX3XB0rFi@nimes> Organization: GNU MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart1875180.hGbArroQEP" Content-Transfer-Encoding: 7Bit Received-SPF: none client-ip=85.215.255.23; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, LONGWORDS=2.035, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.8 (+) 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: Automake provides a useful 'installcheck' implementation for packages that install programs: It runs each program twice, once with option '--help' and once with option '--version'. Here is a sample output: Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.8 LONGWORDS Long string of long words 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: 0.8 (/) This is a multi-part message in MIME format. --nextPart1875180.hGbArroQEP Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Automake provides a useful 'installcheck' implementation for packages that install programs: It runs each program twice, once with option '--help' and once with option '--version'. Here is a sample output: make[2]: Entering directory '/work/gettext-2025-06-19/build/gettext-tools/src' bad=0; pid=$$; list="msgcmp msgfmt msgmerge msgunfmt xgettext msgattrib msgcat msgcomm msgconv msgen msgexec msgfilter msggrep msginit msguniq recode-sr-latin"; for p in $list; do \ case ' ' in \ *" $p "* | *" ../../../gettext-tools/src/$p "*) continue;; \ esac; \ f=`echo "$p" | \ sed 's,^.*/,,;s/$//;s,x,x,;s/$//'`; \ for opt in --help --version; do \ if "/usr/local/bin/$f" $opt >c${pid}_.out \ 2>c${pid}_.err &2; bad=1; fi; \ done; \ done; rm -f c${pid}_.???; exit $bad msgcmp does not support --help msgcmp does not support --version msgfmt does not support --help msgfmt does not support --version ... make[2]: *** [Makefile:5076: installcheck-binPROGRAMS] Error 1 The problem with this output is that it gives no clue regarding the reason of the failures. Each program invocation can fail due to - an exit status != 0, - an stdout output that is empty (not expected for --help or --version), or - some stderr output, but it does not tell which of these actually caused the failure. And it erases the log files just before the end of the rule execution ('exit $bad'). Nowadays it is quite frequent to do builds on machines in the "cloud", that is, on machines that - are allocated to the developer only for the time of the build, - don't offer the possibility for interactive login and investigation to the developer. In other words, the Automake rule above was written with the assumption "if the program invocation fails, the developer can investigate it locally". But this assumption is not valid any more. In my case, not only I can't login to the cloud machine. I also cannot reproduce the issue locally, because the environment is a complex setup with docker. So, here's a proposed patch to fix this. It adds more output (on stderr) in the case of failure. It does not change the output in the case of success. In the case above, the output was changed to: make[2]: Entering directory '/work/gettext-2025-06-20/build/gettext-tools/src' bad=0; pid=$$; list="msgcmp msgfmt msgmerge msgunfmt xgettext msgattrib msgcat msgcomm msgconv msgen msgexec msgfilter msggrep msginit msguniq recode-sr-latin"; for p in $list; do \ case ' ' in \ *" $p "* | *" ../../../gettext-tools/src/$p "*) continue;; \ esac; \ f=`echo "$p" | \ sed 's,^.*/,,;s/$//;s,x,x,;s/$//'`; \ for opt in --help --version; do \ "/usr/local/bin/$f" $opt \ >c${pid}_.out 2>c${pid}_.err &2; \ cat c${pid}_.err 1>&2; \ bad=1; \ else \ if test -z "`cat c${pid}_.out`"; then \ echo "$f does not support $opt: no output" 1>&2; \ bad=1; \ else \ if test $xc != 0; then \ echo "$f does not support $opt: exit code $xc" 1>&2; \ bad=1; \ else \ :; \ fi; \ fi; \ fi; \ done; \ done; rm -f c${pid}_.???; exit $bad msgcmp does not support --help: error output /usr/local/bin/msgcmp: error while loading shared libraries: libgettextsrc-2025-06-20.so: cannot open shared object file: No such file or directory msgcmp does not support --version: error output /usr/local/bin/msgcmp: error while loading shared libraries: libgettextsrc-2025-06-20.so: cannot open shared object file: No such file or directory msgfmt does not support --help: error output /usr/local/bin/msgfmt: error while loading shared libraries: libgettextsrc-2025-06-20.so: cannot open shared object file: No such file or directory msgfmt does not support --version: error output /usr/local/bin/msgfmt: error while loading shared libraries: libgettextsrc-2025-06-20.so: cannot open shared object file: No such file or directory ... make[2]: *** [Makefile:5080: installcheck-binPROGRAMS] Error 1 This more detailed output allowed me to understand the problem (a missing /etc/ld.so.conf entry or a missing 'ldconfig' invocation) and add a fix/workaround. Bruno --nextPart1875180.hGbArroQEP Content-Disposition: attachment; filename="0001-Improve-debuggability-of-installcheck-failures.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="x-UTF_8J"; name="0001-Improve-debuggability-of-installcheck-failures.patch" >From a54a56c750ad9e411ffb074e34791675d3e75f12 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 20 Jun 2025 16:24:22 +0200 Subject: [PATCH] Improve debuggability of installcheck failures. * lib/am/progs.am (installcheck-%DIR%PROGRAMS): Show the cause of each failure. * lib/am/scripts.am (installcheck-%DIR%SCRIPTS): Likewise. --- lib/am/progs.am | 25 ++++++++++++++++++++----- lib/am/scripts.am | 25 ++++++++++++++++++++----- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/lib/am/progs.am b/lib/am/progs.am index 4be52e5e3..e44289f22 100644 --- a/lib/am/progs.am +++ b/lib/am/progs.am @@ -137,11 +137,26 @@ installcheck-%DIR%PROGRAMS: $(%DIR%_PROGRAMS) ## Insert the directory back if nobase_ is used. ?!BASE? f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \ for opt in --help --version; do \ - if "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt >c$${pid}_.out \ - 2>c$${pid}_.err &2; bad=1; fi; \ + "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt \ + >c$${pid}_.out 2>c$${pid}_.err &2; \ + cat c$${pid}_.err 1>&2; \ + bad=1; \ + else \ + if test -z "`cat c$${pid}_.out`"; then \ + echo "$$f does not support $$opt: no output" 1>&2; \ + bad=1; \ + else \ + if test $$xc != 0; then \ + echo "$$f does not support $$opt: exit code $$xc" 1>&2; \ + bad=1; \ + else \ + :; \ + fi; \ + fi; \ + fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad endif %?CK-OPTS% diff --git a/lib/am/scripts.am b/lib/am/scripts.am index 2d0a1c768..966c0b83f 100644 --- a/lib/am/scripts.am +++ b/lib/am/scripts.am @@ -117,11 +117,26 @@ installcheck-%DIR%SCRIPTS: $(%DIR%_SCRIPTS) ## Insert the directory back if nobase_ is used. ?!BASE? f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \ for opt in --help --version; do \ - if "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt >c$${pid}_.out \ - 2>c$${pid}_.err &2; bad=1; fi; \ + "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt \ + >c$${pid}_.out 2>c$${pid}_.err &2; \ + cat c$${pid}_.err 1>&2; \ + bad=1; \ + else \ + if test -z "`cat c$${pid}_.out`"; then \ + echo "$$f does not support $$opt: no output" 1>&2; \ + bad=1; \ + else \ + if test $$xc != 0; then \ + echo "$$f does not support $$opt: exit code $$xc" 1>&2; \ + bad=1; \ + else \ + :; \ + fi; \ + fi; \ + fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad endif %?CK-OPTS% -- 2.43.0 --nextPart1875180.hGbArroQEP-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 20 21:07:35 2025 Received: (at 78850) by debbugs.gnu.org; 21 Jun 2025 01:07:36 +0000 Received: from localhost ([127.0.0.1]:59241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uSmhi-00087m-3F for submit@debbugs.gnu.org; Fri, 20 Jun 2025 21:07:35 -0400 Received: from frenzy.freefriends.org ([198.99.81.75]:34172 helo=freefriends.org) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uSmhd-00086f-1e; Fri, 20 Jun 2025 21:07:30 -0400 X-Envelope-From: karl@freefriends.org Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.16.1/8.16.1) with ESMTPS id 55L17Orf839072 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 20 Jun 2025 19:07:24 -0600 Received: (from apache@localhost) by freefriends.org (8.16.1/8.14.7/Submit) id 55L17OFO839071; Fri, 20 Jun 2025 19:07:24 -0600 Date: Fri, 20 Jun 2025 19:07:24 -0600 Message-Id: <202506210107.55L17OFO839071@freefriends.org> From: Karl Berry To: bruno@clisp.org Subject: Re: [bug#78850] improve debuggability of installcheck failures In-Reply-To: <1909700.VaX3XB0rFi@nimes> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78850 Cc: 78850@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 (---) So, here's a proposed patch to fix this. It adds more output (on stderr) in the case of failure. It does not change the output in the case of success. I installed it. Saw nothing to change, and make distcheck still succeeded. Thanks as always, Bruno. -k From unknown Mon Aug 18 08:52:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 19 Jul 2025 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator