On 3/18/07, Andrejs Spunitis <[EMAIL PROTECTED]> wrote:
>
> For automation LFS, I've writtten the script
> accordnig to instruction from chapter 5:
> http://www.dzti.edu.lv/isp-serv/a7/lfs-toolkit.txt
<snip>
> # nohup ./lfs-toolkit.sh &

I see a few bad ideas about how you decide to script this.  Mostly it
boils down to that we don't know what's causing the error you listed. 
Any number of errors could have happened along the way because you're
not consistently checking exist status.

For instance, for gcc-pass1, you have:

make || ( echo "ERROR: make" >> /tools/logs.txt ; exit 1 )
[ "$?" -eq 1 ] && exit 1

This will work if gcc errors, but then you have:

make install

So, gcc could have not installed and the script would have continued
on.  Also, one of the most important parts, Ch. 5.7, is not guarded
against at all.  You may have a completely broken toolchain, and we
don't know.

Might I suggest `set -e'?  Basically, there are better ways to run the
scripts and do the logging.  Run `man bash' to find out about -e,
PIPESTATUS, etc.  Look at jhalfs on the LiveCD to see another example
of a scripted build.

Sorry to say, but it's impossible to know why `make texinfo' failed. 
However "collect2: ld returned 1 exit status" is a really bad sign.

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

Reply via email to