Hi,
Everything just went OK until there. After re-adjusting the GCC specs file to make it stop pointing /tools, smething went wrong : a.out is not produced anymore when testing the dummy.c compilation. dummy.log show that libgcc_s* cannot be found: in fact, these files (libgcc_s.so and libgcc_s.a) are both in /tools/lib but gcc/ld are searching in /tools/lib/gcc/i686-pc-linux-gnu.
Deviations are : custom target vendor (i686-frenchslack-linux), and, in chroot environment, /tools is pointing /lfs/tools (this is wanted).
If I made an error with the environment variables, I'll be glad just to know how to put gcc specs just as in chapter 5 (pointing /tools), as I suspect suspend-to-ram to get my bash/chroot env. variables messy when waking up.
Here are the environment, the outputs from dummy.log and commands from chapter 6.10. Please note that 'cc' and 'gcc' produce same output :
Code:
root:/# cc dummy.c -v -Wl,--verbose &> dummy.log
root:/# less dummy.log
Reading specs from /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/specs
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.4.1/configure --prefix=/tools --with-local-prefix=/tools --enable-clocale=gnu --enable-shared --enable-threads=p
osix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --disable-bootstrap
Thread model: posix
gcc version 4.4.1 (GCC)
COLLECT_GCC_OPTIONS='-v' '-mtune=generic'
/lfs/tools/bin/../libexec/gcc/i686-pc-linux-gnu/4.4.1/cc1 -quiet -v -iprefix /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/ -isystem
/usr/include dummy.c -quiet -dumpbase dummy.c -mtune=generic -auxbase dummy -version -o /tmp/cc6nhH5n.s
ignoring nonexistent directory "/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/include"
ignoring duplicate directory "/lfs/tools/bin/../lib/gcc/../../lib/gcc/i686-pc-linux-gnu/4.4.1/include"
ignoring duplicate directory "/lfs/tools/bin/../lib/gcc/../../lib/gcc/i686-pc-linux-gnu/4.4.1/include-fixed"
ignoring nonexistent directory "/lfs/tools/bin/../lib/gcc/../../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include
/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/include
/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/include-fixed
/tools/include
End of search list.
GNU C (GCC) version 4.4.1 (i686-pc-linux-gnu)
compiled by GNU C version 4.4.1, GMP version 4.3.1, MPFR version 2.4.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 986c9f9cca14fe4c1247cacdbc265bdf
COLLECT_GCC_OPTIONS='-v' '-mtune=generic'
/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/bin/as -V -Qy -o /tmp/ccamUpEA.o /tmp/cc6nhH5n.s
GNU assembler version 2.19.1 (i686-pc-linux-gnu) using BFD version (GNU Binutils) 2.19.1
COMPILER_PATH=/lfs/tools/bin/../libexec/gcc/i686-pc-linux-gnu/4.4.1/:/lfs/tools/bin/../libexec/gcc/:/lfs/tools/bin/../lib/gcc/i686-pc-linu
x-gnu/4.4.1/../../../../i686-pc-linux-gnu/bin/
LIBRARY_PATH=/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/:/lfs/tools/bin/../lib/gcc/:/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4
.1/../../../../i686-pc-linux-gnu/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-mtune=generic'
/lfs/tools/bin/../libexec/gcc/i686-pc-linux-gnu/4.4.1/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt
1.o /usr/lib/crti.o /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/crtbegin.o -L/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1 -L/lf
s/tools/bin/../lib/gcc -L/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/lib /tmp/ccamUpEA.o --verbose -lg
cc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/crten
d.o /usr/lib/crtn.o
GNU ld (GNU Binutils) 2.19.1
Supported emulations:
elf_i386
i386linux
using internal linker script:
==================================================
/* Script for -z combreloc: combine and sort reloc sections */
OUTPUT_FORMAT("elf32-i386", "elf32-i386",
"elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
SEARCH_DIR("/tools/i686-pc-linux-gnu/lib"); SEARCH_DIR("/usr/lib"); SEARCH_DIR("/lib");
=== snip ===
==================================================
attempt to open /usr/lib/crt1.o succeeded
/usr/lib/crt1.o
attempt to open /usr/lib/crti.o succeeded
/usr/lib/crti.o
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/crtbegin.o succeeded
/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/crtbegin.o
attempt to open /tmp/ccamUpEA.o succeeded
/tmp/ccamUpEA.o
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/libgcc.so failed
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/libgcc.a succeeded
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/libgcc_s.so failed
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/libgcc_s.a failed
attempt to open /lfs/tools/bin/../lib/gcc/libgcc_s.so failed
attempt to open /lfs/tools/bin/../lib/gcc/libgcc_s.a failed
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/lib/libgcc_s.so failed
attempt to open /lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/lib/libgcc_s.a failed
attempt to open /tools/i686-pc-linux-gnu/lib/libgcc_s.so failed
attempt to open /tools/i686-pc-linux-gnu/lib/libgcc_s.a failed
attempt to open /usr/lib/libgcc_s.so failed
attempt to open /usr/lib/libgcc_s.a failed
attempt to open /lib/libgcc_s.so failed
attempt to open /lib/libgcc_s.a failed/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.4.1/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
I think the problem is in some wrong paths here. Now for the environment:
Code:
root:/# env
TERM=xterm
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
PWD=/
PS1=\u:\w\$
SHLVL=1
HOME=/root
_=/bin/env
As I said, no a.out is produced. Here are the output of next commands :
Code:
root:/# grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
/usr/lib/crt1.o succeeded
/usr/lib/crti.o succeeded
1 file is missing here (crtn.o)...
Code:
root:/# grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
SEARCH_DIR("/tools/i686-pc-linux-gnu/lib")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib");
No info about ld-linux.so.2 or libc.so.6 ... :/
That's all I've got. Everything went all right until then. Any direction ?