OK, time for the proposals to reduce the problems that some builders
encounter in chapter 5.

This was brought to a head by people's problems this week.  The main
problem (a build failure in perl) appears to have been caused by
using /bin/sh -> dash.  But people who build across several days
often forget to set things up at some point, and sometimes people
miss a package without breaking the build.

1. Out damned dash, out I say!

I will make an assertion that dash does not like a --version switch
[ tested on a compiled but not installed version of current dash ].

I have the following in a test script:

/bin/sh --version  >/dev/null
if [ $? -ne 0 ]; then
  echo "ERROR: read the Host System Requirements for /bin/sh"
  exit 1
fi

Although dash is not the only host requirement that sometimes causes
pain, it is one of the main ones - and anybody using debian's
antiquated version of mawk [ current mawk might be fine, dunno ]
probably also has dash.

So, I am now suggesting that we do that as the FIRST command in
binutils pass 1.

2. Do not link to the host, for all packages from glibc onwards.

This is a bit more iffy, because I have only been able to get
problems when $PATH is not set [ thanks again to Pierre for noticing
that in what I posted on Friday night ].  This is also where I need
to discover if I should ignore /tools/lib/libcc1.so because it is
from gcc pass 1.  My script [ still with the trap for dash ] is
attached as tools-check.sh.  It can be run at any time in chapter 5,
subject to the open question about the name of the prefix for gcc
pass 2.

3. Check if anything in chapter 5 was missed.

At the end of chapter 5, we sometimes find that people have missed
one or two packages.  Often, but not always, that breaks a later
package in chapter 5.  We had a request for a list of what to test
for per-package.  Instead of that, I am testing the last non-doc
non-i11n file for each package.  At the moment, we do not mess with
symlinks in chapter 5, but where the file is a symlink I have
expanded the testing in case the symlink is broken.  A version
without my debug code is attached as check-no-tools-missed.sh.

Note that for chapter 6 the book has details of the programs and
libraries installed, so I see no reason to create a corresponding
script for that.

If people agree, both items 2 and 3 could be stored at LFS and
linked from the book, the test for linking to the host could be
referenced early in chapter 5, with a message that it can be run
at any time during progress through that chapter, and again near
the end of chapter 5 as a double-check, and that could be followed by
the check that no package was missed.

Thoughts ?

ĸen
-- 
This email was written using 100% recycled letters.
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to