5.7 Adjusting the Toolchain

Herman Gerritsen lfsmailing at gmail.com
Sun Nov 30 04:10:04 PST 2008


Hi there,

I overlooked a mistake on my side.
(Somehow these things come to mind after writing a post...)
The LFS users .bashrc contained a wrong $PATH variable....
I somehow ommited the /tools/bin...

Thanks anyway, and sorry...
Herman Gerritsen

On Sun, Nov 30, 2008 at 12:57 PM, Herman Gerritsen <lfsmailing at gmail.com> wrote:
> Hi there,
>
> I see something wierd in the follwing line from the lfs-6.3 book (it
> is in chapter 5.7):
> Though I did not check it seems to be the same in the new lfs-6.4 book.
>
> GCC_INCLUDEDIR=`dirname $(gcc -print-libgcc-file-name)`/include &&
> find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; &&
> rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` &&
> unset GCC_INCLUDEDIR
>
> this command: "GCC_INCLUDEDIR=`dirname $(gcc
> -print-libgcc-file-name)`/include &&"
> seems to point to a directory on the host system.
> On my system it becomes: "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include"
> next this line: "rm -vf `grep -l "DO NOT EDIT THIS FILE"
> ${GCC_INCLUDEDIR}/*` &&"
> tries to delete files from my host system.
> This is natural because my systems PATH varaible contains:
> "/usr/local/bin:/bin:/usr/bin"
> thus it uses the hosts gcc.
> I believe it should use the new installed gcc from chapter 5.4.
> And therefore the GCC_INCLUDEDIR should be:
> "/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.1.2/include"
>
> Though I am not sure :)
>
> I found this problem in the following way:
> I have installed an lfs-6.3 system (that did not seem to have any problems)
> using the package uyser system.
> For this system I used a differnt kernel (2.6.24.4 instead of 2.6.22.5).
>
> Next I wanted to install a new lfs-6.3 system (using the previous one
> as the host)
> but now with the regular 2.6.22.5 kernel as described in the lfs-6.3 book.
> Again with the package user system.
>
> when the "rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` &&" line
> was enterd it gave me a permission error on:
>  /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/ssp/{ssp.h,stdio.h,string.h,unistd.h}
> Which is good, since these are files from my host system that cannot be deleted
> by the lfs user.
>
> I think I did something wrong an hopefully someone can point me somewhere.
> Thanks already,
> Herman Gerritsen
>



More information about the lfs-support mailing list