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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
07-30-2007, 02:36 PM
|
#1
|
Member
Registered: Jan 2007
Posts: 90
Rep:
|
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?
|
|
|
07-31-2007, 07:11 PM
|
#2
|
Member
Registered: Jan 2007
Posts: 90
Original Poster
Rep:
|
Should I get and install this flex package?
|
|
|
08-01-2007, 10:33 AM
|
#3
|
Member
Registered: Jan 2007
Posts: 90
Original Poster
Rep:
|
should I be installing gcc-4.3.0 in gcc-build in /?(of the chroot enviorment)
|
|
|
08-01-2007, 01:39 PM
|
#4
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
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.
|
|
|
08-06-2007, 05:00 PM
|
#5
|
Member
Registered: Jan 2007
Posts: 90
Original Poster
Rep:
|
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.
|
|
|
08-07-2007, 01:15 PM
|
#6
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
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.
|
|
|
All times are GMT -5. The time now is 09:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|