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.
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288
Rep:
The problem sounds like something to do with the binutils installation or perhaps your build environment. ld (the linker) and readelf are both in the binutils package. You should check permissions and ownerships in the /tools directory and it's contents, and also the verify your PATH in the build environment.
The problem sounds like something to do with the binutils installation or perhaps your build environment. ld (the linker) and readelf are both in the binutils package. You should check permissions and ownerships in the /tools directory and it's contents, and also the verify your PATH in the build environment.
This might sound bad but i don't know how to check the permissions and in the last stage i installed the 2 times i really don't know what to do i checked the path to match /tools/bin:/bin:/usr/bin but it keeps giving me the same error and worst is that i created another VM to check step by step and the same happens i'm seriously near to a breakdown and the presentation date is near. sorry to sound like this but I'm seriously bad right now.
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288
Rep:
Well, you can check the path at any time with:
echo $PATH
To check ownerships and permissions you can do ls with the long switch:
ls -l
(that's an el not a 1)
Since your building chrooted now do it after you chroot. And make certain you are following the books instructions on how to chroot exactly.
When I build lfs I like to place all the commands in a shell script so that I don't make mistakes.
Actually, I use two, one I name lfsmount that mounts all kernel file system's and the build partition and one I name lfschroot that executes the chroot into the build environment. So when I come back after shutting down all I have to do is login and:
To check ownerships and permissions you can do ls with the long switch:
ls -l
(that's an el not a 1)
Since your building chrooted now do it after you chroot. And make certain you are following the books instructions on how to chroot exactly.
When I build lfs I like to place all the commands in a shell script so that I don't make mistakes.
Actually, I use two, one I name lfsmount that mounts all kernel file system's and the build partition and one I name lfschroot that executes the chroot into the build environment. So when I come back after shutting down all I have to do is login and:
./lfsmount
./lfschroot
and I'm good to go.
I'm going to try it but plz stay near by I really need the help and thanks so much for helping me.
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288
Rep:
Reveiwing the thread, and reading in the lfs 6.3 book to fix in my mind where you are in the build process, I had a thought. A simple mistake that might cause the errors you are getting is that you should be logged in as root when you do the chroot. Not as user lfs. Something for you to check.
It might help if you give some details of your project. For example:
How are you building? From a lfs livecd? In x or from text console? What sort of hardware? That sort of thing.
Reveiwing the thread, and reading in the lfs 6.3 book to fix in my mind where you are in the build process, I had a thought. A simple mistake that might cause the errors you are getting is that you should be logged in as root when you do the chroot. Not as user lfs. Something for you to check.
It might help if you give some details of your project. For example:
How are you building? From a lfs livecd? In x or from text console? What sort of hardware? That sort of thing.
I'm using the 6.3 live cd on virtualbox thats what people recomended to me as i didn't have experience with linux before, by the way I'm always work as root when I'm installing in chapter 5 does that could be a problem.
edit
virtualbox is the virtual machine i'm using.
Last edited by Vxplus; 11-21-2008 at 05:11 PM.
Reason: added info
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288
Rep:
Quote:
Originally Posted by Vxplus
I'm using the 6.3 live cd on virtual box thats what people recomended to me as i didn't have experience with linux before, by the way I'm always work as root when I'm installing in chapter 5 does that could be a problem.
I'm not certain what you mean by "virtual box". Do you mean a terminal in X (like a 'MS Dos Prompt' in windows)? I'm guessing that's what you mean. That's probably best for your level of experience, although I myself prefer to work without x windows running. (Like when you shutdown and restart in dos mode in Windows.)
The Live CD is a good environment but a couple of things to keep in mind. The book is written as if when you take a break from building, you never shut the computer off. When you shut down the computer, so you have to reboot the cd, a lot of the changes you made to the build environment "go away". Particulary, the $LFS variable and changes you made to the bash config files (.bashrc, /etc/profile, .bash_profile, those kinds of files) need to be redone. And those changes vary depending of the stage of the build.
Creating and using a user account lfs is a good idea, but the main reason for doing so is to prevent damaging your host system. In your case the host system is the lfs livecd. It's a cd, read only, it can't be destroyed so you don't have worry about that.
The important thing is that you are certain that $LFS and $PATH are correct whenever you sed, configure, make and install. You can always check an environment variable like LFS or PATH by:
echo $VARIABLENAME
so for example the LFS variable:
echo $LFS
should return:
/mnt/lfs
much of the time you can alternately enter:
env
That's a linux command that prints a lot of environment info to the screen, but it may not be available at certain stages of the build.
>> Edit
Have you read this hint? It may be of some help. Remember though that the hd partition designation (like sda1) need to be replaced with the ones appropriate to your system. It says that in the first couple of paragraphs, but you don't want to miss that.
the old one kept saying.
configure: line 5510: /tools/bin/readelf: no such file or directory
then the:
configure: error: Need linker with .init_array/.fini_array support
somebody on my class already finished it but he did the same as me i cant understand this error.
Well, either the build environment was wrong or something went wrong earlier in the build, probably with the installation of binutils, as both readelf and ld are part of that package.
I've built lfs several times (started back when 5.0 was current) and I still make some pretty silly mistakes. The most recent was forgetting to make install gcc on the final pass... after leaving the computer running all night to make check. rm'd the source tree and then realized I hadn't make installed. Explitive deleted. That was about a week ago, on my current build of 6.3.
If the current try fails with the same error, try to cd into the /tools/bin directory and do ls -l . Look for readelf and ld (and the rest of the binutils package, the contents are 6.11.2 in the book). Try to copy down the lines for readelf and ld and see if any of the other member of the package differ (file sizes are different of course). Also, do:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.