[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: M4sh tests 77 and 78 vs /bin/sh -> dash
From: |
Bob Friesenhahn |
Subject: |
Re: M4sh tests 77 and 78 vs /bin/sh -> dash |
Date: |
Thu, 12 Mar 2020 16:04:36 -0500 (CDT) |
User-agent: |
Alpine 2.20 (GSO 67 2015-01-07) |
On Thu, 12 Mar 2020, Zack Weinberg wrote:
I agree in principle.
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
$as_echo in _AS_DETECT_BETTER_SHELL, causing _AS_DETECT_BETTER_SHELL
*not to work at all*!
This is a good find. It explains a lot.
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
configure.ac's and it *is* 30% faster than bash (on my computer,
according to "time make check"), but not supporting $LINENO is a big
loss.
Years ago when we were investigating slowness of configure it was
determined that Bash is the "world's slowest shell" since it was
considerably slower than all other shells tested. The difference was
often more significant outside of GNU/Linux. This likely has not
changed.
One reason why some projects are discarding use of Autoconf (and
moving to CMake and Meson/Ninja) is due to how long it takes to
execute a configure script. Given modern multicore CPUs, it often
takes as much (or more) time to run the configure script than to
compile the software. If configure can select the fastest shell which
works reliably, then Autoconf's reputation will improve.
Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt
- M4sh tests 77 and 78 vs /bin/sh -> dash, Zack Weinberg, 2020/03/12
- Re: M4sh tests 77 and 78 vs /bin/sh -> dash, Bob Friesenhahn, 2020/03/12
- Re: M4sh tests 77 and 78 vs /bin/sh -> dash, Zack Weinberg, 2020/03/12
- Re: M4sh tests 77 and 78 vs /bin/sh -> dash,
Bob Friesenhahn <=
- Re: M4sh tests 77 and 78 vs /bin/sh -> dash, Andrew W. Nosenko, 2020/03/12
- Re: M4sh tests 77 and 78 vs /bin/sh -> dash, Sébastien Hinderer, 2020/03/13
- Re: M4sh tests 77 and 78 vs /bin/sh -> dash, Bob Friesenhahn, 2020/03/13
- Re: M4sh tests 77 and 78 vs /bin/sh -> dash, Bob Friesenhahn, 2020/03/13
- Re: M4sh tests 77 and 78 vs /bin/sh -> dash, Michael Orlitzky, 2020/03/13
- Re: M4sh tests 77 and 78 vs /bin/sh -> dash, Bob Friesenhahn, 2020/03/13
- Re: M4sh tests 77 and 78 vs /bin/sh -> dash, Sébastien Hinderer, 2020/03/13
- Re: M4sh tests 77 and 78 vs /bin/sh -> dash, Michael Orlitzky, 2020/03/12
- Re: M4sh tests 77 and 78 vs /bin/sh -> dash, Zack Weinberg, 2020/03/13
- Re: M4sh tests 77 and 78 vs /bin/sh -> dash, Paul Eggert, 2020/03/12