From: <we...@bu...> - 2000-01-16 01:05:35
|
Greetings, I'm having a problem getting timer.c in libmaa to compile on my mostly stock RedHat 6.1 x86 system. I've tried both 1.4.9 and 1.5.0, but get the same error every time: gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O timer.c timer.c:41: field `self_mark' has incomplete type timer.c:42: field `children_mark' has incomplete type timer.c: In function `tim_start': timer.c:74: warning: implicit declaration of function `getrusage' timer.c:74: `RUSAGE_SELF' undeclared (first use in this function) timer.c:74: (Each undeclared identifier is reported only once timer.c:74: for each function it appears in.) timer.c:75: `RUSAGE_CHILDREN' undeclared (first use in this function) timer.c: In function `tim_stop': timer.c:84: storage size of `rusage' isn't known timer.c:102: `RUSAGE_SELF' undeclared (first use in this function) timer.c:106: `RUSAGE_CHILDREN' undeclared (first use in this function) timer.c:84: warning: unused variable `rusage' make[1]: *** [timer.o] Error 1 make[1]: Leaving directory `/usr/src/redhat/BUILD/dictd-1.5.0/libmaa' make: *** [all] Error 1 I'm trying to make an SRPM, but I really don't know enough C to fix this. I'm running kernel 2.3.34, egcs 1.1.2, and glibc 2.1.2 on a Pentium RedHat 6.1 machine with all current patches. Below is a full typescript of the build process: Script started on Sat Jan 15 18:47:22 2000 DeepThought:/usr/src/redhat/BUILD/dictd-1.5.0# ./configure --prefix=/usr creating cache ./config.cache Configuring for dict . checking host system type... i586-unknown-linux checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for POSIXized ISC... no Checking for programs checking for a BSD compatible install... /usr/bin/install -c checking for flex... flex checking for yywrap in -lfl... yes checking for bison... bison -y checking for ranlib... ranlib checking for gnroff... gnroff checking for groff... groff checking for col... col checking for expand... expand . Checking for libraries checking for libmaa in local source tree... yes checking for zlib in local source tree... yes checking for main in -lsocket... no checking for main in -lnsl... yes . Checking for header files checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking whether time.h and sys/time.h may both be included... yes checking for unistd.h... yes checking for strings.h... yes checking for limits.h... yes checking for sys/resource.h... no checking for sys/time.h... yes checking for sys/param.h... yes checking for sys/wait.h... yes . Checking for system constants checking for working const... yes checking for inline... inline . Checking for library functions checking for strdup... yes checking for strtol... yes checking for strtoul... yes checking for semget... yes checking for strerror... yes checking for strdup... (cached) yes checking for strtol... (cached) yes checking for strtoul... (cached) yes . Making output files updating cache ./config.cache creating ./config.status creating Makefile creating doc/Makefile creating config.h configuring in libmaa running /bin/sh ./configure --prefix=/usr --cache-file=.././config.cache --srcdir=. loading cache .././config.cache Configuring for libmaa 0.93 . checking host system type... i586-unknown-linux checking for gcc... (cached) gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... (cached) yes checking whether gcc accepts -g... (cached) yes checking for POSIXized ISC... no Checking for programs checking for a BSD compatible install... (cached) /usr/bin/install -c checking for ranlib... (cached) ranlib checking for perl4... no checking for perl... perl checking for latex2e... no checking for latex... no checking for fig2dev... fig2dev checking for dvips... no checking for refbibtex... no checking for bibtex... no . Checking for libraries . Checking for header files checking how to run the C preprocessor... (cached) gcc -E checking for ANSI C header files... (cached) yes checking whether time.h and sys/time.h may both be included... (cached) yes checking for unistd.h... (cached) yes checking for strings.h... (cached) yes checking for getopt.h... yes checking for limits.h... (cached) yes checking for sys/resource.h... (cached) no checking for sys/time.h... (cached) yes checking for sys/param.h... (cached) yes checking for sys/wait.h... (cached) yes . Checking for system constants checking for size_t... yes checking return type of signal handlers... void checking for working const... (cached) yes checking for inline... (cached) inline checking whether byte ordering is bigendian... no checking size of int... 4 checking size of long... 4 checking size of void *... 4 checking size of long long int... 8 . Checking for library functions checking for working alloca.h... yes checking for alloca... yes checking for vprintf... yes checking for gettimeofday... yes checking for strchr... yes checking for strerror... (cached) yes checking for memcpy... yes checking for atexit... yes checking for on_exit... yes checking for sysconf... yes checking for strdup... (cached) yes checking for strtol... (cached) yes checking for strtoul... (cached) yes checking for strdup... (cached) yes checking for strtol... (cached) yes checking for strtoul... (cached) yes . Making output files updating cache .././config.cache creating ./config.status creating Makefile creating doc/Makefile creating config.h . Done . Done You have mail in /usr/src/redhat/BUILD/dictd-1.5.0/ DeepThought:/usr/src/redhat/BUILD/dictd-1.5.0# make making in libmaa make[1]: Entering directory `/usr/src/redhat/BUILD/dictd-1.5.0/libmaa' gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O xmalloc.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O obstack.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O getopt.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O getopt1.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O hash.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O set.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O stack.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O list.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O error.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O memory.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O string.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O debug.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O flags.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O maa.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O prime.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O bit.c gcc -c -Wall -pedantic -pipe -Wwrite-strings -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wshadow -Wnested-externs -Waggregate-return -DHAVE_CONFIG_H -DMAA_MAJOR=0 -DMAA_MINOR=93 -I. -g -O timer.c timer.c:41: field `self_mark' has incomplete type timer.c:42: field `children_mark' has incomplete type timer.c: In function `tim_start': timer.c:74: warning: implicit declaration of function `getrusage' timer.c:74: `RUSAGE_SELF' undeclared (first use in this function) timer.c:74: (Each undeclared identifier is reported only once timer.c:74: for each function it appears in.) timer.c:75: `RUSAGE_CHILDREN' undeclared (first use in this function) timer.c: In function `tim_stop': timer.c:84: storage size of `rusage' isn't known timer.c:102: `RUSAGE_SELF' undeclared (first use in this function) timer.c:106: `RUSAGE_CHILDREN' undeclared (first use in this function) timer.c:84: warning: unused variable `rusage' make[1]: *** [timer.o] Error 1 make[1]: Leaving directory `/usr/src/redhat/BUILD/dictd-1.5.0/libmaa' make: *** [all] Error 1 DeepThought:/usr/src/redhat/BUILD/dictd-1.5.0# exit Script done on Sat Jan 15 18:50:16 2000 =============================================================================== | Murtaugh: God must hate me. | Linux, the choice of a Gnu generation | | Riggs: Hate 'em back, works for me. | http://bucket.ualr.edu/weed | =============================================================================== -----BEGIN GEEK CODE BLOCK----- Version 3.1 GCS d-(++) s-:on a-- C++++$ ULC++++$ P+?>++ L+++$>+++++ E- W++ N+ o? K-?>on w--(+)$>++ !O- !M-- !V-- PS(+++)@ PE++(+) Y+>++ PGP+(++)$>++++ t++ 5 X+ R(+)>++ tv+++ b++(+)>+++ DI++>+++++ D+(++)>+++ G>++ e>++ h(+)>--- r-(---)>+++$* y+*(++)>+++ ------END GEEK CODE BLOCK------ |