autoconf wrong + ICE during bootstrap for 000430 on i386-linux

Andi Kleen ak@suse.de
Mon May 1 09:31:00 GMT 2000


On Mon, May 01, 2000 at 10:51:21AM -0400, Kaveh R. Ghazi wrote:
> be defined in confdefs.h (if your system has it) and autoconf prepends
> confdefs.h to the source code above.  (Take a look at the resulting C
> code in the generated configure file.)  All of my platforms correctly
> pass this test.  E.g. on redhat-linux:
> 
>  > checking whether getrlimit must be declared... no
>  > checking whether setrlimit must be declared... no
>  > checking whether getrusage must be declared... no
> 
> 
> Would you please look in config.log and show me exactly what is going
> wrong on your system?  This test shouldn't be failing, but if it is
> I'd like to see the error message, etc.



configure:2264: checking for getrlimit
configure:2292: gcc -o conftest -g -O2   conftest.c  1>&5
configure:2264: checking for setrlimit
configure:2292: gcc -o conftest -g -O2   conftest.c  1>&5

...

iconfigure:3128: checking whether getrlimit must be declared
configure:3146: gcc -c -g -O2 -I../../egcs/gcc -I../../egcs/gcc/../include  conftest.c 1>&5
In file included from /usr/include/sys/resource.h:25,
                 from configure:3137:
/usr/include/bits/resource.h:109: warning: `RLIM_INFINITY' redefined
/usr/include/asm/resource.h:25: warning: this is the location of the previous definition
configure:3128: checking whether setrlimit must be declared
configure:3146: gcc -c -g -O2 -I../../egcs/gcc -I../../egcs/gcc/../include  conftest.c 1>&5
In file included from /usr/include/sys/resource.h:25,
                 from configure:3137:
/usr/include/bits/resource.h:109: warning: `RLIM_INFINITY' redefined
/usr/include/asm/resource.h:25: warning: this is the location of the previous definition
configure:3128: checking whether getrusage must be declared
configure:3146: gcc -c -g -O2 -I../../egcs/gcc -I../../egcs/gcc/../include  conftest.c 1>&5
In file included from /usr/include/sys/resource.h:25,
                 from configure:3137:
/usr/include/bits/resource.h:109: warning: `RLIM_INFINITY' redefined ined
/usr/include/asm/resource.h:25: warning: this is the location of the previous definition
configure:3187: checking if mkdir takes one argument
configure:3209: gcc -c -g -O2  conftest.c 1>&5


Note only warnings,no errors. The warnings are because I use an old glibc
with a Linux 2.3 kernel.

Finally it fails: 

make[3]: Leaving directory `/u2/src/gnu/gcc/egcsobj/gcc/intl'
gcc  -DIN_GCC    -g -W -Wall -Wtraditional  -DHAVE_CONFIG_H    -I. -I../../egcs/gcc -I../../egcs/gcc/config -I../../egcs/gcc/../include \
  -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/pkg/gcc-000501/lib/gcc-lib/\" -DDEFAULT_TARGET_VERSION=\"2.96\" -DDEFAULT_TARGET_MACHINE=\"i586-pc-linux-gnu\" -DSTANDARD_BINDIR_PREFIX=\"/pkg/gcc-000501/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" \
  -c `echo ../../egcs/gcc/gcc.c | sed 's,^\./,,'`
../../egcs/gcc/gcc.c: In function `execute':
../../egcs/gcc/gcc.c:2640: `prus' has an incomplete type
../../egcs/gcc/gcc.c:2641: warning: implicit declaration of function `getrusage'
../../egcs/gcc/gcc.c:2641: `RUSAGE_CHILDREN' undeclared (first use in this function)
../../egcs/gcc/gcc.c:2641: (Each undeclared identifier is reported only once
../../egcs/gcc/gcc.c:2641: for each function it appears in.)
../../egcs/gcc/gcc.c:2642: invalid use of undefined type `struct rusage'
../../egcs/gcc/gcc.c:2642: invalid use of undefined type `struct rusage'
../../egcs/gcc/gcc.c:2643: invalid use of undefined type `struct rusage'
../../egcs/gcc/gcc.c:2643: invalid use of undefined type `struct rusage'
../../egcs/gcc/gcc.c:2646: invalid use of undefined type `struct rusage'
../../egcs/gcc/gcc.c:2646: invalid use of undefined type `struct rusage'
../../egcs/gcc/gcc.c:2647: invalid use of undefined type `struct rusage'
../../egcs/gcc/gcc.c:2647: invalid use of undefined type `struct rusage'
../../egcs/gcc/gcc.c: At top level:
../../egcs/gcc/gcc.c:190: storage size of `rus' isn't known
../../egcs/gcc/gcc.c:190: storage size of `prus' isn't known
make[2]: *** [gcc.o] Error 1
make[2]: Leaving directory `/u2/src/gnu/gcc/egcsobj/gcc'
make[1]: *** [bootstrap] Error 2
make[1]: Leaving directory `/u2/src/gnu/gcc/egcsobj/gcc'
make: *** [bootstrap] Error 2
fred:/u2/src/gnu/gcc/egcsobj% 

The error occurs because of that:

/* Define if you have the <sys/resource.h> header file.  */
/* #undef HAVE_SYS_RESOURCE_H */

Defining that fixes the problem.


-Andi



More information about the Gcc-bugs mailing list