[Iftop-users] iftop-0.16 on NetBSD

Chris Lightfoot chris at ex-parrot.com
Wed, 23 Jun 2004 11:48:23 +0100


On Tue, Jun 22, 2004 at 05:21:14PM -0500, John Thompson wrote:
> Several weeks ago I posted about a problem configuring iftop to compile
> on NetBSD-1.6.1; specifically, the configure script would die when it
> came to checking for Posix thread support.  I've now updated that
> machine to NetBSD-1.6.2 and the configure script runs to completion
> without complaint (after passing it LDFLAGS=-L/usr/pkg/lib/ and
> CPPFLAGS=-I/usr/pkg/include to point it to the Posix thread support). 
> Unfortunately, it fails during the compile:

this looks like two separate issues:

> gcc  -g -O2  -L/usr/pkg/lib/ -o iftop  addr_hash.o edline.o hash.o  iftop.o ns_hash.o options.o  resolver.o screenfilter.o serv_hash.o  sorted_list.o threadprof.o ui.o  util.o addrs_ioctl.o addrs_dlpi.o  dlcommon.o stringmap.o cfgfile.o  vector.o  -lpcap -lm  -lncurses -lpthread
> ui.o: In function `draw_bar_scale':
> /tmp/iftop-0.16/ui.c:269: undefined reference to `_acs_char'
> /tmp/iftop-0.16/ui.c:281: undefined reference to `_acs_char'

This is a curses thing (referenced through mvaddch, which
is presumably a macro); it really should Just Work.

Ah. Does NetBSD have an old-style curses as well as
ncurses? If so, is it possible that the old curses header
file is that being included as <curses.h>?

> ui.o: In function `ui_loop':
> /tmp/iftop-0.16/ui.c:1055: undefined reference to `__error'

that line reads,

    errno = 0;

which is certainly OK! I'm guessing that whatever NetBSD's
C library does to turn errno into thread-local data is
breaking here (perhaps because of a library which the
configure script hasn't realised is needed to build with
pthreads support). That said, the NetBSD man pages on the
netbsd site don't mention another library being needed,
for the CURRENT release anyway. They don't mention
anything at all under pthreads for 1.6.2.

> 
> Any ideas where to go from here?
> 

No, frankly. If you can email me privately with login
details for a machine with that release of the OS on it,
I'll see if I can get the thing to build. (Obviously
you'll need to test it yourself....) 

-- 
``The ATM says `DESTROY CAPITALISM' -- but then it charged me a service fee!''
  (complaint about an auto-teller at Jamie Zawinski's club, `DNA Lounge')