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.
I have finished the initial temporary system.
All the packages are installed .
I ran the "chroot" command,mounted the virtual file system,created the directories etc,all went fine.
When I start installing the packages,I get a error saying gcc not found.
But on checking in /tool/bin , gcc is found there and the permissions are all correct.
when I tried executing gcc from /tool/bin ,it says file not found,however other files present in the directory are executed.
I had similar issues with other programs after entering chroot. This usually happens when programs are linked against the wrong libraries. Be sure that your initial toolchain got linked against libraries in /tools.
Check using readelf -l /tools/bin/gcc which program interpreter is requested by your preliminary gcc. Make sure it is /tools/lib/ld-linux.so.2 and not /lib/ld-linux.so.2 as this will not exist anymore after entering chroot!
You can also find out about the libraries your dynamic loader finds using ldd -v /tools/bin/gcc, all paths should be prefixed with /tools at this point.
Be cautious about the toolchain adjustments (copying ld-new to ld) and make sure to follow the instructions from the book exactly and in the exact order. I would also suggest re-reading "Toolchain Technical Notes" in chapter 5...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.