LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices



Reply
 
Search this Thread
Old 03-14-2005, 03:09 PM   #1
totty79
LQ Newbie
 
Registered: Mar 2005
Location: UK
Distribution: MEPIS
Posts: 2

Rep: Reputation: 0
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
 
Old 03-21-2005, 03:58 PM   #2
totty79
LQ Newbie
 
Registered: Mar 2005
Location: UK
Distribution: MEPIS
Posts: 2

Original Poster
Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
5.7. Adjusting the Toolchain - sanity issue... yanger Linux From Scratch 2 11-12-2008 05:52 AM
FC4 /lib/cpp failed sanity check cwynn Fedora 2 11-07-2005 01:35 PM
6.12. Re-adjusting the Toolchain jobesd Linux From Scratch 2 01-16-2005 02:50 PM
sanity check failed for g++ pablovschby Programming 2 11-08-2004 03:39 AM
Failed sanity check in fluxbox ./configure scuzzman Linux - Newbie 6 06-20-2004 11:26 PM


All times are GMT -5. The time now is 07:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration