hi LFS gurus,
LFS 6.7 Q for ya
I got to section 6.7.1 to install the linux headers and was hit with the message "gcc : No such file or directory" when I ran
So I started again, deleted everything. I eventually got back to section 5.10 and installed gcc pass 2 and had a closer look.
I created a dummy c file
Code:
echo 'main(){}' > d.c
for testing.
If I run
Code:
/mnt/lfs/tools/bin/gcc -v d.c
the first line is "Using built in specs"
If I run
Code:
/mnt/lfs/tools/bin/i686-lfs-linux-gnu-gcc -v d.c
the first line is "Reading specs from /mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux/gnu/4.5.1/specs"
Now the "specs" file is modified by the sed string in section 5.8 "Adjusting the Toolchain" and everything should be cosy.
But ....
When installing the linux headers in the chrooted environment ( section 6.7.1 ) "make" calls gcc which is using its own built in specs and not even reading the sed modified "specs" file. This means the install fails as /lib/ld/linux.so.2 doesn't exist yet.
If I run
Code:
ldd /mnt/lfs/tools/bin/gcc
I get a last line that reads "/lib/ld-linux.so.2" . It should have a /tools prefix. So the internal specs aren't being overridden by the specs file as gcc doesn't even bother to read it !
I've seen a hack that creates a soft link from /tools/lib/ld.linux.so.2 -> chroot/lib but other folks have built it OK without this.
Now I'm confused !
OK I'll try again tomorrow. Grrr !
