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

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

 



> 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

Slowest point, in my experience, is time for running testsuite anyway, then
compile time.  So, time to regenerate or rerun configure script is
non-essential.

The reason why I prefer meson nowadays is lack of proper support/detection
of modern C and C++ standards/dialects by autoconf out of the box.

The reason, why I keep autoconf for packages that already has it — the
excellent autotest subsystem (AT_CHECK and Co).




On Thu, Mar 12, 2020 at 11:04 PM Bob Friesenhahn <
bfriesen@xxxxxxxxxxxxxxxxxxx> wrote:

> 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
> bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
> Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt
>
>

-- 
Andrew W. Nosenko <andrew.w.nosenko@xxxxxxxxx>




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux