[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: M4sh tests 77 and 78 vs /bin/sh -> dash

From: Eric Blake
Subject: Re: M4sh tests 77 and 78 vs /bin/sh -> dash
Date: Fri, 20 Mar 2020 09:39:16 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 3/12/20 3:53 PM, Zack Weinberg wrote:

On further investigation, there is a concrete reason why autoconf 2.69
prefers SHELL=/bin/bash to SHELL=/bin/dash, namely that dash doesn't
support $LINENO, necessitating a complicated and fragile workaround
(see _AS_LINENO_PREPARE in lib/m4sugar/m4sh.m4).  This has been the
behavior for a very long time (since roughly 2008).  Moreover, the
changed behavior of autoconf trunk was not intentional; it's because
commit 2b59b6f8a79b8bf77e178ff4e5aa0ede433d39cf missed a direct use of
*not to work at all*!

I'm still looking into why tests/testsuite malfunctions when run by
dash, but right now I am inclined to say that the bug in
_AS_DETECT_BETTER_SHELL should be fixed and then we should
independently discuss whether it makes sense to prefer dash to bash.
It *would* discourage people from writing bashisms in their's and it *is* 30% faster than bash (on my computer,
according to "time make check"), but not supporting $LINENO is a big

Here's a thought - now that we know that bash 5 has a severe bug where the presence of a file named '%sn' in the current working directory causes ./configure to fail (for any configure that uses $as-echo), should we teach _AS_DETECT_BETTER_SHELL to catch that bash bug and prefer dash (even with no LINENO support) over bash in that scenario?

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization: |

reply via email to

[Prev in Thread] Current Thread [Next in Thread]