autoconf wrong + ICE during bootstrap for 000430 on i386-linux
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Mon May 1 11:06:00 GMT 2000
> From: "Andi Kleen" <ak@suse.de>
> >
> > 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.
Warnings should be okay in these decl tests, and it looks like they
passed. (You claimed in your first message that they didn't, right?)
And it looks like HAVE_SYS_RESOURCE_H was defined here, or you
wouldn't get sys/resource.h included to cause the conflicts.
> 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
Right, you need to zero in on why HAVE_SYS_RESOURCE_H isn't being
defined by autoconf on your system. Also, why was it defined during
the decl check, but not here when compiling gcc.c?
--Kaveh
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions
More information about the Gcc-bugs
mailing list