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

Matthew Burgess matthew at
Thu Feb 15 13:15:06 PST 2007

On Thursday 15 February 2007 18:12, wrote:
> El Jueves, 15 de Febrero de 2007 04:06, Dan Nicholson escribió:
> > George/Manuel, is there any reason why we can't just set "SHELL =
> > /bin/bash" in the Makefile?
> Is a matter to test is that works. I.e, on a Ubuntu host with /bin/sh
> --> /bin/dash, build an LFS-SVH system using current jhalfs-SVN (before the
> Glibc build go to the book).

Well, I've only time to get through a chapter 5 build tonight, but my Kubuntu 
install has the necessary /bin/sh->/bin/dash symlink.

Here's a description of the changes I've had to make.  Thankfully, there's 
only one horrible hack so far, though I've got some unwanted '-e's appearing 
in log files and the progress bar output.  That's probably due to non-POSIX 
use of `echo' but I'm not too bothered by it...yet :-)

1. Change: Remove the 3 occurrences of "SHELL=/bin/bash" from LFS/
   Rationale: We shouldn't set the environment up differently to LFS, thus 
masking the Glibc build problem.

2. Change: ***Hack*** remove the '( time { ... } ) syntax from 
   Rationale: Dash doesn't understand the '( time { ... } )' construct (it 
complains the '}' should be a ')'! I'll have a read of sh(1) to see if 
there's a portable way of doing this, but I suspect it might be a case of 
doing `date' at the start and end of the commands and calculate the 

3. Change: Replace 'source' with '.' in common/libs/func_wrt_Makefile and 
    Rationale: Dash doesn't have a 'source' builtin, so use the more 
portable '.' instead.

4. Change: Replace 'set +h' with 'hash -r' in LFS/
   Rationale: Dash doesn't have a '+h' option to its `set' builtin, but both 
bash and dash understand `hash -r'.

I have a quilt patchset tracking all of these, so I'll forward them on once 
the build finishes, if you're interested?

I'm now wondering why I get the following output from `ps' though:

/bin/bash ./ 029-gcc-pass1
/bin/sh -c . ~/.bashrc && /media/hda3/jhalfs/lfs-commands/chapter05
/bin/bash /media/hda3/jhalfs/lfs-commands/chapter05/029-gcc-pass1

Is it the shebang line that causes 'ps' to report /bin/bash as being used?  If 
so, what's that middle process all about?



More information about the alfs-discuss mailing list