build problem LFS 6.5

Ken Moffat zarniwhoop73 at
Fri Nov 27 17:30:51 PST 2009

2009/11/27 Philippe Delavalade <philippe.delavalade at>:
> Le vendredi 27 novembre à 15:38, stosss a écrit :
>> 1st half of one of my scripts
>> #!/bin/bash
>> tar -xvf vim-7.2.tar.bz2
>> cd vim72
>> patch -Np1 -i ../vim-7.2-fixes-5.patch
>> echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
>> ./configure --prefix=/usr --enable-multibyte
>> make
>> make test
>> 2nd half of the script for the vim app
>> #!/bin/bash
>> cd vim72
>> make install
>> ln -sv vim /usr/bin/vi
>> for L in  /usr/share/man/{,*/}man1/vim.1; do
>>     ln -sv vim.1 $(dirname $L)/vi.1
>> done
>> ln -sv ../vim/vim72/doc /usr/share/doc/vim-7.2
>> cat > /etc/vimrc << "EOF"
>> " Begin /etc/vimrc
>> set nocompatible
>> set backspace=2
>> syntax on
>> if (&term == "iterm") || (&term == "putty")
>>   set background=dark
>> endif
>> " End /etc/vimrc
>> EOF
>> cd ..
>> rm -rf vim72
>> I copied these commands straight off the pages of the book and put
>> them in shell scripts and ran the scripts.
> Maybe you should redirect the output and test the exit code of each command
> in your scripts...
> --
> --------------
> Ph. Delavalade
> --

 Indeed.  The "assume it is going to work, and don't
test to see if it did work" runs through the examples

 Scripting an LFS build is *hard*.  Let me clarify
that - scripting it in a way that takes account of
what might go wrong is hard.  The first time,
*everybody* should run the commands by hand.
It used to be that most people seemed to make
mistakes during their build - from those, plus the
other information in the book, many people
will be in a position to  investigate scripting.

 As I've said before, my own scripts are buggy as
hell, and not intended as examples of *how* to do
things.  Many people will also think they are overly
verbose ('cos these originated when I used to build
on a pile of crap called an AmigaOne, which never
got over the changes in LFS-6 and used to shut
down during builds)..  Plus, they might not do what
you want (e.g. I care about keeping the system I've
built up to date, so I avoid static libs in case there is
a vulnerability, and in my last versions I was still
getting rid of .la libtool archives (that's a fool's
errand for a desktop system!).  But they do mostly
work, and they're all I can offer.  The most recent
version is in

~/ken/desktop-2009-06 (targetted at LFS-6.4).

 The thing to do is to capture *all* errors, and to
consider where following the book exactly is not
appropriate to a scripted book (e.g. the
/bin/bash --login stuff).

After tragedy, and farce, "OMG poneys!"

More information about the lfs-support mailing list