LinuxQuestions.org
Help answer threads with 0 replies.
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 07-31-2004, 02:19 AM   #1
irfanali
LQ Newbie
 
Registered: Jul 2004
Location: Italy
Distribution: Red Hat 8
Posts: 11

Rep: Reputation: 0
Thumbs down "Locking in" Glibc (replace prob /lib/ld-linux.so.2 with /tools/lib/ld-linux.so.2


Hi ALL,

Every thing was going right...and there was no error in installation of LFS 5.
In "Locking in"Glibc section ,the book says we need to djust linker and compiler's spec file.
after executing this command "make -C ld install" when i have treid to amend gcc spec file just by replacing "lib/ld-linux.so.2" with "/tools/lib/ld-linux.so.2" my existing system crashed and when i boot my machine from linux it says "Kernel panic something error..........."
i am very new to linux and LFS

Can anybody help to me to get rid of this kind of problem..
 
Old 07-31-2004, 10:41 AM   #2
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
from the book........
Quote:
First install the adjusted linker by running the following from within the
binutils-build directory:

make -C ld install
did you issue this while 'inside' the binutils-build directory???


Quote:
The next thing to do is to amend our GCC specs file so that it points to
the new dynamic linker. A simple sed will accomplish this:

SPECFILE=/tools/lib/gcc-lib/*/*/specs &&
sed -e 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \
$SPECFILE > tempspecfile &&
mv -f tempspecfile $SPECFILE &&
unset SPECFILE

We recommend that you cut-and-paste the above rather than try and type it
all in. Or you can edit the specs file by hand if you want to: just
replace any occurrence of "/lib/ld-linux.so.2" with
"/tools/lib/ld-linux.so.2".
did you cut and paste like suggested?? it's very easy to type the info wrong!!!

Last edited by 320mb; 07-31-2004 at 10:44 AM.
 
Old 08-07-2004, 01:24 AM   #3
irfanali
LQ Newbie
 
Registered: Jul 2004
Location: Italy
Distribution: Red Hat 8
Posts: 11

Original Poster
Rep: Reputation: 0
Yes, I Have installed the linker by running "make -C ld install within the binutils-build dir
and executed both commands by cut and paste " SPECFILE=/tools/........................unset SPECFILE" and "rm -f /tools/lib/gcc-lib/*/*/include/{pthread.h,bits/sigthread.h}"

now after excuting this
echo 'main(){}' > dummy.c
gcc dummy.c
readelf -l a.out | grep ': /tools'

this error is comming ---------------> "readelf: Error: Cannot stat input file a.out."

Could you help me again...? thnx
 
Old 08-07-2004, 02:18 AM   #4
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
OK, copy/paste that SPECFILE just like you see it......
DONT change anything...........


</edit> did you apply the glibc-2.3.2-sscanf-1.patch??

and from the term window type .........

Code:
echo $LFS
what does it say??

Last edited by 320mb; 08-07-2004 at 04:48 PM.
 
Old 08-07-2004, 04:39 PM   #5
Engmar
Member
 
Registered: Oct 2003
Location: The Forest
Distribution: Kubuntu, LFS, DSL
Posts: 127

Rep: Reputation: 16
similar

I'm at very nearly the same situation. I'm in chapter 5 of unstable. I executed the sed script to change all instances of /lib/ld-linux.so.2 to /tools/lib/ld-linux.so.2 within the gcc spec file. I then visually inspected the spec file, and found only instances of the original /lib/ld-linux.so.2

The spec patch states it is intended for pass 2. Should I have applied it anyway? I won't polute the thread with my listings until irfanali's problems are ironed out, but am following with interest =)
 
Old 08-07-2004, 04:50 PM   #6
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
LOL, sorry about that .......MY FAULT!!!.......
I meant to ask him about the sscanf patch.........

I changed it...........
the book is right........the spec patch is for "pass 2"
are you getting any other errors.......??
 
Old 08-07-2004, 05:00 PM   #7
Engmar
Member
 
Registered: Oct 2003
Location: The Forest
Distribution: Kubuntu, LFS, DSL
Posts: 127

Rep: Reputation: 16
I'm not getting any errors at all yet. I was afraid to proceed past this point, after visually inspecting the specs file and finding it unchanged. I should be looking at the specs file in /lfs/sources/gcc-build/gcc correct?

Other than reading a couple of quick tutorials, sed is beyond my pay grade - so far. I recieved no errors or warnings from the script. It did ... something. It didn't change the location of the linker to be used, though. I can just go ahead and edit it by hand, but am curious about what the script did when I ran it ...
 
Old 08-07-2004, 05:10 PM   #8
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Quote:
Originally posted by Engmar
I'm not getting any errors at all yet. I was afraid to proceed past this point, after visually inspecting the specs file and finding it unchanged. I should be looking at the specs file in /lfs/sources/gcc-build/gcc correct?

No, the Specfile is in /tools/lib/gcc-lib/*/*/
just like the script says..........I think that where irfanali went wrong, he
changed by hand and it was the wrong one............
 
Old 08-07-2004, 05:44 PM   #9
Engmar
Member
 
Registered: Oct 2003
Location: The Forest
Distribution: Kubuntu, LFS, DSL
Posts: 127

Rep: Reputation: 16
Wow. I should _always_ have my morning coffee before reading scripts =D
I was looking at the original, not the newly created. I will slink away now. Thank
you very much.
 
Old 08-07-2004, 09:15 PM   #10
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Hey, LFS can teach you alot.......when you finish, get the beyond LFS book
and continue on...............

http://linuxfromscratch.idge.net/hints/downloads/files/

the above is a directory for LFS/BLFS hints...........get the lfsbackup.txt
so you can save a tarball for later............LOL
 
Old 08-08-2004, 02:08 AM   #11
Engmar
Member
 
Registered: Oct 2003
Location: The Forest
Distribution: Kubuntu, LFS, DSL
Posts: 127

Rep: Reputation: 16
I'm definitely learning. I think I might need 2 or 3 runs through the process, using all related texts, to get as deep an understanding as I want. Then some intensive "poking around" sessions. BLFS is definitely in my future.
 
Old 06-29-2006, 11:19 AM   #12
pradeepmenon777
Member
 
Registered: Jan 2004
Location: India
Distribution: Android 9.0.6
Posts: 123

Rep: Reputation: 16
thanks a lot!

This thread helped me a lot in my LFS project.
Thanks a lot!
 
  


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
error: C++ preprocessor "/lib/cpp" fails sanity check marek345 Linux - Software 4 11-06-2008 10:49 AM
error: C preprocessor "/lib/cpp" fails sanity check Master Fox Linux - Software 0 10-14-2004 04:39 PM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-29-2004 12:33 AM
" '/lib/cpp' fails sanity check" when trying to install GAIM BoardinBum Linux - Newbie 2 08-13-2004 09:39 AM
/lib/modules/2.4.20-6/ contains an entry called "build" which is highlighted in red - Simon Bridge Linux - Software 1 01-24-2004 10:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 01:34 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
Open Source Consulting | Domain Registration