Problem with chrooting to new enviroment
zarniwhoop73 at googlemail.com
Thu Nov 5 08:30:20 PST 2009
2009/11/5 Aleksander Kurczyk <aleksander810 at gmail.com>:
> 2009/11/5 Chris Staub <chris at beaker67.com>
>> On 11/04/2009 07:21 PM, Aleksander Kurczyk wrote:
>> > Hi
>> > I have problem with chroting to new enviroment (chapter 6.4). When I
>> > execute a commands from chapter 6.4 of LFS handbook, chroot return an
>> > error indicating the absence of a file or directory. This file, of
>> > course exist. To install LFS I use scripts shown below and LFS LiveCD.
>> I'm not going to waste time trying to look through all your scripts,
>> though a quick glance indicates that you don't have commands to remove
>> the source/build directories after installation of each package.
I took a very brief look at the scripts, and didn't see
any tests for errors. The commands are just placed
one after another. If something fails during configure
or make or make install the script will usually report any
error message and then continue to the next command.
So, there may be more than one problem in your build.
But, since you say that chroot complains about a missing
file that does in fact exist, you have probably hit a variation
I'm not sure if the FAQ is up to date for how things are
built these days, but I will guess that because of an error
a long while ago, your new programs are linked to the
host system's libraries.
I can't point to my own scripts as a *good* example,
indeed they are buggy (one of the packages unsets
LIBTOOL, which I happened to use as the name of the
tarball), but they mostly work for me. They are also
very verbose and do a lot of things that aren't strictly
necessary. They also are not current (They're stuck at
LFS-6.4 - for a new build I would normally advise
people to try 6.5 . In your case, I think your priority
should be to rework your scripts)
The most recent are at
Start with the 'notes' then look at the ch5 and ch6
scripts to get an idea of where you need to test for
errors, then come up with your own way of stopping
the build after an error, and resuming without
repeating what has already been done.
Some people use a child script for each package
(so, different scripts for each build of e.g. gcc) and
call these from the main script, checking the status
after each (and using '&&' in the child script so that
it stops at the first error).
There are many different ways of scripting the build.
Assuming eveything will run through without problems
is not good.
After tragedy, and farce, "OMG poneys!"
More information about the lfs-support