LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   5.5. GCC-4.4.0 - Pass 1 Make Problem (http://www.linuxquestions.org/questions/linux-from-scratch-13/5-5-gcc-4-4-0-pass-1-make-problem-745133/)

pcallahan80 08-04-2009 05:15 PM

5.5. GCC-4.4.0 - Pass 1 Make Problem
 
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.

-pc

weibullguy 08-04-2009 09:11 PM

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.

pcallahan80 08-04-2009 09:44 PM

Ok, missing something fundamental
 
Quote:

Originally Posted by weibullguy (Post 3631654)
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?

weibullguy 08-05-2009 12:44 AM

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 08-23-2009 07:28 PM

Hi to all, I have the same problem (I'm using LFS ver. 6.5), this is the error:

Code:

config.status: creating Makefile
config.status: executing default commands
make[2]: Entering directory `/media/lfs/sources/gcc-build/i686-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.
make[2]: Leaving directory `/media/lfs/sources/gcc-build/i686-lfs-linux-gnu/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/media/lfs/sources/gcc-build'
make: *** [all] Error 2
lfs@ndakota-desktop:/media/lfs/sources/gcc-build$

GCC is in /media/lfs/sources/gcc-build directory with gmp and mpfr dirs in it. Can someone help me, please? I can't find my mistake..

As I can see here's missing 'libgcc.mvars' file... Where can I find it?

(...And, eventually, sorry for my bad english :) )

fdt93 08-23-2009 08:45 PM

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.

centguy 01-24-2010 11:38 PM

IMO, LFS book should just tell people to prepare $LFS/build-dir or something for storing the packages to be installed, such as
gcc-4.4.1.tar.bz2. Tar these bz2 files under $LFS/build-dir, and the prepare
another $LFS/build-dir/gcc-build for actual configure+make+make install
step (now the LFS book makes much more sense).

I see too many unnecessary threads in the forum discussing about this.
I too made a blunder of building stuff in $LFS/tools which is /tools
since I confused with the statement

"All programs compiled in Chapter 5 will be installed under $LFS/tools"

Because of the arbitrariness of a dedicated directory, I don't even know to put mpfr and gmp under gcc source directory for the first pass of gcc build in chapter 5 ! This is all clear when you have gone through all the wrong paths !


Oh well, this is just a stupid comment may be!

druuna 01-25-2010 02:29 AM

Quote:

Originally Posted by centguy (Post 3839353)
IMO, LFS book should just tell people to prepare $LFS/build-dir or something for storing the packages to be installed, such as
gcc-4.4.1.tar.bz2. Tar these bz2 files under $LFS/build-dir, and the prepare
another $LFS/build-dir/gcc-build for actual configure+make+make install
step (now the LFS book makes much more sense).

The LFS book does tell you were to store your packages: 3.1. Introduction. It also mentions that this is a good place to work from.

The most common mistake for failing to build LFS is _not_ reading the LFS book from front to end, the second most common mistake is deviating from the instructions given in the book.

centguy 01-25-2010 10:07 AM

slightly disagree.

http://www.linuxquestions.org/questi...-error-784338/

post #9 just shows that my understanding is okay.

In my humble opinion,
$LFS/sources should just store the source code, nothing more than that.

I was brave enough to do rm -rf $LFS/build-dir/* since I am sure what I am
doing.

If fact this is probably the cleanest way of removing everything after
a successful build, since
the LFS book wants us to remove all previous builds to avoid confusions.

If a user cannot deviate from the book a little bit to suit their
habbit, then I don't see they have learned anything.

drunna: I noticed you have helped me quite a lot in other threads. I thank you!
Hopefully there is no hard feeling about what I said above. I enjoy
constructive discussions. I hope I have not upset you to a level that you don't want to
help me during my subsequent build! :)

druuna 01-25-2010 10:37 AM

@centguy: No hard feelings whatsoever....

My previous statement about _not_ deviating from the book is a bit black and white. If you know how both, linux in general and LFS, work and if you are aware of the consequences of your changes, there's nothing wrong with deviating from the book. I do it all the time :)

In the end it is up to the builder to decide how things are done on his/her machine.

For a first time LFS build I always suggest not to make any changes to the book. The book works the way it is, that's a given. First get familiar with the LFS concept before changing anything.

Quote:

I hope I have not upset you to a level that you don't want to help me during my subsequent build!
Like I said, no hard feelings whatsoever. If you post a question and I am able to help, I will!

joebebus 03-05-2010 06:07 PM

I found myself in a similar problem (got past it, using LFS 6.5 with GNOME-2.28 and Firefox at the moment ;) )... Try removing the build-dir and the source-dir, extract the tar ball again, and go over the instructions again. GCC is a large program, and something could have went wrong with the extracting process. Just my 2 cents though.


All times are GMT -5. The time now is 02:05 PM.