From tagriffin at micron.com Thu Jan 15 20:04:21 2004 From: tagriffin at micron.com (tagriffin@micron.com) Date: Thu, 15 Jan 2004 13:04:21 -0700 Subject: [Iftop-users] Trying to compile iftop-0.15 -- problems Message-ID: This is a multi-part message in MIME format. ------_=_NextPart_001_01C3DBA2.C3D7CF92 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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=3D'options.c' object=3D'options.o' libtool=3Dno \ depfile=3D'.deps/options.Po' tmpdepfile=3D'.deps/options.TPo' \ depmode=3Dgcc /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 #=20 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.=20 Teressa Griffin ------_=_NextPart_001_01C3DBA2.C3D7CF92 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Trying to compile iftop-0.15 -- problems

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-Novem= ber/000074.html for POSIX = threads.  I am now stumped though.  Here is the error that I = am getting when trying to compile:


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

------_=_NextPart_001_01C3DBA2.C3D7CF92-- From pdw at ex-parrot.com Mon Jan 19 12:46:59 2004 From: pdw at ex-parrot.com (Paul Warren) Date: Mon, 19 Jan 2004 12:46:59 +0000 Subject: [Iftop-users] Trying to compile iftop-0.15 -- problems In-Reply-To: References: Message-ID: <20040119124659.GA960@echinda> 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 From chris at ex-parrot.com Mon Jan 19 13:00:22 2004 From: chris at ex-parrot.com (Chris Lightfoot) Date: Mon, 19 Jan 2004 13:00:22 +0000 Subject: [Iftop-users] Trying to compile iftop-0.15 -- problems In-Reply-To: <20040119124659.GA960@echinda> References: <20040119124659.GA960@echinda> Message-ID: 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. -- ``The Fifth Law of Pipes: The outside diameter must exceed the inside diameter; otherwise the hole will be on the outside of the pipe.'' From chris at ex-parrot.com Mon Jan 19 13:15:49 2004 From: chris at ex-parrot.com (Chris Lightfoot) Date: Mon, 19 Jan 2004 13:15:49 +0000 Subject: [Iftop-users] Trying to compile iftop-0.15 -- problems In-Reply-To: References: Message-ID: <+ERRgHvDBga+.eTwmf1tqf/utxSQpgC0o1w@caesious.cold.local> 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? -- ``... Now I had improved the program to the point where it would not work at all.'' (George Greenstein, from `Frozen Star') From pdw at ex-parrot.com Mon Jan 19 19:26:03 2004 From: pdw at ex-parrot.com (Paul Warren) Date: Mon, 19 Jan 2004 19:26:03 +0000 Subject: [Iftop-users] Trying to compile iftop-0.15 -- problems In-Reply-To: References: <20040119124659.GA960@echinda> Message-ID: <20040119192603.GA2416@echinda> 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 From chris at ex-parrot.com Mon Jan 19 17:36:01 2004 From: chris at ex-parrot.com (Chris Lightfoot) Date: Mon, 19 Jan 2004 17:36:01 +0000 Subject: [Iftop-users] Trying to compile iftop-0.15 -- problems In-Reply-To: <20040119192603.GA2416@echinda> References: <20040119124659.GA960@echinda> <20040119192603.GA2416@echinda> Message-ID: 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 exists, it contains the proper C99 uint_t types, and similarly for , which on Solaris seems to contain the same definitions. I don't think that autoconf has functionality to do this itself, sadly. -- Don't argue with idiots-- they drag you down to their level, and then they win because they're playing on home ground. From C. Liang" I apologize in advance if this is a very basic question. I'm still trying to wrap my head around the peculiarities of Solaris .... I'm trying to compile iftop0.15 on a box running Solaris 9 (SPARC). When trying to configure, I get an error about being unable to figure out how to compile with POSIX threads: > ./configure --with-libcap=/usr/local checking for a curses library containing mvchgat... -lncurses checking how to compile a working program with POSIX threads... -lpcap -lnsl -lm -lsocket -lncurses no idea configure: error: can't figure out how to compile with POSIX threads If your system actually supports POSIX threads, this means we've messed up. I believe the libraries in question (libpthreatd, etc.) are in /usr/local/lib, which is where the ncurses libraries are (which it seems to have no problem finding). I have tried setting LDFLAGS to "-L/usr/lib -R/usr/lib", but that doesn't seem to help any. I'm trying to avoid the use of LD_LIBRARY_PATH since there have been problems in the past with getting scripts, etc. to work cleanly. Since I don't have much experience with trying to compile something using POSIX threads, is there something else I need to be feeding to the configure script? - C.