La Compilation croisée Ne peut pas Trouver crt1.o

Salut, je suis à la compilation de Linux from Scratch (www.linuxfromscratch.org) et je suis sur une étape qui nécessite que ma compilation d'un test de programme c pour voir si la compilation de travail et c'est un échec.

Les commandes que j'utilise sont:

echo "main(){}" > dummy.c
$LFS_TGT-gcc -B/tools/lib dummy.c
readelf -l a.out | grep ': /tools'

Lors de l'exécution de la deuxième ligne, le compilateur renvoie les éléments suivants

..path../bin/ld: cannot find crt1.o: No such file or directory
..path../bin/ld: cannot find crti.o: No such file or directory
..path../bin/ld: cannot find -lc
..path../bin/ld: cannot find crtn.o: No such file or directory
collect2: ld returned 1 exit status

Pas sûr de ce que le problème est ici, et comment résoudre le problème,

Jusqu'à présent j'ai réinstallé le pack gcc ainsi que les spécifications de fichier.

La sortie de $LFS_TGT-gcc -v -B/tools/lib dummy.c est:

Reading specs from /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/specs
COLLECT_GCC=x86_64-lfs-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/4.6.1/lto- wrapper
Target: x86_64-lfs-linux-gnu
Configured with: ../gcc-4.6.1/configure --target=x86_64-lfs-linux-gnu --prefix=/tools --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath --disable-target-libiberty --disable-target-zlib --enable-languages=c --without-pppl --without-cloog --with-mpfr-include=/mnt/lfs/sources/gcc-4.6.1/mpfr/src --with-mpfr-lib=/mnt/lfs/sources/gcc-build/mpfr/src/.libs
Thread model: single
gcc version 4.6.1 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-B' '/tools/lib' '-mtune=generic' '-march=x86-64'
/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/4.6.1/cc1 -quiet -v -iprefix  /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/ -isystem /tools/include dummy.c quiet -dumpbase dummy.c -mtune=generic -march=x86-64 -auxbase dummy -version -o /tmp/ccQMiBtT.s
GNU C (GCC) version 4.6.1 (x86_64-lfs-linux-gnu)
compiled by GNU C version 4.5.2, GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
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/4.6.1/../../../../x86_64-lfs-linux-gnu/sys-include"
ignoring nonexistent directory "/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/../../../../x86_64-lfs-linux-gnu/include"
ignoring duplicate directory "/mnt/lfs/tools/bin/../lib/gcc/../../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/include"
ignoring duplicate directory "/mnt/lfs/tools/bin/../lib/gcc/../../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/include-fixed"
ignoring nonexistent directory "/mnt/lfs/tools/bin/../lib/gcc/../../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/../../../../x86_64-lfs-linux-gnu/sys-include"
ignoring nonexistent directory "/mnt/lfs/tools/bin/../lib/gcc/../../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/../../../../x86_64-lfs-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/tools/include
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/include
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/include-fixed
End of search list.
GNU C (GCC) version 4.6.1 (x86_64-lfs-linux-gnu)
compiled by GNU C version 4.5.2, GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: ac76a9fc3d8568635f4cf190a73f3235
COLLECT_GCC_OPTIONS='-v' '-B' '/tools/lib' '-mtune=generic' '-march=x86-64'
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/../../../../x86_64-lfs-linux-gnu/bin/as --64 -o /tmp/ccjUV0Gs.o /tmp/ccQMiBtT.s
COMPILER_PATH=/tools/lib/:/mnt/lfs/tools/bin/../libexec/gcc/x86_64-lfs-linux-gnu/4.6.1/:/mnt/lfs/tools/bin/../libexec/gcc/:/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/../../../../x86_64-lfs-linux-gnu/bin/
LIBRARY_PATH=/tools/lib/:/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/:/mnt/lfs/tools/bin/../lib/gcc/:/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/../../../../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/4.6.1/collect2 --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/4.6.1/crtbegin.o -L/tools/lib -L/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1 -L/mnt/lfs/tools/bin/../lib/gcc -L/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/../../../../x86_64-lfs-linux-gnu/lib /tmp/ccjUV0Gs.o -lgcc -lc -lgcc /mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/crtend.o crtn.o
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/../../../../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/4.6.1/../../../../x86_64-lfs-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/../../../../x86_64-lfs-linux-gnu/bin/ld: cannot find -lc
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.6.1/../../../../x86_64-lfs-linux-gnu/bin/ld: cannot find crtn.o: No such file or directory
collect2: ld returned 1 exit status

Je me rends compte que c'est super long, mais si quelqu'un pouvait dire à ce qui est pertinent, je vais le découper. Parce que, très honnêtement, je ne sais pas ce qui est utile.

Cela peut aussi arriver si --with-lib-path=/tools/lib est manquant, car ld ne savez pas à ajouter -L/tools/lib
double possible de la Compilation de problèmes: impossible de trouver crt1.o

OriginalL'auteur Drew Galbraith | 2011-10-28