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.
I've been trying for a few days now to build LFS 7.8 with Slackware 14.1 as host system. Yesterday I reached chapter 6.11, even configured Glibc and installed Zlib, all working fine. However, today after restarting my system I'm getting the following error (below I was trying to make linux headers again, since yesterday i did it without errors) :
When I make the test suggested by the book (yesterday it was ok):
Code:
root:/sources/linux-4.2# echo 'int main(){}' > dummy.c
root:/sources/linux-4.2# cc dummy.c -v -Wl,--verbose &> dummy.log
root:/sources/linux-4.2# readelf -l a.out | grep ': /lib'
readelf: Error: 'a.out': No such file
The book says
Quote:
It is important that all the commands throughout the remainder of this chapter and the following chapters
are run from within the chroot environment. If you leave this environment for any reason (rebooting for
example), ensure that the virtual kernel filesystems are mounted as explained in
Section 6.2.2, “Mounting and Populating /dev” and Section 6.2.3, “Mounting Virtual Kernel File Systems” and enter chroot again before continuing with the installation.
My /etc/ld.so.conf is as described in the book.
Why I did not have this problem yesterday? Is there any further step i need to take to resume installation?
When I make the test suggested by the book (yesterday it was ok):
Code:
root:/sources/linux-4.2# echo 'int main(){}' > dummy.c
root:/sources/linux-4.2# cc dummy.c -v -Wl,--verbose &> dummy.log
root:/sources/linux-4.2# readelf -l a.out | grep ': /lib'
readelf: Error: 'a.out': No such file
My guess is that you did not enter the chroot environment correctly. This is only a guess.
Your error says there is no 'a.out' file. The cc command should have dumped its output into the file dummy.log. Inspect that file for clues of what went wrong.
Maybe exit from the chroot environment, ensure that all devices are mounted properly as per the book 6.2.2 and 6.2.3, then re-enter the chroot environment, being careful to type (or copy) the chroot command correctly.
I inspected dummy.log and the only error message was "collect2: fatal error: cannot find 'ld'". All my attempts to configure return the same message.
I left chroot and entered it again copying the commands in the book, so I think this is not the problem. I suspect the problem is something that has to do with links (since I have successfully installed the software, my system is just not finding it), but don't know what.
Supposing i would like to start again the build, do i need to recompile all the chapter 5 packages?
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,153
Rep:
What has links got to do with the kernel headers?
Basically once you have reached chap 6 after a successful build of the tool chain what you do in the mhost system is irelevent, once you are in the chroot environment your LFS build knows nothing about your host system, you HAVE made a mistake in chrooting or in the tool chain.
kcirick,
I wasn't. I followed strictly the book and the procedure didn't go well.
Keith Hedger,
I will try to build the packages again, because i really think the problem isn't "chrooting" (i've done it several times following the book).
Thank you for your help guys. As soon as I fix this problem I'll post here (I will try to build everything again ).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.