![]() |
LFS 6 ch5.9 adjusting the toolchain failed sanity check
Hi,
I'm attempting LFS v6 using MEPIS (2004.04) as the host distribution. I'm relatively new to linux and I'm studying for LPIC. I havent deviated from the instructions (that I'm aware of). I've made it as far as 5.9. Adjusting the Toolchain. lfs@1[sources]$ SPECFILE=`gcc --print-file specs` && > sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \ > $SPECFILE > tempspecfile && > mv -f tempspecfile $SPECFILE && > unset SPECFILE lfs@1[sources]$ rm -f /tools/lib/gcc/*/*/include/{pthread.h,bits/sigthread.h} lfs@1[sources]$ echo 'main(){}' > dummy.c lfs@1[sources]$ cc dummy.c /tools/lib/libc.so.6: undefined reference to `__libc_stack_end@GLIBC_2.1' /tools/lib/libc.so.6: undefined reference to `_rtld_global_ro@GLIBC_PRIVATE' collect2: ld returned 1 exit status lfs@1[sources]$ readelf -l a.out | grep ': /tools' readelf: Error: 'a.out': No such file I've tried the troubleshooting steps in the document (the specs file, symlink and path are all correct) then searched the LFS mailing list archives, google and this forum. The make -C ld install command gave allot of errors. lfs@1[binutils-build]$ make -C ld install make: Entering directory `/mnt/lfs/sources/binutils-build/ld' Making install in po make[1]: Entering directory `/mnt/lfs/sources/binutils-build/ld/po' make[1]: Nothing to be done for `install'. make[1]: Leaving directory `/mnt/lfs/sources/binutils-build/ld/po' make[1]: Entering directory `/mnt/lfs/sources/binutils-build/ld' gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.15.91.0.2/ld -I. -D_GNU_SOURCE -I. -I../../binutils-2.15.91.0.2/ld -I../bfd -I../../binutils-2.15.91.0.2/ld/../bfd -I../../binutils-2.15.91.0.2/ld/../include -I../../binutils-2.15.91.0.2/ld/../intl -I../intl -g -O2 -DLOCALEDIR="\"/tools/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c ../../binutils-2.15.91.0.2/ld/ldlang.c ../../binutils-2.15.91.0.2/ld/ldlang.c: In function `exp_init_os': ../../binutils-2.15.91.0.2/ld/ldlang.c:872: error: `ADDR' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:872: error: (Each undeclared identifier is reported only once ../../binutils-2.15.91.0.2/ld/ldlang.c:872: error: for each function it appears in.) ../../binutils-2.15.91.0.2/ld/ldlang.c:873: error: `LOADADDR' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:874: error: `SIZEOF' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c: In function `map_input_to_output_sections': ../../binutils-2.15.91.0.2/ld/ldlang.c:2060: error: `ONLY_IF_RW' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:2062: error: `ONLY_IF_RO' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c: In function `print_data_statement': ../../binutils-2.15.91.0.2/ld/ldlang.c:2395: error: `BYTE' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:2399: error: `SHORT' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:2403: error: `LONG' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:2407: error: `QUAD' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:2411: error: `SQUAD' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c: In function `lang_size_sections_1': ../../binutils-2.15.91.0.2/ld/ldlang.c:3114: error: `QUAD' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:3115: error: `SQUAD' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:3118: error: `LONG' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:3121: error: `SHORT' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:3124: error: `BYTE' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c: In function `lang_do_assignments_1': ../../binutils-2.15.91.0.2/ld/ldlang.c:3413: error: `QUAD' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:3414: error: `SQUAD' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:3417: error: `LONG' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:3420: error: `SHORT' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:3423: error: `BYTE' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c: In function `lang_enter_overlay_section': ../../binutils-2.15.91.0.2/ld/ldlang.c:4890: error: `ADDR' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:4898: error: `SIZEOF' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:4904: error: `MAX_K' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c: In function `lang_leave_overlay_section': ../../binutils-2.15.91.0.2/ld/ldlang.c:4939: error: `LOADADDR' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:4946: error: `SIZEOF' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c: In function `lang_leave_overlay': ../../binutils-2.15.91.0.2/ld/ldlang.c:4998: error: `LOADADDR' undeclared (first use in this function) ../../binutils-2.15.91.0.2/ld/ldlang.c:4999: error: `SIZEOF' undeclared (first use in this function) make[1]: *** [ldlang.o] Error 1 make[1]: Leaving directory `/mnt/lfs/sources/binutils-build/ld' make: *** [install-recursive] Error 1 make: Leaving directory `/mnt/lfs/sources/binutils-build/ld' lfs@1[binutils-build]$ cd .. lfs@1[sources]$ rm -r binutils-build/ rm: remove write-protected regular file `binutils-build//bfd/po/SRC-POTFILES'? y rm: remove write-protected regular file `binutils-build//bfd/po/BLD-POTFILES'? y lfs@1[sources]$ rm -r binutils-2.15.91.0.2 Does anyone know whats likely to of caused this and how to fix it ? Cheers Allan |
Unfortunatly I need the HD space so I'm going to have to reformat my LFS partition.
I'm not quiting though, I'll have another go once I've bought and installed a larger drive. Cheers Allan |
| All times are GMT -5. The time now is 01:54 AM. |