When I performed the sanity check,
Code:
echo 'int main(){}' > dummy.c
$LFS_TGT-gcc dummy.c
readelf -l a.out | grep ': /tools'
the expected output is,
Code:
[Requesting program interpreter: /tools/lib/ld-linux.so.2]
But, while executing it, I get error
Code:
lfs:/mnt/lfs/sources/glibc-2.26/build$ echo 'int main(){}' > dummy.c
lfs:/mnt/lfs/sources/glibc-2.26/build$ $LFS_TGT-gcc dummy.c
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/7.2.0/../../../../x86_64-lfs-linux-gnu/bin/ld:
cannot find crt1.o: No such file or directory
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/7.2.0/../../../../x86_64-lfs-linux-gnu/bin/ld:
cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
lfs:/mnt/lfs/sources/glibc-2.26/build$ readelf -l a.out | grep ': /tools'
readelf: Error: 'a.out': No such file
Th bashrc and bash_profile files.
Code:
lfs:/mnt/lfs/sources/glibc-2.26/build$ cat ~/.bash_profile
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
lfs:/mnt/lfs/sources/glibc-2.26/build$ cat ~/.bashrc
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
LFS_TGT=$(uname -m)-lfs-linux-gnu
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL LFS_TGT PATH
/tools and /mnt/lfs/tools are also linked. I've been stuck with this for so many days. Please help me.