From unknown Sat Aug 09 13:08:03 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#79044 <79044@debbugs.gnu.org> To: bug#79044 <79044@debbugs.gnu.org> Subject: Status: Autoconf-bundled macro uses /bin/sh, breaking builds that do autoreconf Reply-To: bug#79044 <79044@debbugs.gnu.org> Date: Sat, 09 Aug 2025 20:08:03 +0000 retitle 79044 Autoconf-bundled macro uses /bin/sh, breaking builds that do = autoreconf reassign 79044 guix submitter 79044 "W. Kosior" severity 79044 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 18 07:43:43 2025 Received: (at submit) by debbugs.gnu.org; 18 Jul 2025 11:43:43 +0000 Received: from localhost ([127.0.0.1]:32950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ucjV9-0008R9-1G for submit@debbugs.gnu.org; Fri, 18 Jul 2025 07:43:43 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49856) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ucjUz-0008Q5-60 for submit@debbugs.gnu.org; Fri, 18 Jul 2025 07:43:38 -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 1ucjUr-0000fh-Hl for bug-guix@gnu.org; Fri, 18 Jul 2025 07:43:26 -0400 Received: from salamina.koszko.org ([188.68.237.248] helo=koszko.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ucjUm-000592-B7 for bug-guix@gnu.org; Fri, 18 Jul 2025 07:43:25 -0400 Received: from dummy-client.koszko.org ([192.168.193.169]) by salamina.koszko.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1ucjUd-0000000014O-1U4M for bug-guix@gnu.org; Fri, 18 Jul 2025 13:43:11 +0200 Date: Fri, 18 Jul 2025 13:43:10 +0200 From: "W. Kosior" To: bug-guix@gnu.org Subject: Autoconf-bundled macro uses /bin/sh, breaking builds that do autoreconf Message-ID: <20250718134310.546da258.koszko@koszko.org> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/3YM6lH42DFBEHNiqMbr3D.L"; protocol="application/pgp-signature"; micalg=pgp-sha512 Received-SPF: pass client-ip=188.68.237.248; envelope-from=koszko@koszko.org; helo=koszko.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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) 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.1 (/) --Sig_/3YM6lH42DFBEHNiqMbr3D.L Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Guix, file `share/autoconf/autoconf/erlang.m4' in Autoconf package contains definitions allowing configure-time tests using Erlang. The piece of code responsible for generating a `conftest' script adds a shebang with `#!/bin/sh': --8<---------------cut here---------------start------------->8--- # AC_LANG(Erlang) # --------------- AC_LANG_DEFINE([Erlang], [erl], [ERL], [ERLC], [], [ac_ext=3Derl : ${ac_objext=3Do} ac_compile=3D'$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&AS_MESSAGE_LOG_FD= && ln -sf conftest.beam conftest.$ac_objext' ac_link=3D'$ERLC $ERLCFLAGS -b beam conftest.$ac_ext >&AS_MESSAGE_LOG_FD &&= echo "[#]!/bin/sh" > conftest$ac_exeext && AS_ECHO(["\"$ERL\" -run conftes= t start -run init stop -noshell"]) >> conftest$ac_exeext && chmod +x confte= st$ac_exeext' ]) --8<---------------cut here---------------end--------------->8--- This could make sense if the Autoconf from Guix were to be used for generating a `configure' script to be run on other system. But if a script with `#!/bin/sh' is created during a Guix package build, this is wrong. Here's an error I got due to this when working on a recipe for Erlang HTTP server, Yaws: --8<---------------cut here---------------start------------->8--- [...] checking for ct_run... /gnu/store/briw8s44c7w2lj3qwz3w2x4c0gpgpkn8-erlang-2= 7.3.4/bin/ct_run checking for erlc... /gnu/store/briw8s44c7w2lj3qwz3w2x4c0gpgpkn8-erlang-27.= 3.4/bin/erlc checking for erl... /gnu/store/briw8s44c7w2lj3qwz3w2x4c0gpgpkn8-erlang-27.3= .4/bin/erl checking for Erlang/OTP root directory... configure: error: in `/tmp/guix-b= uild-erlang-yaws-2.2.0.drv-0/source': =20 configure: error: test Erlang program execution failed See `config.log' for more details error: in phase 'configure': uncaught exception: %exception #<&invoke-error program: "/gnu/store/3jhfhxdf6v5ms10x5zmnl166dh3= yhbr1-bash-minimal-5.1.16/bin/bash" arguments: ("./configure" "CONFIG_SHELL= =3D/gnu/store/3jhfhxdf6v5ms10x5zmnl166dh3yhbr1-bash-minimal-5.1.16/bin/bash= " "SHELL=3D/gnu/store/3jhfhxdf6v5ms10x5zmnl166dh3yhbr1-bash-minimal-5.1.16/= bin/bash" "--prefix=3D/gnu/store/12731cvmcwr0f2cgjy87bx6k1cg5nlqb-erlang-ya= ws-2.2.0" "--enable-fast-install" "--build=3Dx86_64-unknown-linux-gnu" "--e= nable-deterministic-build") exit-status: 1 term-signal: #f stop-signal: #f>= =20 phase `configure' failed after 4.1 seconds command "/gnu/store/3jhfhxdf6v5ms10x5zmnl166dh3yhbr1-bash-minimal-5.1.16/bi= n/bash" "./configure" "CONFIG_SHELL=3D/gnu/store/3jhfhxdf6v5ms10x5zmnl166dh= 3yhbr1-bash-minimal-5.1.16/bin/bash" "SHELL=3D/gnu/store/3jhfhxdf6v5ms10x5z= mnl166dh3yhbr1-bash-minimal-5.1.16/bin/bash" "--prefix=3D/gnu/store/12731cv= mcwr0f2cgjy87bx6k1cg5nlqb-erlang-yaws-2.2.0" "--enable-fast-install" "--bui= ld=3Dx86_64-unknown-linux-gnu" "--enable-deterministic-build" failed with s= tatus 1 build process 4 exited with status 256 --8<---------------cut here---------------end--------------->8--- Btw, until someone fixes it, here's a hackish workaround for any1 who hits this issue while working on some Erlang software recipe: --8<---------------cut here---------------start------------->8--- ;; Copyright 2025 W. Kosior ;; SPDX-License-Identifier: CC0-1.0 (add-before 'configure 'hack-to-avoid-/bin/sh (lambda _ (mkdir-p "/tmp/hack-to-avoid-bin-sh") (with-output-to-file "/tmp/hack-to-avoid-bin-sh/chmod" (lambda _ (display " if [ \"$1\" =3D +x ] && [ -f \"$2\" ] && [ \"$(head -1 \"$2\")\" =3D '#!/bin/sh' ]; then sed -i 's,^#!/bin/sh,,' \"$2\" fi exec $(command -v chown | sed 's,chown$,chmod,') \"$@\" ") (chmod (current-output-port) #o777))) (setenv "PATH" (format #f "/tmp/hack-to-avoid-bin-sh:~a" (getenv "PATH"))))) --8<---------------cut here---------------end--------------->8--- Best! Wojtek -- W. Kosior website: https://koszko.org/koszko.html fediverse: https://friendica.me/profile/koszko/profile PGP fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A --Sig_/3YM6lH42DFBEHNiqMbr3D.L Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQTpcnBg48VjfIpPS0JLxSIcWnn9GgUCaHozTgAKCRBLxSIcWnn9 GkmDAQDLOD6mPUsKdG5u2abNppTYikf9gCC5pTmmIw8Bh4DwPwEAwImmDf/ouX8o K7bmfXthAvGddpVVTX1hDZ5oZLDjtwg= =QCa4 -----END PGP SIGNATURE----- --Sig_/3YM6lH42DFBEHNiqMbr3D.L-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 18 10:21:37 2025 Received: (at 79044-close) by debbugs.gnu.org; 18 Jul 2025 14:21:37 +0000 Received: from localhost ([127.0.0.1]:34644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uclxx-0005on-2T for submit@debbugs.gnu.org; Fri, 18 Jul 2025 10:21:37 -0400 Received: from salamina.koszko.org ([188.68.237.248]:50562 helo=koszko.org) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uclxt-0005oQ-D0 for 79044-close@debbugs.gnu.org; Fri, 18 Jul 2025 10:21:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=koszko.org; s=mail-salamina; h=Content-Type:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XcxrnsJ8plGLSfmpRNXZz6ejHQod8pvQwzp1Rrvwx+c=; b=cj44zUi653S+lEQFsViGd5RgMc VtZvh5U4waZR8vyCy6SwqSJpApa2+KimXTWtV+XMvOZceYTQEhieTl3mJyKVQ8K/cQxiW1jL6I+8z Jm8YlbGF/SCjpp+UCxKUl4UqSXYrZ7eewrrYs56BhPsR1FE+8JlwzDqRayoVDvGnyYYsbDtO6IlKg V/vff/8sNEY0Y4rnfCqOe4DyTuFJBLRtdqb97tx7C9fzUAYq4XTZnyGuymnyyxETENOAofBpRqBV4 nj9XiJ2u2AZj3d1rLrimXjseCPfF5IqTPPWitKdUUSmMQy54w4zo3TJfogeohrgdWKvxR+DpdOy9i 73kJk4a8mL+3zFfBxkpCA+ZizOlw/mp+rI/77P/yMFiF8Z4YtYTfJu03z+MaFyFh9I2dnVl/AcNFA TXot5pEWGssow6PdppssnfGTZs2vFQzvl0TYUWDNtW7WY8ICLTfjNIFK76VeRVeVEz0NWkTRGdisx JcrcBvWVve51nGSXXgau62F5AMaA68MlIyL0oQSI4uWhxj9g0mQLtepqeButfjwgYNTUB3aksA7B0 9zJe2pFMtPdtbZMg0KfjT9tiHrRwwnnDgz5QRHIWjIZUbnuoXsetJ8BlRnh1Nb5e0zOEa5nv6Bcrv Neuu6CqVyGDwuQhHpB38klKv6SF7WbQYU3tgERpbE=; Received: from dummy-client.koszko.org ([192.168.193.169]) by salamina.koszko.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1uclxr-000000000Hx-0SXn for 79044-close@debbugs.gnu.org; Fri, 18 Jul 2025 16:21:31 +0200 Date: Fri, 18 Jul 2025 16:21:29 +0200 From: "W. Kosior" To: 79044-close@debbugs.gnu.org Subject: Re: Autoconf-bundled macro uses /bin/sh, breaking builds that do autoreconf Message-ID: <20250718162129.3830de31.koszko@koszko.org> In-Reply-To: <20250718134310.546da258.koszko@koszko.org> References: <20250718134310.546da258.koszko@koszko.org> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/_Tw.+NEG_Utd16WCGRN/2v+"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79044-close 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 (-) --Sig_/_Tw.+NEG_Utd16WCGRN/2v+ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Oops, I was pretty lame today. In a recipe, this is actually more simply fixable with --8<---------------cut here---------------start------------->8--- (add-before 'configure 'avoid-/bin/sh (lambda _ (substitute* "configure" (("#!/bin/sh") "")))) --8<---------------cut here---------------end--------------->8--- and one package seems to already be doing sth similar. I am not sure this warrants a bug report, then. Sorry for the nuisance :) Best, Wojtek --Sig_/_Tw.+NEG_Utd16WCGRN/2v+ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQTpcnBg48VjfIpPS0JLxSIcWnn9GgUCaHpYagAKCRBLxSIcWnn9 Gq1OAQCXSqo0LxIy4XRPfdvQseq1T5k9d0/lwsfH9b64GbayVgD/Q6T8jTwkuDmk qBakHaowianyREdI50zbV7/iBBO/jwU= =FF2F -----END PGP SIGNATURE----- --Sig_/_Tw.+NEG_Utd16WCGRN/2v+--