"Locking in" Glibc (replace prob /lib/ld-linux.so.2 with /tools/lib/ld-linux.so.2
Linux From ScratchThis 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.
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.
"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..
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!!!
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."
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 =)
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 ...
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............
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.