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.
also in previous lfs (7 & 8) there is library check. why in version 10 there is no library check? is it still necessary?
what i've did:
1. check the host requirement
2. check the mounting & LFS variable
3. build as user = lfs
4. check the library
5. delete and try to rebuild with make -j1 (previously i tried with make -j2). result: still the same error
6. following this guide, change chown, delete and rebuild again from binutils. result: still the same error
It's the whole idea of a Virtual box I'd worry about. The whole idea of a virtual box is thaty what goes on in the virtual box stays in the virtual box. OTOH, the whole idea of LFS is to use s separate directory, so your host system can compile chapter 5.
Is your host system in the virtual box? If not, stop now. Even if it is, it's a problem because with one VM in virtualbox, you can't give more than 50% of your resources to the guest. So your compiles will be hellish slow. And your hardware won't be in the VM - not anything your actual host uses. It's just pretending to be.
I'd recommend a full backup of your system from a live cd to usb or disk, followed by making the /tools directory, and tackle it without the VM.
They are both right. VM is ALWAYS trouble for first timers. Use bare metal if you dont have proficiency with vm's and what's required by LFS. Gmp and friends have their own dirs under gcc-x-x/gmp etc.
hi business_kid, hazel, & arch-linq,
thank you for the feedback.
Quote:
Originally Posted by business_kid
Hi, dns2887 & welcome to LQ
It's the whole idea of a Virtual box I'd worry about. The whole idea of a virtual box is thaty what goes on in the virtual box stays in the virtual box. OTOH, the whole idea of LFS is to use s separate directory, so your host system can compile chapter 5.
Is your host system in the virtual box? If not, stop now. Even if it is, it's a problem because with one VM in virtualbox, you can't give more than 50% of your resources to the guest. So your compiles will be hellish slow. And your hardware won't be in the VM - not anything your actual host uses. It's just pretending to be.
I'd recommend a full backup of your system from a live cd to usb or disk, followed by making the /tools directory, and tackle it without the VM.
this is my limitations. currently, i just have one machine, an old laptop for work (my company bought it for me 5 years ago -- much more a potato than a computer now). the main os is windows where all my work is there, and i don't want to broke/delete those files, so i've installed virtualbox and installed debian 10 in there for building the LFS. and yes, compiling is kinda slow (even the drive is not ssd), so i usually left it all night long, that's ok.
Quote:
Originally Posted by hazel
This looks wrong to me:
configure: error: in `/mnt/lfs/sources/gcc-10.2.0/build/gmp':
gmp and similar internal libraries are supposed to be unpacked into the top-level gcc directory, not into build.
i've extracted and renamed gmp, mpfr, mpc in the correct directory $LFS/sources/gcc-10.2.0 (not inside the build directory or folder) and checked it before. that error is from the script, but i don't know whether from the config or not.
Quote:
Originally Posted by arch-linq
They are both right. VM is ALWAYS trouble for first timers. Use bare metal if you dont have proficiency with vm's and what's required by LFS. Gmp and friends have their own dirs under gcc-x-x/gmp etc.
perhaps i will start saving more to buy a new machine.
---
this is my update:
after a lot of reading related to building from sources, makefile, autotools, and so on.
finally, i've changed all the folder owner and permission to lfs (include the lib64, lost+found) in the lfs partition. previously it's only $LFS/sources & $LFS/tools. and i've changed all the other names for root's .bashrc, .profile, .bash_profile so it doesn't get used when building with similar concepts as this page in "important sections" to clean the environment. i did all these steps just to be safe. after that, i extracted the binutils and gcc again, and voila it worked.
so now i am in chapter 8.8 (Glibc) and i've encountered another error after i issued casec-esac command like in the book.
these are the screenshots.
i'm still troubleshooting this, probably the symlink broke the environment.
should this thread marked as solved and closed and i create another thread for the new error?
or can we continue in here?
after a lot of reading related to building from sources, makefile, autotools, and so on.
finally, i've changed all the folder owner and permission to lfs (include the lib64, lost+found) in the lfs partition. previously it's only $LFS/sources & $LFS/tools. and i've changed all the other names for root's .bashrc, .profile, .bash_profile so it doesn't get used when building with similar concepts as this page in "important sections" to clean the environment. i did all these steps just to be safe. after that, i extracted the binutils and gcc again, and voila it worked.
I think that was a very bad idea. Things like permissions need to be set exactly as in the Book. Otherwise you will run into trouble sooner or later. And you certainly shouldn't need to change any of root's files.
Remember that the LFS user only gets used in chapters 5-6 to build the intermediate toolkit. After that, you work exclusively as root and you certainly don't need to change any of root's startup files in the old system because you chroot into the new one before running bash in login mode. There are no startup files for root in that system.
I suspect that your fiddling about with permissions got you past the original problem but has now caused a new one with glibc.
I think that was a very bad idea. Things like permissions need to be set exactly as in the Book. Otherwise you will run into trouble sooner or later. And you certainly shouldn't need to change any of root's files.
Remember that the LFS user only gets used in chapters 5-6 to build the intermediate toolkit. After that, you work exclusively as root and you certainly don't need to change any of root's startup files in the old system because you chroot into the new one before running bash in login mode. There are no startup files for root in that system.
I suspect that your fiddling about with permissions got you past the original problem but has now caused a new one with glibc.
hi hazel, thank you for the feedback. finally i started again from the beginning and without any deviation at all.
currently i just completed all the compiling (chapter 8). now into setting config and grub.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.