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.
Hello! I'm an old computer programmer, but new linux noob (see my intro page).
My problem: I am attempting to run LFS 7.10. I have installed through the glibc-2.24. I got the expected compile error. When I to the next package (libstdc++-v3), I was unable to execute the ../libstdc__v3/configure command(why?). I was able to get around it with replacing it with /mnt/lfs/sources/gcc-6.2.0/libstdc++-v3/configure. It ran, but not without a few compile errors (as I found out later). binnutils-2.27 seemed to work. Then gcc-6.2.0(Pass 2) failed. I have tried to rerun libstdc++-v3 without errors, but without success.
The first error that I could see while compiling the libstdc++-v3 was:
Code:
/mnt/lfs/sources/gcc-6.2.0/libstdc++-v3/src/c++98/strstream.cc: In member function 'void std::strstreambuf::_M_setup(char*, char*, std::streamsize)':
/mnt/lfs/sources/gcc-6.2.0/libstdc++-v3/src/c++98/strstream.cc:324:63: error: 'INT_MAX' was not declared in this scope
size_t N = n > 0 ? size_t(n) : n == 0 ? strlen(get) : size_t(INT_MAX);
^~~~~~~
Makefile:813: recipe for target 'strstream.lo' failed
make[3]: *** [strstream.lo] Error 1
make[3]: Leaving directory '/mnt/lfs/sources/gcc-6.2.0/libstdc++-v3/build/src/c++98'
Making all in c++11
My configuration: I loaded a debian jesse (7.8, not updated) onto my laptop. I have the following packages installed:
Recommended Package Installed Package
Bash-3.2 bash-3.2
Binutils-2.17 (Versions greater than 2.27 are not recommended as they have not been tested) binutils-2.25
Bison-2.3 bison-2.3
Bzip2-1.0.4 bzip2-1.0.6
Coreutils-6.9 coreutils-8.23
Diffutils-2.8.1 fiffutils-3.3
Findutils-4.2.31 findutils-4.4.2
Gawk-4.0.1 (/usr/bin/awk should be a link to gawk) (/usr/bin/awk points to /usr/bin/gawk)
GCC-4.7 GCC-4.9.2
Glibc-2.11 (Versions greater than 2.24 are not recommended as they have not been tested) glibc-2.19
Grep-2.5.1a grep-2.20
Gzip-1.3.12 gzip-1.6
Linux Kernel-2.6.32 linux kernel-3.16.0-4
M4-1.4.10 m4-1.4.17
Make-3.81 make-4.0
Patch-2.5.4 patch-2.7.5
Perl-5.8.8 perl-5.20.2
Sed-4.1.5 sed-4.2.2
Tar-1.22 tar-1.27.1
Texinfo-4.7 makeinfo-5.2
Question: What do I do now? Since it was a gcc error, do I need to revert back from gcc-4.9 back to gcc-4.7? I tried to do this, but was unable to figure out how.
I realize that I gave you an incomplete version for my g++ (4.9). The exact version is:
g++ (Debian 4.9.2-10) 4.9.2
If I need to go back to a 4.7 version, I need help. I looked, and was unable to find a tarball to compile from that was older than the 4.9.2 version that I had. I suppose that I could build my own dependency tree and install .deb files. But that would take a lot of time. There must be a better way and/or a location for a 4.7 g++ tarball that I was unable to locate.
As an alternative, I could install Slackware. I understand that the implementation of LFS is easier from this linux distro (though I have never tried it).
Be aware also that I have never run the apt-get update for Debian 7.8. I usually use Ubuntu, and never got around setting up the sources.list file (not required in Ubuntu).
Make sure /bin/sh points to bash when using debian.
A safe bet would be to use a livecd of calculate linus for example.
I prefer this one, never failed me. http://miroir.linuxtricks.fr/calculate/release/15.17/
CLDX is the XFCE desktop live cd.
I've learned a bit since I started attempting to install Linux From Scratch. The following are 2 terminal commands that will print out the link used by a command (assuming that you know that the system looks at "/bin/sh" for bash)
However, I like to know:
1. What .iso do I need to download to get the software you described?
2. What is the purpose of this software (besides showing what is actually being executed when one enters a command)?
It was under "LinuxTricks", so that appears to be something that I could use!
However, I like to know:
1. What .iso do I need to download to get the software you described?
2. What is the purpose of this software (besides showing what is actually being executed when one enters a command)?
It was under "LinuxTricks", so that appears to be something that I could use!
Merci and bonjour
Best regards,
Bill
Well, if you fixed /bin/sh to link to /bin/bash I don't see why you could not use your debian host.
The iso you need, if any, depends on your architecture. If you have a 64-bit capable system, you can use both 64bit or i686. I myself, prefer to use i686, even on 64-bit machines.
CLDX is the XFCE version, CLD is KDE and CLDM is Mate.
I prefer XFCE or Mate, but you can pick any.
The iso needs to be written to a dvd and booted. After you boot the livedvd, you will be able to run all commands to build LFS inside on a live host.
Open a terminal and run
Code:
sudo su
to run all following commands as root in that terminal.
Thanks to all the responses. But the problem still remains: I can use the system. I just can't get libstdc_v3 to compile.
I have been thinking about the problem. I have found another HD to reinstall Debian 7.8, and restart my build. However, I will not downgrade all the utilities that LFS recommends (I don't know why they recommend binutils-2.17 - it has known issues)- except that I downgraded the bash to 3.2. The problem may to incompatibility between some of the older utility versions (such as bison-2.3) and the current stable version of gcc at Debian 7.8 release time (4.9.2). Hopefully, they can get along with each other, and bash-3.2.
Well Bill, the versions on Calculate are newer than the minimun required for LFS-7.10.
Debian has more up to date versions than the minimum required too.
When are you starting to get errors? The monent an error occurs early in the build, continuing has no use.
The first time that I "noticed" a problem was with the 2nd pass of gcc-6.2.0 - it failed. So I went back to libstdc++v3. It did not compile as per the original post.
I thought that since the my build had "passed" the glibc-2.24 compile failure test. Therefore the problem must be after that (or the libstdc++v3). It compiles, but not without errors. Which is where I am stuck.
Since then, I thought that since it was a compiler install related issue, maybe I should restart the build at the gcc-6.2.0 first pass. I have not pursued that option as yet.
However, I have started the LFS build from a different computer. I have done only the minimum amount of updates (ie. downgrade the bash to 3.2, install bison, and install build-essentials). Since I have already gotten this far, I will continue under the assumption that I installed some older linux libs that are incompatible with the newer ones included in the Debian 7.8 DVD.
I will keep you posted as I make progress (which needs to contend with other priorities in my life)(that is the LFS project, not "progress"!).
I believe that I have resolved my issue with LFS. In the process of redoing all my step on a different HD, I discovered that I excluded the following during the GCC-6.2.0 first pass:
Code:
tar -xf ../mpfr-3.1.4.tar.xz
mv -v mpfr-3.1.4 mpfr
tar -xf ../gmp-6.1.1.tar.xz
mv -v gmp-6.1.1 gmp
tar -xf ../mpc-1.0.3.tar.gz
mv -v mpc-1.0.3 mpc
When I did the Host System Requirements Library-ck.sh, I found that I had none of these libraries (which was OK). I found that they were part of the Debian 7.8 that I was using to build LFS. Somehow my mind thought that it was OK to not include the above libraries in my build. Maybe. in part, due to fact that these had to be downloaded separately.
This is humbling to admit. But I have posted this in the hope that someone else (another "old dog" as myself) could benefit.
Thanks to all who looked at the problem and offered solutions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.