LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-30-2007, 02:36 PM   #1
LinuxNoob75
Member
 
Registered: Jan 2007
Posts: 90

Rep: Reputation: 15
GCC Final Pass Error...


Hello.
-I'm now using the LFS LiveCD from about a month ago, along with the book and sources that came with it.
-I haven't received any other error messages to boot, and have followed the LFS book closely.
-I'm installing LFS 6.2 on a x86 Dell XPS. I have to configure X when I run it on the Live CD using the method on the CD's documentation.
-When I've installed all packages up to GCC- final pass(6.12.1), I've copied the package's source directory in $LFS/sources(where I originally had extracted all the sources files), and pasted the directory into $LFS.(or in to $LFS/package-build when necessary). I've then cd'ed into the copied directory, followed the instructions for the package, completed it successfully, and then gone to $LFS and deleted the copied directory. When installing the package for the second time, I'd copy the directory from sources and do it all over again. I executed every command, without any errors at all.
Until I got to GCC- 6.12.1 I copy the GCC-4.0.3 directory from sources into $LFS/gcc-build, run the sed commands successfully, prepare GCC for compilation, and then the make gives me this error:
Note: I only copied the important sections.
Code:
Warning: "Flex" is missing on your system. You should only need it if you modified a '.l' file. You may need the 'Flex' package in order for these modifications to take effect.........
Later:
Code:
gcc:gengtype-lex.l:No such file or directory
gcc: no input files
make[1] ***[build/gengtype-lex.o] Error 1
make[1] Leaving Directory '/gcc-build/gcc-4.0.3'
make ***[all-gcc] Error 2
What could be wrong?
 
Old 07-31-2007, 07:11 PM   #2
LinuxNoob75
Member
 
Registered: Jan 2007
Posts: 90

Original Poster
Rep: Reputation: 15
Should I get and install this flex package?
 
Old 08-01-2007, 10:33 AM   #3
LinuxNoob75
Member
 
Registered: Jan 2007
Posts: 90

Original Poster
Rep: Reputation: 15
should I be installing gcc-4.3.0 in gcc-build in /?(of the chroot enviorment)
 
Old 08-01-2007, 01:39 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I personally think that you are doing it (copy/paste directories) the hard way.

Put all packages into $LFS/sources

Unpack/untar the package you need:

tar jxf package-1.1.2.tar.bz2 (or tar zxf package-4.3.2.tar.gz or ..... )
cd package-1.2.3

The above 2 steps are assumed by LFS.
Most of the time the commands given in the book are based on where you are standing now, in this case that would be: $LFS/sources/package-1.2.3

For most of the chapters all is done from here, but for some (gcc being one of those) it is needed to create a building dir (the source directory they talk about is the directory you are in at the moment). You do that as follows:

mkdir -v ../package-1.2.3-build
cd ../package-1.2.3-build


Now you are in the freshly created, empty directory ($LFS/sources/package-1.2.3-build), the actual files should still be in $LFS/sources/package-1.2.3 (!)

If you copied all the files into the build directory you are probably in trouble. The first time you had to use a build directory was in chapter 5 (5.3. Binutils)........ This is one of those moments I'm hoping I misunderstood you

Anyway, hope this helps.
 
Old 08-06-2007, 05:00 PM   #5
LinuxNoob75
Member
 
Registered: Jan 2007
Posts: 90

Original Poster
Rep: Reputation: 15
OK. I re did my LFS as you said, and no errors. HOWEVER I DIDN'T run any un-mandatory test suites.
Now, at the same make command of gcc's final pass, I get:
Code:
In file included from /sources/gcc-build/gcc/include/syslimits.h:7,
                 from /sources/gcc-build/gcc/include/limits.h:11,
                 from ../../gcc-4.0.3/gcc/tsystem.h:108,
                 from ../../gcc-4.0.3/gcc/crtstuff.c:64:
/sources/gcc-build/gcc/include/limits.h:122:61: error: limits.h: No such file or directory
In file included from ../../gcc-4.0.3/gcc/crtstuff.c:64:
../../gcc-4.0.3/gcc/tsystem.h:111:18: error: time.h: No such file or directory
make[1]: *** [crtbegin.o] Error 1
make[1]: Leaving directory `/sources/gcc-build/gcc'
make: *** [all-gcc] Error 2
And my testsuite summaries are:
Code:
 === gcc Summary ===

# of expected passes            21685
# of unexpected failures        6943
# of unexpected successes       2
# of expected failures          67
# of unresolved testcases       6349
# of untested testcases         42
# of unsupported tests          339
/sources/gcc-build/gcc/xgcc  version 4.0.3
Finally, I would like to add that after every successful package that needs a build directory I delete the build directory. However, I don't delete the un-zipped source directory, and use that same one for the next installation of that package.(Hence I only un-zip each package once, which was before I started building my LFS, as a different user)
What could be wrong?

Last edited by LinuxNoob75; 08-06-2007 at 05:03 PM.
 
Old 08-07-2007, 01:15 PM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Quote:
However, I don't delete the un-zipped source directory, and use that same one for the next installation of that package.(Hence I only un-zip each package once, which was before I started building my LFS, as a different user)
What could be wrong?
And the answer is in the LFS book:

Quote:
Important

After installing each package, delete its source and build directories, unless specifically instructed otherwise. Deleting the sources prevents mis-configuration when the same package is reinstalled later.
Here's the link to that quote.

The problem you describe (error: time.h: No such file or directory) could be related to not removing the directories. It could also point to other problems, although I doubt it.

But that is water under the bridge, if you did not remove the directories after build/install, you do need to start over again. If you are lucky you probably need to redo from the beginning of chapter 6, but I really don't know if removing the build dirs in chapter 5 was enough (and the warning in the LFS book is there for a reason.....).

Hope this helps.
 
  


Reply


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
LFS GCC - first pass install error arnuld Linux From Scratch 2 12-20-2006 07:59 AM
Error Compiling GCC (1st Pass) in LFS 6.0 TGWDNGHN Linux From Scratch 1 06-30-2005 08:57 PM
GCC pass 1 error mugwump84 Linux From Scratch 2 05-10-2005 05:21 PM
Error configuring GCC, First Pass lloyd_smart Linux From Scratch 8 10-29-2004 11:45 AM
binutils-2.14 first pass, gcc error Add1Sun Linux From Scratch 3 04-29-2004 04:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:40 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration