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.
Hi! I started with Debian 9 to workaround with LFS v10 for first time few days ago. I had stucked in (5.3) the first pass of GCC with the subject error [1] and decided to read ALL (without exceptions) the relevant literature, whether in the form of forums' messages, emails, bug's forms, manuals... because asking for help is for cowards.
So I read that a big difference between the host's GCC version and the target one could cause problems and I uninstalled gcc-6 and compiled gcc-11. Also is more common than it should be written to read that use -j1 would avoid some issues. Is true that provide another message error[1] but in a rational way. To see the behavior I try to make the gcc disabling also zlib and/or libiberty and/or other flags combinations using host provided libs without success, don't know why, maybe actually matter. I also tried other flags combinations, being unable to pass beyond the point when using --with-sysroot=$LFS
Well, my problem is the same as the described in [2] and other threads solved with the same logic. At the end of writing this message I'm working with last Debian testing and GCC-10
Please, ask me for more information about host or whatever. [3] Here is the last version check output. TIA
The gcc (compiler) on the host should not be newer than the one you will compile in LFS. There are host requirements specified in the LFS book, if you meet those, you should be safe.
I compiled a custom LFS-10 (with gcc-9.3.0) on a host with gcc-6.4.0, it was a custom LFS-8.0 I used in a chroot.
I always recommend using either a live distro, something like calculate linux works perfect, or a chroot. One easy way to set up a chroot is using a stage3 gentoo tarball.
The first link points to a compiler not working, the last to another issue.
Most likely you made an error in copy/pasting the commands in earlier chapters.
Last edited by hendrickxm; 11-29-2020 at 04:24 AM.
You will need to make some adjustments to your host system. Debian by default uses dash as its system shell and mawk as its awk. LFS requires bash and gawk. Did you fix that?
The general rules for host software versions are:
1) Never use an earlier version than the minimum given in the Book.
2) For gcc and binutils, don't use a later version either. They are untested.
First of all thank you for your answer and tips, is a good one.
Second is not a typing issue because I've typed different times with the same error.
Is true that I changed some values like PS1. Things I changed shouldn't affect the result and specially I also tried with the original book's values/scripts. The truth is that I don't like to copy scripts with out understanding (it's not like running them)
I understand the live-gentoo tip (and may be the one that let me go on) but i think LFS should be build in any system with the precise adaptations, so it will be my last choice. I'm thinking in focus this as a gcc problem instead of a LFS issue.
I've ran some commands [1] exploring the host for anyone with privileged eyes. It shows the configuration flags.
Answering to hendrickxm the error with gcc-6, gcc-10 and gcc-11 have been the same.
Quote:
Originally Posted by hendrickxm
The first link points to a compiler not working, the last to another issue.
I've found more threads with exactly the same error with no solution and post an example.
You will need to make some adjustments to your host system. Debian by default uses dash as its system shell and mawk as its awk. LFS requires bash and gawk. Did you fix that?
The general rules for host software versions are:
1) Never use an earlier version than the minimum given in the Book.
2) For gcc and binutils, don't use a later version either. They are untested.
You can find the installation manual and links to all files in the official manual: https://wiki.gentoo.org/wiki/Handboo...allation/Stage
When you build in a chroot, you can't blindly follow the LFS-book. One advantage is that if you are inside the stage3 or any other chroot, you cannot screw up your host installation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.