It looks like ksh runs much slower than bash with current Ghostscript's
./configure script - for me it takes 20m, compared with 45s under bash.

This is on OpenBSD 6.7 GENERIC.MP#1 amd64. [This kernel has visa@'s
wait4() patch (see recent 'gdb in uninterruptible wait' thread), but
the same problem also occurred last week with the release kernel,
GENERIC.MP#182).]

To reproduce:

    git clone https://git.ghostscript.com/ghostpdl.git
    cd ghostpdl
    AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.16 CONFIGURE_STYLE=gnu ./autogen.sh

This runs things like autoreconf, then does ./configure. It takes 20m
on my machine, seemingly getting stuck for a a long time after
outputting 'checking compiler/linker address santizer build warnings
support...' and consuming 80% cpu.


Modifying autogen.sh to use /usr/local/bin/bash instead of ksh when
running ./configure, like this:

====
diff --git a/autogen.sh b/autogen.sh
index 7a0783623..2f6624b10 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -50,4 +50,4 @@ else
        echo "running ./configure $@"
 fi
 
-$srcdir/configure "$@" && echo
+/usr/local/bin/bash $srcdir/configure "$@" && echo
====

- results in the above ./autogen.sh command completing in about 45s for
me. (this is with a clean tree again.)

I don't know what's causing this. Is there some algorithm inside ksh
that could be running into complexity issues somehow?


[A colleague reports that ksh on Linux doesn't run slowly. But i guess
ksh has diverged a lot on OpenBSD/Linux, so that's perhaps not too
surprising.]


Thanks,

- Jules


-- 
http://op59.net

Reply via email to