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.
|
 |
12-28-2005, 05:35 PM
|
#1
|
Member
Registered: Dec 2004
Distribution: Mandrake 10.1; Fedora Core 3; FreeBSD 5.3; Slackware 10.1 (2.6.10);
Posts: 234
Rep:
|
GCC 4.0.2 Chroot Build Unable to Find Headers
When building GCC 4.0.2, make fails with this error:
Code:
/sources/gcc-build/gcc/xgcc -B/sources/gcc-build/gcc/ -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../gcc-4.0.2/gcc -I../../gcc-4.0.2/gcc/. -I../../gcc-4.0.2/gcc/../include -I../../gcc-4.0.2/gcc/../libcpp/include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer \
-c ../../gcc-4.0.2/gcc/crtstuff.c -DCRT_BEGIN \
-o crtbegin.o
In file included from ../../gcc-4.0.2/gcc/crtstuff.c:64:
../../gcc-4.0.2/gcc/tsystem.h:90:19: error: stdio.h: No such file or directory
../../gcc-4.0.2/gcc/tsystem.h:93:23: error: sys/types.h: No such file or directory
../../gcc-4.0.2/gcc/tsystem.h:96:19: error: errno.h: No such file or directory
../../gcc-4.0.2/gcc/tsystem.h:103:20: error: string.h: No such file or directory
../../gcc-4.0.2/gcc/tsystem.h:104:20: error: stdlib.h: No such file or directory
../../gcc-4.0.2/gcc/tsystem.h:105:20: error: unistd.h: No such file or directory
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.2/gcc/tsystem.h:108,
from ../../gcc-4.0.2/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.2/gcc/crtstuff.c:64:
../../gcc-4.0.2/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
Why does this happen when I am able to build programs with the same includes?
|
|
|
01-12-2006, 03:17 AM
|
#2
|
Member
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204
Rep:
|
"Some locales installed by the make localedata/install-locales command above are not properly
supported by some applications that are in the LFS and BLFS books. Because of the various
problems that arise due to application programmers making assumptions that break in such
locales, LFS should not be used in locales that utilize multibyte character sets (including
UTF-8) or right-to-left writing order." - LFS-BOOK 6.11. Glibc-2.3.4
I suppose that can be applicable to includes as well.
Last edited by shotokan; 01-12-2006 at 03:23 AM.
|
|
|
01-28-2006, 01:24 AM
|
#3
|
LQ Newbie
Registered: Jan 2006
Posts: 21
Rep:
|
I am also having same problem.plz help me
|
|
|
02-16-2006, 05:28 AM
|
#4
|
Member
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204
Rep:
|
Wait a minute I just noticed your useing a GCC 4.0 instead of 3.4. The book dosent cover that.
But if your going to try this you might have to ask the GCC developers some questions to get it working.
|
|
|
03-14-2006, 12:51 PM
|
#5
|
LQ Newbie
Registered: Mar 2006
Posts: 1
Rep:
|
also having this problem
hi... here is my program "teste.c"
#include <iostream>
#include <string>
using namespace std;
int main(int argc, char** argv) {
string name;
if (argc > 1) name = argv[1];
else cin >> name;
cout << "Hello, " + name +"\n";
return 0;
}
here is the results
:~$ gcc teste.c -o teste
teste.c:1:20: error: iostream: Arquivo ou diretório não encontrado
teste.c:2:18: error: string: Arquivo ou diretório não encontrado
teste.c:3: error: syntax error before 'namespace'
teste.c:3: warning: data definition has no type or storage class
teste.c: In function 'main':
teste.c:6: error: 'string' undeclared (first use in this function)
teste.c:6: error: (Each undeclared identifier is reported only once
teste.c:6: error: for each function it appears in.)
teste.c:6: error: syntax error before 'name'
teste.c:7: error: 'name' undeclared (first use in this function)
teste.c:8: error: 'cin' undeclared (first use in this function)
teste.c:9: error: 'cout' undeclared (first use in this function)
("Arquivo ou diretório não encontrado" means " No such file or directory" in portuguese)
if it helps..
~$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --with-tune=i686 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 20060212 (prerelease) (Debian 4.0.2-9)
help me!!!!
|
|
|
06-29-2006, 03:34 AM
|
#6
|
LQ Newbie
Registered: Jun 2006
Location: orbiting around Saturn
Distribution: LFS, knoppix
Posts: 16
Rep:
|
Quote:
:~$ gcc teste.c -o teste
teste.c:1:20: error: iostream: Arquivo ou diretório não encontrado
|
use g++ not gcc
with that change, your test program compiles fine on my machine.
using gcc, i got the same errors you did.
|
|
|
All times are GMT -5. The time now is 12:53 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
|
|