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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-31-2004, 02:19 AM
|
#1
|
LQ Newbie
Registered: Jul 2004
Location: Italy
Distribution: Red Hat 8
Posts: 11
Rep:
|
"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..
|
|
|
07-31-2004, 10:41 AM
|
#2
|
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577
Rep:
|
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.
|
|
|
08-07-2004, 01:24 AM
|
#3
|
LQ Newbie
Registered: Jul 2004
Location: Italy
Distribution: Red Hat 8
Posts: 11
Original Poster
Rep:
|
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
|
|
|
08-07-2004, 02:18 AM
|
#4
|
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577
Rep:
|
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 .........
what does it say??
Last edited by 320mb; 08-07-2004 at 04:48 PM.
|
|
|
08-07-2004, 04:39 PM
|
#5
|
Member
Registered: Oct 2003
Location: The Forest
Distribution: Kubuntu, LFS, DSL
Posts: 127
Rep:
|
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 =)
|
|
|
08-07-2004, 04:50 PM
|
#6
|
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577
Rep:
|
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.......??
|
|
|
08-07-2004, 05:00 PM
|
#7
|
Member
Registered: Oct 2003
Location: The Forest
Distribution: Kubuntu, LFS, DSL
Posts: 127
Rep:
|
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 ...
|
|
|
08-07-2004, 05:10 PM
|
#8
|
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577
Rep:
|
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............
|
|
|
08-07-2004, 05:44 PM
|
#9
|
Member
Registered: Oct 2003
Location: The Forest
Distribution: Kubuntu, LFS, DSL
Posts: 127
Rep:
|
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.
|
|
|
08-07-2004, 09:15 PM
|
#10
|
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577
Rep:
|
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
|
|
|
08-08-2004, 02:08 AM
|
#11
|
Member
Registered: Oct 2003
Location: The Forest
Distribution: Kubuntu, LFS, DSL
Posts: 127
Rep:
|
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.
|
|
|
06-29-2006, 11:19 AM
|
#12
|
Member
Registered: Jan 2004
Location: India
Distribution: Android 9.0.6
Posts: 123
Rep:
|
thanks a lot!
This thread helped me a lot in my LFS project.
Thanks a lot!
|
|
|
All times are GMT -5. The time now is 01:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|