Hi,
I'm trying to build LFS 7.9 and the host system is Debian 8.4.0. The
compilation test in chapter 5.7 "Glibc-2.23" fails:
> $LFS_TGT-gcc dummy.c
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.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/5.3.0/../../../../x86_64-lfs-linux-gnu/bin/ld:
cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
However it works if add the argument -B/tools/lib, see the attached log file, I
have also added -v for verbosity. So I guess something is wrong with either the
binutils, gcc, or glibc steps. This failure causes the configure step for
libstdc++-5.3.0 to fail. Any ideas?
Thanks//Graham
bash, version 4.3.30(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Debian) 2.25
bison (GNU Bison) 3.0.2
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.23
diff (GNU diffutils) 3.3
find (GNU findutils) 4.4.2
GNU Awk 4.1.1, API: 1.1 (GNU MPFR 3.1.2-p3, GNU MP 6.0.0)
/usr/bin/awk -> /usr/bin/gawk
gcc (Debian 4.9.2-10) 4.9.2
g++ (Debian 4.9.2-10) 4.9.2
(GNU libc) 2.23
grep (GNU grep) 2.20
gzip 1.6
Linux version 3.16.0-4-amd64 ([email protected]) (gcc version
4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08)
m4 (GNU M4) 1.4.17
GNU Make 4.0
GNU patch 2.7.5
Perl version='5.20.2';
sed (GNU sed) 4.2.2
tar (GNU tar) 1.27.1
makeinfo (GNU texinfo) 5.2
xz (XZ Utils) 5.1.0alpha
g++ compilation OK
> $LFS_TGT-gcc dummy.c
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.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/5.3.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_TGT-gcc -v dummy.c
Using built-in specs.
COLLECT_GCC=x86_64-lfs-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/5.3.0/lto-wrapper
Target: x86_64-lfs-linux-gnu
Configured with: ../configure --target=x86_64-lfs-linux-gnu --prefix=/tools
--with-glibc-version=2.11 --with-sysroot=/mnt/lfs --with-newlib
--without-headers --with-local-prefix=/tools
--with-native-system-header-dir=/tools/include --disable-nls --disable-shared
--disable-multilib --disable-decimal-float --disable-threads
--disable-libatomic --disable-libgomp --disable-libquadmath --disable-libssp
--disable-libvtv --disable-libstdcxx --enable-languages=c,c++
Thread model: single
gcc version 5.3.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/5.3.0/cc1 -quiet -v
-iprefix /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/ dummy.c
-quiet -dumpbase dummy.c -mtune=generic -march=x86-64 -auxbase dummy -version
-o /tmp/ccSEI2K3.s
GNU C11 (GCC) version 5.3.0 (x86_64-lfs-linux-gnu)
compiled by GNU C version 4.9.2, GMP version 6.1.0, MPFR version 3.1.3,
MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/include"
ignoring duplicate directory
"/mnt/lfs/tools/bin/../lib/gcc/../../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/include"
ignoring duplicate directory
"/mnt/lfs/tools/bin/../lib/gcc/../../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/include-fixed"
ignoring nonexistent directory
"/mnt/lfs/tools/bin/../lib/gcc/../../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/include"
ignoring duplicate directory "/mnt/lfs/tools/include"
#include "..." search starts here:
#include <...> search starts here:
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/include
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/include-fixed
/mnt/lfs/tools/include
End of search list.
GNU C11 (GCC) version 5.3.0 (x86_64-lfs-linux-gnu)
compiled by GNU C version 4.9.2, GMP version 6.1.0, MPFR version 3.1.3,
MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: e3476f063b0c7c8a3cf1da239c6d1781
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/bin/as
-v --64 -o /tmp/ccq6OsYC.o /tmp/ccSEI2K3.s
GNU assembler version 2.26 (x86_64-lfs-linux-gnu) using BFD version (GNU
Binutils) 2.26.20160125
COMPILER_PATH=/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/5.3.0/:/mnt/lfs/tools/bin/../libexec/gcc/:/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/bin/
LIBRARY_PATH=/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/:/mnt/lfs/tools/bin/../lib/gcc/:/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/lib/
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/5.3.0/collect2 -plugin
/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/5.3.0/liblto_plugin.so
-plugin-opt=/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/5.3.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccAdJoz8.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc
--sysroot=/mnt/lfs --eh-frame-hdr -m elf_x86_64 -dynamic-linker
/tools/lib64/ld-linux-x86-64.so.2 crt1.o crti.o
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/crtbegin.o
-L/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0
-L/mnt/lfs/tools/bin/../lib/gcc
-L/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/lib
/tmp/ccq6OsYC.o -lgcc -lc -lgcc
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/crtend.o crtn.o
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.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/5.3.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_TGT-gcc -v dummy.c
Using built-in specs.
COLLECT_GCC=x86_64-lfs-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/5.3.0/lto-wrapper
Target: x86_64-lfs-linux-gnu
Configured with: ../configure --target=x86_64-lfs-linux-gnu --prefix=/tools
--with-glibc-version=2.11 --with-sysroot=/mnt/lfs --with-newlib
--without-headers --with-local-prefix=/tools
--with-native-system-header-dir=/tools/include --disable-nls --disable-shared
--disable-multilib --disable-decimal-float --disable-threads
--disable-libatomic --disable-libgomp --disable-libquadmath --disable-libssp
--disable-libvtv --disable-libstdcxx --enable-languages=c,c++
Thread model: single
gcc version 5.3.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-B' '/tools/lib' '-mtune=generic' '-march=x86-64'
/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/5.3.0/cc1 -quiet -v
-iprefix /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/ dummy.c
-quiet -dumpbase dummy.c -mtune=generic -march=x86-64 -auxbase dummy -version
-o /tmp/ccQqZMNj.s
GNU C11 (GCC) version 5.3.0 (x86_64-lfs-linux-gnu)
compiled by GNU C version 4.9.2, GMP version 6.1.0, MPFR version 3.1.3,
MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/include"
ignoring duplicate directory
"/mnt/lfs/tools/bin/../lib/gcc/../../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/include"
ignoring duplicate directory
"/mnt/lfs/tools/bin/../lib/gcc/../../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/include-fixed"
ignoring nonexistent directory
"/mnt/lfs/tools/bin/../lib/gcc/../../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/include"
ignoring duplicate directory "/mnt/lfs/tools/include"
#include "..." search starts here:
#include <...> search starts here:
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/include
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/include-fixed
/mnt/lfs/tools/include
End of search list.
GNU C11 (GCC) version 5.3.0 (x86_64-lfs-linux-gnu)
compiled by GNU C version 4.9.2, GMP version 6.1.0, MPFR version 3.1.3,
MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: e3476f063b0c7c8a3cf1da239c6d1781
COLLECT_GCC_OPTIONS='-v' '-B' '/tools/lib' '-mtune=generic' '-march=x86-64'
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/bin/as
-v --64 -o /tmp/cc6iIifA.o /tmp/ccQqZMNj.s
GNU assembler version 2.26 (x86_64-lfs-linux-gnu) using BFD version (GNU
Binutils) 2.26.20160125
COMPILER_PATH=/tools/lib/:/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/5.3.0/:/mnt/lfs/tools/bin/../libexec/gcc/:/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/bin/
LIBRARY_PATH=/tools/lib/:/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/:/mnt/lfs/tools/bin/../lib/gcc/:/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/lib/
COLLECT_GCC_OPTIONS='-v' '-B' '/tools/lib' '-mtune=generic' '-march=x86-64'
/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/5.3.0/collect2 -plugin
/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/5.3.0/liblto_plugin.so
-plugin-opt=/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/5.3.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccyXWj4M.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc
--sysroot=/mnt/lfs --eh-frame-hdr -m elf_x86_64 -dynamic-linker
/tools/lib64/ld-linux-x86-64.so.2 /tools/lib/crt1.o /tools/lib/crti.o
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/crtbegin.o
-L/tools/lib -L/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0
-L/mnt/lfs/tools/bin/../lib/gcc
-L/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/../../../../x86_64-lfs-linux-gnu/lib
/tmp/cc6iIifA.o -lgcc -lc -lgcc
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/5.3.0/crtend.o
/tools/lib/crtn.o
> readelf -l a.out
Elf file type is EXEC (Executable file)
Entry point 0x400390
There are 8 program headers, starting at offset 64
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
PHDR 0x0000000000000040 0x0000000000400040 0x0000000000400040
0x00000000000001c0 0x00000000000001c0 R E 8
INTERP 0x0000000000000200 0x0000000000400200 0x0000000000400200
0x0000000000000022 0x0000000000000022 R 1
[Requesting program interpreter: /tools/lib64/ld-linux-x86-64.so.2]
LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000
0x00000000000006e4 0x00000000000006e4 R E 200000
LOAD 0x00000000000006e8 0x00000000006006e8 0x00000000006006e8
0x00000000000001f0 0x0000000000000200 RW 200000
DYNAMIC 0x0000000000000710 0x0000000000600710 0x0000000000600710
0x0000000000000190 0x0000000000000190 RW 8
NOTE 0x0000000000000224 0x0000000000400224 0x0000000000400224
0x0000000000000020 0x0000000000000020 R 4
GNU_EH_FRAME 0x00000000000005bc 0x00000000004005bc 0x00000000004005bc
0x0000000000000034 0x0000000000000034 R 4
GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 RW 10
Section to Segment mapping:
Segment Sections...
00
01 .interp
02 .interp .note.ABI-tag .hash .dynsym .dynstr .gnu.version
.gnu.version_r .rela.dyn .rela.plt .init .plt .plt.got .text .fini .rodata
.eh_frame_hdr .eh_frame
03 .ctors .dtors .jcr .dynamic .got .got.plt .data .bss
04 .dynamic
05 .note.ABI-tag
06 .eh_frame_hdr
07
--
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