I hope someone can help me out here. I am not a C coder but occasionally compile things in the Unix [aix, solaris, linux] environment. I am currently attempting to compile iftop and have run into many problem. I have installed libpcap and ncurses to get past my first two problems. I applied the patch referenced here http://lists.beasts.org/pipermail/iftop-users/2003-November/000074.html for POSIX threads. I am now stumped though. Here is the error that I am getting when trying to compile:
. . . . checking for inet_pton... yes checking size of u_int8_t... unknown type checking size of u_int16_t... unknown type checking size of u_int32_t... unknown type checking for stdint.h... (cached) no checking sys/inttypes.h usability... yes checking sys/inttypes.h presence... yes checking for sys/inttypes.h... yes checking for library containing getnameinfo... none required checking for library containing gethostbyaddr_r... none required checking how to call gethostbyaddr_r... 7 args, struct hostent* return checking where to find pcap.h... /home/username/tcpdump/include checking for pcap_open_live in -lpcap... yes checking pcap.h usability... yes checking pcap.h presence... yes checking for pcap.h... yes checking for a curses library containing mvchgat... -lncurses checking how to compile a working program with POSIX threads... -lpthread checking if we need to enable promiscuous mode by default... yes configure: creating ./config.status config.status: creating Makefile config.status: creating config/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make all-recursive make[1]: Entering directory `/home/username/iftop-0.15' Making all in config make[2]: Entering directory `/home/username/iftop-0.15/config' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/username/iftop-0.15/config' make[2]: Entering directory `/home/username/iftop-0.15' source='options.c' object='options.o' libtool=no \ depfile='.deps/options.Po' tmpdepfile='.deps/options.TPo' \ depmode=gcc /bin/bash ./config/depcomp \ gcc -DHAVE_CONFIG_H -I. -I. -I. -I/home/username/tcpdump/include -g -O2 -c `test -f 'options.c' || echo './'`options.c options.c: In function `set_net_filter': options.c:218: `u_int32_t' undeclared (first use in this function) options.c:218: (Each undeclared identifier is reported only once options.c:218: for each function it appears in.) options.c:218: parse error before `mm' options.c:219: `mm' undeclared (first use in this function) options.c: In function `options_config_get_net_filter': options.c:466: `u_int32_t' undeclared (first use in this function) options.c:466: parse error before `mm' options.c:467: `mm' undeclared (first use in this function) make[2]: *** [options.o] Error 1 make[2]: Leaving directory `/home/username/iftop-0.15' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/username/iftop-0.15' make: *** [all] Error 2 [60]/home/username/iftop-0.15 #
I am guessing that it is something simple but I just don't have the knowledge base to figure this one out for myself. Any help would be greatly appreciated.
Oh yes: SunOS hostname-here5.8 Generic_108528-22 sun4u sparc SUNW,Ultra-5_10.
Teressa Griffin
Hi Teressa,
Sorry for the lack of reply on this one. You should be able to work around this problem by replacing every occurence of "u_int32_t" with "unsigned int".
I'm not sure what the "correct" solution to this problem. Does anyone know if it's possible to get autoconf to do something useful here?
Paul
On Thu, Jan 15, 2004 at 01:04:21PM -0700, tagriffin@micron.com wrote:
I hope someone can help me out here. I am not a C coder but occasionally compile things in the Unix [aix, solaris, linux] environment. I am currently attempting to compile iftop and have run into many problem. I have installed libpcap and ncurses to get past my first two problems. I applied the patch referenced here http://lists.beasts.org/pipermail/iftop-users/2003-November/000074.html for POSIX threads. I am now stumped though. Here is the error that I am getting when trying to compile:
. . . . checking for inet_pton... yes checking size of u_int8_t... unknown type checking size of u_int16_t... unknown type checking size of u_int32_t... unknown type checking for stdint.h... (cached) no checking sys/inttypes.h usability... yes checking sys/inttypes.h presence... yes checking for sys/inttypes.h... yes checking for library containing getnameinfo... none required checking for library containing gethostbyaddr_r... none required checking how to call gethostbyaddr_r... 7 args, struct hostent* return checking where to find pcap.h... /home/username/tcpdump/include checking for pcap_open_live in -lpcap... yes checking pcap.h usability... yes checking pcap.h presence... yes checking for pcap.h... yes checking for a curses library containing mvchgat... -lncurses checking how to compile a working program with POSIX threads... -lpthread checking if we need to enable promiscuous mode by default... yes configure: creating ./config.status config.status: creating Makefile config.status: creating config/Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands make all-recursive make[1]: Entering directory `/home/username/iftop-0.15' Making all in config make[2]: Entering directory `/home/username/iftop-0.15/config' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/username/iftop-0.15/config' make[2]: Entering directory `/home/username/iftop-0.15' source='options.c' object='options.o' libtool=no \ depfile='.deps/options.Po' tmpdepfile='.deps/options.TPo' \ depmode=gcc /bin/bash ./config/depcomp \ gcc -DHAVE_CONFIG_H -I. -I. -I. -I/home/username/tcpdump/include -g -O2 -c `test -f 'options.c' || echo './'`options.c options.c: In function `set_net_filter': options.c:218: `u_int32_t' undeclared (first use in this function) options.c:218: (Each undeclared identifier is reported only once options.c:218: for each function it appears in.) options.c:218: parse error before `mm' options.c:219: `mm' undeclared (first use in this function) options.c: In function `options_config_get_net_filter': options.c:466: `u_int32_t' undeclared (first use in this function) options.c:466: parse error before `mm' options.c:467: `mm' undeclared (first use in this function) make[2]: *** [options.o] Error 1 make[2]: Leaving directory `/home/username/iftop-0.15' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/username/iftop-0.15' make: *** [all] Error 2 [60]/home/username/iftop-0.15 #
I am guessing that it is something simple but I just don't have the knowledge base to figure this one out for myself. Any help would be greatly appreciated.
Oh yes: SunOS hostname-here5.8 Generic_108528-22 sun4u sparc SUNW,Ultra-5_10.
Teressa Griffin
On Mon, Jan 19, 2004 at 12:46:59PM +0000, Paul Warren wrote:
Hi Teressa,
Sorry for the lack of reply on this one. You should be able to work around this problem by replacing every occurence of "u_int32_t" with "unsigned int".
I'm not sure what the "correct" solution to this problem. Does anyone know if it's possible to get autoconf to do something useful here?
It should already be doing so -- there's complicated logic to define the various types. I don't know why it isn't working in this case, though.
On Mon, Jan 19, 2004 at 01:00:22PM +0000, Chris Lightfoot wrote:
On Mon, Jan 19, 2004 at 12:46:59PM +0000, Paul Warren wrote:
Sorry for the lack of reply on this one. You should be able to work around this problem by replacing every occurence of "u_int32_t" with "unsigned int".
I'm not sure what the "correct" solution to this problem. Does anyone know if it's possible to get autoconf to do something useful here?
It should already be doing so -- there's complicated logic to define the various types. I don't know why it isn't working in this case, though.
On this system, the types are defined in sys/types.h, and presumably autoconf is supposed to make them up in the event that they're not defined there on a given system.
Perhaps upgrading autoconf might help?
Paul
On Mon, Jan 19, 2004 at 07:26:03PM +0000, Paul Warren wrote:
On Mon, Jan 19, 2004 at 01:00:22PM +0000, Chris Lightfoot wrote:
On Mon, Jan 19, 2004 at 12:46:59PM +0000, Paul Warren wrote:
Sorry for the lack of reply on this one. You should be able to work around this problem by replacing every occurence of "u_int32_t" with "unsigned int".
I'm not sure what the "correct" solution to this problem. Does anyone know if it's possible to get autoconf to do something useful here?
It should already be doing so -- there's complicated logic to define the various types. I don't know why it isn't working in this case, though.
On this system, the types are defined in sys/types.h, and presumably autoconf is supposed to make them up in the event that they're not defined there on a given system.
Perhaps upgrading autoconf might help?
The autoconf scripts sets some macros which are tested by integers.h. The problem is that, until C99, there were no standard fixed-width integer types, so the script and header file try between them to figure out what combination of types works. It assumes that if <stdint.h> exists, it contains the proper C99 uint<n>_t types, and similarly for <sys/inttypes.h>, which on Solaris seems to contain the same definitions.
I don't think that autoconf has functionality to do this itself, sadly.
On Thu, Jan 15, 2004 at 01:04:21PM -0700, tagriffin@micron.com wrote:
checking for sys/inttypes.h... yes
I am guessing that it is something simple but I just don't have the knowledge base to figure this one out for myself. Any help would be greatly appreciated.
Oh yes: SunOS hostname-here5.8 Generic_108528-22 sun4u sparc SUNW,Ultra-5_10.
What does
grep uint8_t /usr/include/sys/inttypes.h
give?