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

Dan Nicholson dbn.lists at gmail.com
Fri Feb 16 11:11:18 PST 2007


On 2/15/07, Matthew Burgess <matthew at linuxfromscratch.org> wrote:
>
> I'm now wondering why I get the following output from `ps' though:
>
> /bin/bash ./progress_bar.sh 029-gcc-pass1
> /bin/sh -c . ~/.bashrc && /media/hda3/jhalfs/lfs-commands/chapter05
> /bin/bash /media/hda3/jhalfs/lfs-commands/chapter05/029-gcc-pass1

They're all derived from the 029-gcc-pass1 make target. The first one
is because progress_bar.sh has /bin/bash in the shebang and we don't
force it otherwise. Make has done this:

/bin/sh -c "./progress_bar.sh 029-gcc-pass1 &"

This spawns "/bin/bash ./progress_bar.sh 029-gcc-pass1" and /bin/sh
returns immediately because we put it in the background.

On the other hand, when make gets to the part where we actually
execute the package commands (which are in a separate bash script), it
executes the second process as you see from ps. I think it got cut
off, but you should see that it's executing the gcc-pass1 script. The
part that it's currently working on in the { ... && ... } chained
commands is the bash script for 029-gcc-pass1 which uses bash since
it's in the shebang.

Moral of the story is that each command in a make target is spawned
through "$(SHELL) -c 'commands'".

--
Dan



More information about the alfs-discuss mailing list