Date: Sun, 15 Jul 2001 20:13:35 +0200 From: Andrea Mazzoleni To: djgpp AT delorie DOT com Subject: Problem compiling a DJGPP gcc 3.0 cross compiler Message-ID: <20010715201335.A3166@mediacom.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Reply-To: djgpp AT delorie DOT com I was trying to compile a DJGPP gcc 3.0 cross compiler from linux to dos but I get this error: --------------------------------------------------------------------- /root/src/gccdos/i586-pc-msdosdjgpp-gcc/gcc/xgcc -B/root/src/gccdos/i586-pc-msdosdjgpp-gcc/gcc/ -B/usr/local/gcc-3.0-i586-pc-msdosdjgpp/i586-pc-msdosdjgpp/bin/ -B/usr/local/gcc-3.0-i586-pc-msdosdjgpp/i586-pc-msdosdjgpp/lib/ -isystem /usr/local/gcc-3.0-i586-pc-msdosdjgpp/i586-pc-msdosdjgpp/include -c -DHAVE_CONFIG_H -g -O2 -I. -I../../../gcc-3.0/libiberty/../include -W -Wall -Wtraditional -pedantic ../../../gcc-3.0/libiberty/getpwd.c ../../../gcc-3.0/libiberty/getpwd.c: In function getpwd': ../../../gcc-3.0/libiberty/getpwd.c:74: PATH_MAX' undeclared (first use in this function) ../../../gcc-3.0/libiberty/getpwd.c:74: (Each undeclared identifier is reported only once ../../../gcc-3.0/libiberty/getpwd.c:74: for each function it appears in.) ../../../gcc-3.0/libiberty/getpwd.c:61: warning: s' might be used uninitialized in this function make[1]: *** [getpwd.o] Error 1 make[1]: Leaving directory /root/src/gccdos/i586-pc-msdosdjgpp-gcc/i586-pc-msdosdjgpp/libiberty' make: *** [all-target-libiberty] Error 2 --------------------------------------------------------------------- Checking the preprocessor output I found that the problem is that the include /root/src/gccdos/i586-pc-msdosdjgpp-gcc/gcc/include/limits.h is used instead of the include (from djcrx203) /usr/local/gcc-3.0-i586-pc-msdosdjgpp/i586-pc-msdosdjgpp/include/limits.h My gcc-3.0 config.status is: --------------------------------------------------------------------- ../gcc-3.0/configure --with-gcc-version-trigger=/root/src/gccdos/gcc-3.0/gcc/version.c --host=i686-pc-linux-gnu --target=i586-pc-msdosdjgpp --prefix=/usr/local/gcc-3.0-i586-pc-msdosdjgpp -v --enable-languages=c,c++ --disable-nls --norecursion --------------------------------------------------------------------- The make command is : make -C gcc installdirs How can I solve this ? I already solved it manually for the libiberty library, but I'm unsure of the confidence of the resulting compiler. -- Andrea Mazzoleni 935A 2D3C 5C70 BCD6 CB0C ED89 7C19 4321 6340 3F6D