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.
Using Linux From Scratch - Version 6.5-rc1
Chapter 5.5. GCC-4.4.0 - Pass 1
Ran Make and received the following error
Code:
make[2]: Entering directory `/mnt/lfs/gcc-build/gcc-4.4.1/x86_64-lfs-linux-gnu/libgcc'
Makefile:143: ../.././gcc/libgcc.mvars: No such file or directory
make[2]: *** No rule to make target `../.././gcc/libgcc.mvars'. Stop.
Working directory is /mnt/lfs/gcc-build/gcc-4.4.1 with directories for both mpfr and gmp contained therein.
For starters you're not following the instructions in the book. The biggest mistake you've made is to build gcc in the source directory. You're not supposed to do that which is the reason the book tells you to create a dedicated build directory. Try starting over with section 5.5, but follow the instructions, and see if that helps.
You might want to follow the instructions in section 3.1 as well. The way you are doing things, you're going to end up with a lot of source directories under / in your final system.
For starters you're not following the instructions in the book. The biggest mistake you've made is to build gcc in the source directory. You're not supposed to do that which is the reason the book tells you to create a dedicated build directory. Try starting over with section 5.5, but follow the instructions, and see if that helps.
You might want to follow the instructions in section 3.1 as well. The way you are doing things, you're going to end up with a lot of source directories under / in your final system.
Ok, now I'm scratching my head. I thought the source directory was $LFS/sources or mnt/lfs/sources. That's why I created the following separate directories outside of mnt/lfs/sources.
mnt/lfs/binutils-build and mnt/lfs/gcc-build
...then moved the appriate .bz2 files into them, unpacked, etc.
Was that not correct?
EDIT: Going back and looking at Ch 4, was I supposed to do all these Pass 1 compiles in the $LFS/tools directory?...creating binutils-build, moving the .tar.bz2 files there, unpacking, config, compiling? Is that what I missed?
Last edited by pcallahan80; 08-04-2009 at 10:55 PM..
Read the third paragraph in section 3.1. It's pretty clear what the $LFS/sources directory is for. All of the build instructions in the book comply with the second note marked "Important" in section 5.3. You're actually supposed to read everything, not just jump in somewhere in the middle of the book.
NorthDakota91, you're close, but I think you may have done a couple things out of order. The GMP and MPFR tarballs should not be extracted in the gcc-build directory.
The correct order of events should be:
1. extract the gcc tarball into your $LFS/sources directory
2. cd into the resulting $LFS/sources/gcc-4.4.1 directory
3. extract the gmp and mpfr tarballs into the gcc-4.4.1 directory
4. create the $LFS/sources/gcc-build (../gcc-build) directory
5. cd into the gcc-build directory
6. follow the configure and make directions
Remember that the build instructions for each package assume that you have already extracted the package, and changed into the packages' source directory. Once you are there, you should enter the commands for that package in the exact order as written in the book.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.