LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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-12-2008, 12:23 AM   #1
rcg1984
LQ Newbie
 
Registered: Oct 2007
Posts: 10

Rep: Reputation: 0
6.12. GCC-4.1.2 make error.


Hello all, I'm currently stuck on: Linux From Scratch - Version 6.3,
Chapter 6. Installing Basic System Software, 6.12. GCC-4.1.2


I received the following make error while executing the make command. Also, I'm using Ubuntu as my host.

NOTE:I deleted both the gcc-4.1.2 and gcc-build folders. Then extracted and created the gcc-build folder again.

In file included from ../../gcc-4.1.2/gcc/crtstuff.c:68:
../../gcc-4.1.2/gcc/tsystem.h:90:19: error: stdio.h: No such file or directory
../../gcc-4.1.2/gcc/tsystem.h:93:23: error: sys/types.h: No such file or directory
../../gcc-4.1.2/gcc/tsystem.h:96:19: error: errno.h: No such file or directory
../../gcc-4.1.2/gcc/tsystem.h:103:20: error: string.h: No such file or directory
../../gcc-4.1.2/gcc/tsystem.h:104:20: error: stdlib.h: No such file or directory
../../gcc-4.1.2/gcc/tsystem.h:105:20: error: unistd.h: No such file or directory
In file included from /usr/local/include/limits.h:27,
from /sources/gcc-build/./gcc/include/limits.h:122,
from /sources/gcc-build/./gcc/include/syslimits.h:7,
from /sources/gcc-build/./gcc/include/limits.h:11,
from ../../gcc-4.1.2/gcc/tsystem.h:108,
from ../../gcc-4.1.2/gcc/crtstuff.c:68:
/usr/local/include/features.h:323:25: error: sys/cdefs.h: No such file or directory
In file included from /usr/local/include/features.h:346,
from /usr/local/include/limits.h:27,
from /sources/gcc-build/./gcc/include/limits.h:122,
from /sources/gcc-build/./gcc/include/syslimits.h:7,
from /sources/gcc-build/./gcc/include/limits.h:11,
from ../../gcc-4.1.2/gcc/tsystem.h:108,
from ../../gcc-4.1.2/gcc/crtstuff.c:68:
/usr/local/include/gnu/stubs.h:4:27: error: bits/wordsize.h: No such file or directory
/usr/local/include/gnu/stubs.h:11:3: error: #error "unexpected value for __WORDSIZE macro"
In file included from /sources/gcc-build/./gcc/include/limits.h:122,
from /sources/gcc-build/./gcc/include/syslimits.h:7,
from /sources/gcc-build/./gcc/include/limits.h:11,
from ../../gcc-4.1.2/gcc/tsystem.h:108,
from ../../gcc-4.1.2/gcc/crtstuff.c:68:
/usr/local/include/limits.h:145:30: error: bits/posix1_lim.h: No such file or directory
/usr/local/include/limits.h:149:30: error: bits/posix2_lim.h: No such file or directory
In file included from /usr/local/include/limits.h:153,
from /sources/gcc-build/./gcc/include/limits.h:122,
from /sources/gcc-build/./gcc/include/syslimits.h:7,
from /sources/gcc-build/./gcc/include/limits.h:11,
from ../../gcc-4.1.2/gcc/tsystem.h:108,
from ../../gcc-4.1.2/gcc/crtstuff.c:68:
/usr/local/include/bits/xopen_lim.h:34:28: error: bits/stdio_lim.h: No such file or directory
In file included from ../../gcc-4.1.2/gcc/crtstuff.c:68:
../../gcc-4.1.2/gcc/tsystem.h:111:18: error: time.h: No such file or directory
../../gcc-4.1.2/gcc/crtstuff.c:92:18: error: link.h: No such file or directory
make[2]: *** [crtbegin.o] Error 1
make[2]: Leaving directory `/sources/gcc-build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/sources/gcc-build'
make: *** [all] Error 2

Last edited by rcg1984; 08-12-2008 at 12:30 AM.
 
Old 08-12-2008, 01:11 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
You are missing the basic libc header files. They are pretty important!
 
Old 08-12-2008, 01:12 AM   #3
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
duplicate post -- sorry.

Last edited by Mr. C.; 08-12-2008 at 01:27 AM.
 
Old 08-12-2008, 01:31 AM   #4
rcg1984
LQ Newbie
 
Registered: Oct 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Mr. C. View Post
You are missing the basic libc header files. They are pretty important!
Well, before configuring gcc I ran the following commands:

sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in

sed -i 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in

sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in

sed -i 's/@have_mktemp_command@/yes/' gcc/gccbug.in

mkdir -v ../gcc-build
cd ../gcc-build

Finally within the gcc-build directory I ran:
../gcc-4.1.2/configure --prefix=/usr \
--libexecdir=/usr/lib --enable-shared \
--enable-threads=posix --enable-__cxa_atexit \
--enable-clocale=gnu --enable-languages=c,c++

Am I still missing the libc header files? If so, how do I get them(what chapter do I need to reread)?

Last edited by rcg1984; 08-12-2008 at 01:32 AM.
 
Old 08-12-2008, 01:46 AM   #5
rcg1984
LQ Newbie
 
Registered: Oct 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Mr. C. View Post
You are missing the basic libc header files. They are pretty important!
Sweet! I just found out my mistake. I kept reinstating the specs patch to gcc and tried to make.. I left out the patch and it worked. On to make -k check :-)

-Thanks,
Rich
 
Old 08-12-2008, 01:59 AM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
I don't know the procedure you are following, sorry. I can only tell you what the errors mean.

The system includes are normally found in /usr/include, and are pulled in from source code as :

#include <errno.h>
#include <sys/types.h>
...

But when you are bootstrap building a system, the base directory can be changed, such as /usr/local/include so that you don't destroy your current system's build environment.

I see references to /usr/local/include/limits.h, etc. so there is something incorrect about how either include fixups were done or with specifying the base include directory. Try to backtrack the procedure to see where include files are generated, installed, or the build environment modified to use non-default includes ( I see one reference to removing fixinc.sh from Makefile.in, but again, I don't know the procedure you are working from ).
 
  


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
gcc 4.0.3 make error RiSK Linux From Scratch 3 07-30-2007 10:15 PM
gcc 4.0.2 make error on SuSE 10.0 tiddy Linux - Software 5 07-02-2006 11:27 AM
gcc make error laasunde Linux - Software 6 02-04-2006 11:34 AM
gcc error (can't make exexutables) TheDude05 Linux - Software 6 09-06-2005 03:51 PM
Error in gcc while trying to run make TheBelush Linux - Newbie 3 01-23-2005 12:34 AM


All times are GMT -5. The time now is 06:28 PM.

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