LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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

Reply
 
Search this Thread
Old 08-04-2009, 05:15 PM   #1
pcallahan80
LQ Newbie
 
Registered: Aug 2009
Posts: 2

Rep: Reputation: 0
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
 
Old 08-04-2009, 09:11 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,745
Blog Entries: 1

Rep: Reputation: 224Reputation: 224Reputation: 224
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.
 
Old 08-04-2009, 09:44 PM   #3
pcallahan80
LQ Newbie
 
Registered: Aug 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Ok, missing something fundamental

Quote:
Originally Posted by weibullguy View Post
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 09:55 PM.
 
Old 08-05-2009, 12:44 AM   #4
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,745
Blog Entries: 1

Rep: Reputation: 224Reputation: 224Reputation: 224
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.
 
Old 08-23-2009, 07:28 PM   #5
Northdakota91
LQ Newbie
 
Registered: Aug 2009
Location: World
Posts: 1

Rep: Reputation: Disabled
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 )

Last edited by Northdakota91; 08-23-2009 at 07:42 PM.
 
Old 08-23-2009, 08:45 PM   #6
fdt93
LQ Newbie
 
Registered: Apr 2005
Distribution: CLFS 6 / CBLFS 6
Posts: 14

Rep: Reputation: 1
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.
 
Old 01-24-2010, 11:38 PM   #7
centguy
Member
 
Registered: Feb 2008
Posts: 394
Blog Entries: 1

Rep: Reputation: 35
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!
 
Old 01-25-2010, 02:29 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Quote:
Originally Posted by centguy View Post
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.
 
Old 01-25-2010, 10:07 AM   #9
centguy
Member
 
Registered: Feb 2008
Posts: 394
Blog Entries: 1

Rep: Reputation: 35
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!
 
Old 01-25-2010, 10:37 AM   #10
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
@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!
 
Old 03-05-2010, 06:07 PM   #11
joebebus
LQ Newbie
 
Registered: Mar 2010
Distribution: LFS
Posts: 7

Rep: Reputation: 0
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.
 
  


Reply

Tags
gcc, make


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GCC 2nd pass make error - xgcc cannot find -lc cogitocumimpune Linux From Scratch 1 01-11-2009 07:13 AM
Problem at 5.12. GCC-4.3.2 - Pass 2 la1nla1n Linux From Scratch 2 01-09-2009 12:40 PM
Problem on pass 2 build of GCC (V6.2) Paulsuk Linux From Scratch 1 11-15-2007 11:15 PM
gcc 4.0.3 first pass - 'make bootstrap' radiodee1 Linux From Scratch 6 10-10-2006 03:20 PM
odd problem with GCC pass 1... :scratch: ParticleHunter Linux From Scratch 15 12-05-2004 10:21 PM


All times are GMT -5. The time now is 12:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration