Glibc build failure with /bin/sh -> /bin/dash

Dan Nicholson dbn.lists at
Fri Feb 16 14:54:48 PST 2007

On 2/16/07, Dan Nicholson <dbn.lists at> wrote:
> Damn. I tried those patches and the ones from debian unstable. I don't
> know that the hell is going on. I might just have to throw in the
> towel here. I can see in src/builtins.def that : is supposed to be an
> alias for true, but it ain't working for me.

I'll understand if you want to ignore this, but I figured it out. The
culprit is... LANG=en_US.UTF-8 and sort. Ouch.

Part of the dash built puts together a source file to be used as a
sorted btree representing the set of builtin commands. This script
mkbuiltins uses some nasty awk and sort to make a sorted struct.

With UTF-8, it came out as

const struct builtincmd builtincmd[] = {
        { ":", truecmd, 3 },
        { ".", dotcmd, 3 },
        { "[", testcmd, 0 },

With LANG=C, it was

const struct builtincmd builtincmd[] = {
        { ".", dotcmd, 3 },
        { ":", truecmd, 3 },
        { "[", testcmd, 0 },

With the dot (.) coming before the colon (:). With the original
struct, : was never found by bsearch in the ordered tree, and so it
couldn't find any command called :.

Lesson learned: always use LANG=C when building.


More information about the alfs-discuss mailing list