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

Dan Nicholson dbn.lists at
Wed Feb 14 15:19:39 PST 2007

On 2/14/07, Matthew Burgess <matthew at> wrote:
> 1) Keep the #!/bin/bash shebang lines in the chapter05 scripts.  They can be
> set to  #!/bin/sh in chapter06 onwards, though if that complicates jhalfs'
> code too much then having them all at #!/bin/bash is fine, obviously.

The shebangs should be bash for the scripts. This simulates the
interactive shell when you're following the book.

> 2) Remove setting "SHELL=/bin/bash" on the `make' lines so that when the shell
> scripts are invoked they are done so with the same environment as if the
> build was being done by hand following the LFS book.

This is a problem. I think we should take another crack at trying to
make the Makefiles portable enough for any POSIX shell. Install dash
and call `make SHELL=/bin/dash'. See what breaks. I'd be happy to help
here (especially since I was the one that originally insisted on
setting SHELL=bash in the Makefile).

> 3) Fix up the script to not use any bash-specific constructs.
> I've not looked at it yet, so don't know how much of a chore that is.  I did
> look at the unpack target in 'makefile-functions' and I tested it without
> passing SHELL=/bin/bash and it seems to work fine.  Was this what you were
> referring to in your post to lfs-dev, Manuel?

Does it matter that uses bash? It's a separate process,
so it shouldn't matter what interpreter it wants. If it needs to be
called using bash, then the Makefile should have:

BASH = /bin/bash
    $(BASH) ...


More information about the alfs-discuss mailing list