Hey everyone, it's been a while!

I'm going to get my urge to talk off-topic out right now so I don't
litter the point of this message.  I've been keeping up with the
mailing lists and I just wanted to say that all of the ideas and
suggestions I've read recently about the direction of LFS and BLFS are
sounding pretty amazing.  I'm very interested in seeing the direction
that this project is going to take in the long run.  I don't have any
64bit systems myself but the whole situation reminds me of one of my
early LFS builds (back when the book was version 4 I believe) where I
insisted on compiling 386 code on a 586 arch.  I know it's not really
the same though... it makes me look forward to getting a modern cpu to
join that fun.

I can hardly imagine trying to build for 386 code again, especially
now with glibc dropping 386 support... anyway, enough rambling and
onto the topic at hand.


I'm working through the current development LFS book and one section
struck me as a bit odd.  In "6.9. Glibc-2.7":

> The ldd shell script contains Bash-specific syntax. Change its default 
> program interpreter to /bin/bash in case
> another /bin/sh is installed as described in the Shells chapter of the BLFS 
> book:
>
> sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in


I'm building a 'by the book' lfs system right now, and looking at my
toolchain's ldd (which did not have this substitution in chapter 5) it
appears to be using bash by default.  Using dash as an example
alternative sh, this raises a few questions to my mind:

 - Do people install dash into their toolchain?  At this point in the
book we've separated ourselves from the host system binaries and only
bash is available under a pure lfs build situation.
 - Do people install dash before they build glibc?  The thought of
that brings back horrible flashbacks from before I understood why that
would be a bad idea... (*shudders*) yeah, this can't be right, ignore
that one.
 - If dash is installed in the toolchain, does this create a problem
with glibc's ability to use bash for what is known to be a bash
specific script?


I've conducted two tests to find out whether this sed is necessary
using those questions as a basis for my analysis.

Test #1:  Installing glibc without the sed substitution using a 'by
the book' lfs toolchain.

Result:  Compilation produced /bin/ldd using /bin/bash as the interpreter.


Test #2:  Installing glibc without the sed substitution using a
toolchain containing a secondary shell for /bin/sh.  I've used dash
for the test.

Result:  Compilation produced /bin/ldd using /bin/bash as the interpreter.


Of note, in both cases the ./configure script selected /bin/bash when
detecting bash.  Perhaps the problem used to be in the configure
script.  I wouldn't know as this is really my first time tinkering
with glibc directly.

I think this sed can be safely removed from the book as glibc appears
to be properly choosing the correct shell for ldd.  Any thoughts?  The
change is simple enough but I'll happily create a ticket if desired.
I'd like to just make a patch against the book eventually as another
learning experience but it'll have to wait until another day - my
computer is barely in a usable state right now as I'm starting fresh
with it.


Jonathan
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to