Following the recipe in book v8.1, it fails on the step in
glibc (5.7) where it says to verify with compilation of a minimal c
program.
It claims it can't find the crt1.o object. This is however present in
the tools file tree, and the directory holding it shows up in the ld
search path. The "ld" command path itself seems a bit suspicious,
though.
The first time I went through this it worked without a problem. I messed
something up later on, tough, so I deleted all the contents in the /tools
directory and started over. I have now deleted and started over 3 times,
with and without deleting the unpacked source tars.
One thing to note is that I am installing in a loop-mounted fs that I
created using dd and mkfs.ext4. I don't know if that makes a difference?
Thanks for any advice on the matter.
---
Error symptom:
/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
/mnt/lfs/sources/glibc-2.26/build $ find /tools/
bin/ include/ lib64/ sbin/
var/
etc/ lib/ libexec/ share/
x86_64-lfs-linux-gnu/
/mnt/lfs/sources/glibc-2.26/build $ find /tools/ -iname *crt*o
/tools/lib/crt1.o
/tools/lib/Scrt1.o
/tools/lib/Mcrt1.o
/tools/lib/crti.o
/tools/lib/gcc/x86_64-lfs-linux-gnu/7.2.0/crtbeginS.o
/tools/lib/gcc/x86_64-lfs-linux-gnu/7.2.0/crtfastmath.o
/tools/lib/gcc/x86_64-lfs-linux-gnu/7.2.0/crtendS.o
/tools/lib/gcc/x86_64-lfs-linux-gnu/7.2.0/crtbeginT.o
/tools/lib/gcc/x86_64-lfs-linux-gnu/7.2.0/crtend.o
/tools/lib/gcc/x86_64-lfs-linux-gnu/7.2.0/crtprec64.o
/tools/lib/gcc/x86_64-lfs-linux-gnu/7.2.0/crtprec80.o
/tools/lib/gcc/x86_64-lfs-linux-gnu/7.2.0/crtprec32.o
/tools/lib/gcc/x86_64-lfs-linux-gnu/7.2.0/crtbegin.o
/tools/lib/gcrt1.o
/tools/lib/crtn.o
/mnt/lfs/sources/glibc-2.26/build $ $LFS_TGT-ld --verbose | grep SEARCH
SEARCH_DIR("=/tools/x86_64-lfs-linux-gnu/lib64"); SEARCH_DIR("/tools/lib");
SEARCH_DIR("=/tools/x86_64-lfs-linux-gnu/lib");
/mnt/lfs/sources/glibc-2.26/build $ echo $LFS $LFS_TGT
/mnt/lfs x86_64-lfs-linux-gnu
/mnt/lfs/sources/glibc-2.26/build $ ls -l /tools
lrwxrwxrwx 1 root root 14 Sep 25 00:28 /tools -> /mnt/lfs/tools
---
Host system:
$ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 18 Sarah
Release: 18
Codename: sarah
$ uname -a
Linux cantando 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux
---
version script output:
bash, version 4.3.48(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.26.1
bison (GNU Bison) 3.0.4
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.25
diff (GNU diffutils) 3.3
find (GNU findutils) 4.7.0-git
GNU Awk 4.1.3, API: 1.1 (GNU MPFR 3.1.4, GNU MP 6.1.0)
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
(GNU libc) 2.26
grep (GNU grep) 2.25
gzip 1.6
Linux version 4.4.0-45-generic (buildd@lgw01-34) (gcc version 5.4.0 20160609
(Ubuntu 5.4.0-6ubuntu1~16.04.2) ) #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016
m4 (GNU M4) 1.4.17
GNU Make 4.1
GNU patch 2.7.5
Perl version='5.22.1';
sed (GNU sed) 4.2.2
tar (GNU tar) 1.28
texi2any (GNU texinfo) 6.1
xz (XZ Utils) 5.1.0alpha
g++ compilation OK
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style