From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yJe8C2SJv16sLQAA0tVLHw (envelope-from ) for ; Sat, 16 May 2020 06:34:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id ENydB2SJv173GgAA1q6Kng (envelope-from ) for ; Sat, 16 May 2020 06:34:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7FB3594066D for ; Sat, 16 May 2020 06:34:11 +0000 (UTC) Received: from localhost ([::1]:43152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZqOf-0006Vd-4t for larch@yhetil.org; Sat, 16 May 2020 02:34:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZqOY-0006VT-Lq for bug-guix@gnu.org; Sat, 16 May 2020 02:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56297) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZqOY-0007wo-Cd for bug-guix@gnu.org; Sat, 16 May 2020 02:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZqOY-0000Qt-9z for bug-guix@gnu.org; Sat, 16 May 2020 02:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#25258: Bashisms in make rules References: In-Reply-To: Resent-From: elaexuotee@wilsonb.com Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 16 May 2020 06:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25258 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 25258@debbugs.gnu.org Received: via spool by 25258-submit@debbugs.gnu.org id=B25258.15896108271638 (code B ref 25258); Sat, 16 May 2020 06:34:02 +0000 Received: (at 25258) by debbugs.gnu.org; 16 May 2020 06:33:47 +0000 Received: from localhost ([127.0.0.1]:39610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZqOC-0000QG-FD for submit@debbugs.gnu.org; Sat, 16 May 2020 02:33:47 -0400 Received: from m42-5.mailgun.net ([69.72.42.5]:13270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZqO5-0000Pv-Se for 25258@debbugs.gnu.org; Sat, 16 May 2020 02:33:39 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1589610815; h=Content-Type: MIME-Version: Message-Id: Subject: From: To: Date: Sender; bh=/BWm+aAI1LrQx9VMjhka0ZaaeTtJt2vh02zW4neO9kc=; b=FMdwAPaV+eLll7BGknnGjRsk9p6WYgFzfeidElxSgqz/Klve3U1XGSOOH6HrM8Tx+zZH6NtN 4x4ttOHTMzGMlXC8hBnI464ZdWOrN9fSUAgUAqB7MmPQOr3mLK8tq3vSivA8pzYM5S83w3bR eQVKA/PXbddbAhcrswj+xAqnI9TsJD1C/g3LboZrCeGhGzkJbBExdQzlbYUEFcGLO9tnvkm6 /S4QMIyd9hlNu06dx1jxqYN645mOQ2GQjtnHabDvifsEiWKv5QHeocLzBbvJcJ64TdSM9LtA akMtm7zfyvj9bJ3+FHc3kmipEQcT+Wx28EAJLQyiAxUc5pyWN8Rewg== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyI4MzY0OCIsICIyNTI1OEBkZWJidWdzLmdudS5vcmciLCAiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by mxa.mailgun.org with ESMTP id 5ebf8930.7fdbb3814570-smtp-out-n03; Sat, 16 May 2020 06:33:20 -0000 (UTC) Received: from localhost (KD111239208235.au-net.ne.jp [111.239.208.235]) by wilsonb.com (Postfix) with ESMTPSA id A56C4A1A9D for <25258@debbugs.gnu.org>; Sat, 16 May 2020 06:33:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1589610798; bh=/BWm+aAI1LrQx9VMjhka0ZaaeTtJt2vh02zW4neO9kc=; h=Date:To:From:Subject:From; b=FefD34Lzh2mRgAd+oFatXJEjvcwvQfsukjqjwNQtBerCRZkR8M87fJchFDjrBCoZU 6m8Pg4teYituWgTphXu4w83afeqVi7Qff2EyMNkXuQmmjzzFq6uQRooZqgs91pXJab XCl0bKHk+itBRZIgbv73zYrzwqMSW7MU6uLyds6cggOksLOu/Yg2CT+UtnzVx0NsXa EGGa55BXttT/5chTsl0dq6wQ8diSVhYvu0gjpn65VnY96u5OYjqNE1fiMon/JgXv1Q K09sL8rBTdF3E0gxyR5gpjB5VXAn0ydyCQbOuwK4x/g/L3u53mlxo87Rh7Xht8b6cO WZ1sYCbsychNMNvzDSfPO3PiqaonT+ryZ0KBYcyGIKBBK9KOmpNUo5x//A5qMSFlxK dDG2F9LlM0E+hGwfNJ30HUY9cmsmt+d1NFh+jqaWFko5syuSsavBi74iH2yGITdKMf zgoJJ/djCK4uNeNrl0vkm3c9bt4O909Gc1NIRrtA7jDzbmF9ql4C0+UGGtZJrSkbmZ qRvK5Nk/25lpj9k8/xDX4/YOAzjg8ClI1umLHHhKD4OpbsTphfCV+X4M18pNUJHa+e HNLMlOqF78oqKSwqmmvDy2rlnVEc4bv/KGYeDT0F2u+02gPpA4zkQ/LUeW4TVozwp7 8RNkE2nUCuBA/wPeH1pYQtVc= Date: Sat, 16 May 2020 15:33:09 +0900 Message-Id: <3QC37OOAPFHT8.3ELLIYWH54G6D@wilsonb.com> User-Agent: mblaze/0.7 MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="----_=_44daca883f3df5c4261ed14f_=_" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" Reply-to: elaexuotee@wilsonb.com From: elaexuotee--- via Bug reports for GNU Guix X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=mg.wilsonb.com header.s=krs header.b=FMdwAPaV; dkim=fail (rsa verify failed) header.d=wilsonb.com header.s=201703 header.b=FefD34Lz; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -0.61 X-TUID: r4/IFpoglgj5 This is a multipart message in MIME format. ------_=_44daca883f3df5c4261ed14f_=_ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_6d8920256edf63b545131464_=_" This is a multipart message in MIME format. ------_=_6d8920256edf63b545131464_=_ Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Resurrecting this, since it cause me significant grief, and is a simple workaround which I believe is worth putting in the documentation. First, he= re is a short summary of the problem: Currently, some of our make rules contain bashisms. As of commit 408ae72c, = this ends up generating broken texinfo translations under doc/*.texi, eventually= failing with "@ref reference to nonexistent node..." errors. =46rom a pristine repository (e.g. after running `git clean -xfd'), running= =20make shows a bunch of errors from the broken rules, but since they happen to be multi-line scripts, the errors fail to propogate up to make. Thus make leav= es around the broken texinfo files. The real kicker is that subsequent runs pi= ck up the broken files and make fails just as above, but without encountering = or showing the errors from the broken rules. This makes tracking down the erro= r significantly more painful and non-obvious. Anyway, the source of the problem is a combination of our use of bashisms a= nd autoconf trying really hard to use the least-common-denominator shell. Autoconf's configure script sets make's SHELL by first looking for /bin/sh = and only finding sh on PATH as a last resort. Thus, even when running under `gu= ix environment --pure guix' make will run with /bin/sh instead of $GUIX_ENVIRONMENT/bin/sh. On a Guix System this ends up running make with the sh of the system profil= e which, at the moment, resolves to bash. However, on a foreign distribution,= /bin/sh often resolves to a non-bash shell; in particular, it is common the= se days for it to be a symlink to dash. Hence, lots of pain. Once we know the source of the error, the fix is simple. We can explicitly = tell make to run it's rules with bash: $ make SHELL=3D$(command -v bash) In a guix environment, this should pick up the bash in $GUIX_ENVIRONMENT. Better yet, we can do this once, by telling *configure* what shell to use: $ CONFIG_SHELL=3D$(command -v bash) ./configure and all subsequent runs of make will Just Work from within the environment.= Does this make sense? Am I missing something obvious? If not, would it make= sense to include the above ./configure invocation in our documentation? Ideally, we could modify Makefile.am or configure.ac in some way to automatically fix the problem; however, if we want to support build exterio= r to a guix build environment, I suspect the "most correct" course of action is = to simply remove our bashisms. That said, we could tell automake to *not* explicity set make's SHELL by a simple one-liner in `configure.ac': AM_SUBST_NOTMAKE([SHELL]) This will cause make to use it's baked-in default instead of the one autoco= nf detects. Luckily, for guix builds make correctly references the profile's s= h: $ strings $GUIX_ENVIRONMENT/bin/make | grep bin/sh /gnu/store/-bash-/bin/sh and non-guix make is likely to point to something relevant for that distribution anyway. That said, I am sure automake and autoconf set make's SHELL for a reason, so perhaps this solution is too heavy of a hammer. Thoughts? Anyway, this turned into a lot longer of an email than I anticipated. Thank= s for taking the time to read through it. ------_=_6d8920256edf63b545131464_=_-- ------_=_44daca883f3df5c4261ed14f_=_ Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYIADUWIQQ7FdZn/PDWvxE6cmR2pStZ7i7CgQUCXr+JHhccZWxhZXh1b3Rl ZUB3aWxzb25iLmNvbQAKCRB2pStZ7i7CgR7nAP0fIXWGZdjp+s2UTdwJ7Q0gSzxu sFK5XfrAhdc3hU4w7gEAjQDqpvX21zi5LgaObJGjdpZG7G8MytaXVZz4BvxKzwk= =J5DB -----END PGP SIGNATURE----- ------_=_44daca883f3df5c4261ed14f_=_--