Subject: pkg/8048: net/sniffit fails to build AND doesn't enable interactive mode
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Thilo.Manske@HEH.Uni-Oldenburg.DE>
List: netbsd-bugs
Date: 07/23/1999 06:51:30
>Number: 8048
>Category: pkg
>Synopsis: net/sniffit fails to build AND doesn't enable interactive mode
>Confidential: no
>Severity: critical
>Priority: low
>Responsible: pkg-manager (NetBSD software packages system bug manager)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jul 23 06:50:01 1999
>Last-Modified:
>Originator: Thilo Manske
>Organization:
Dies ist Thilos Unix Signature! Viel Spass damit.
>Release: current as of monday
>Environment:
System: NetBSD WintelKiller 1.4G NetBSD 1.4G (WintelKiller) #145: Tue Jul 20 16:49:09 MEST 1999 thilo@Seti.HEH.Uni-Oldenburg.DE:/usr/src/sys/arch/i386/compile/WintelKiller i386
>Description:
configure finds libncurses (but not ncurses.h), if it's installed, but
later fails to link against it (on i386/ELF):
creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc -O2 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib) works... yes
checking whether the C compiler (gcc -O2 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for main in -lncurses... yes
checking for ncurses.h... no
...
gcc -w -O2 -o sniffit sniffit.0.3.5.c sn_packets.o sn_generation.o sn_interface.o sn_cfgfile.o sn_logfile.o -lpcap -lncurses -DHAVE_LIBNCURSES=1 -DHAVE_SHMGET=1 -DHAVE_ATEXIT=1 -DSIZEOF_UNSIGNED_SHORT_INT=2 -DSIZEOF_UNSIGNED_LONG_INT=4 -DNETBSD=1
/usr/bin/ld: cannot open -lncurses: No such file or directory
collect2: ld returned 1 exit status
>How-To-Repeat:
>Fix:
Either patch sniffit's configure script to not find libncurses
(sed s/\$LDFLAGS//) or apply these patches (they will enable interactive
mode as well):
--- Makefile.old Tue May 25 13:28:47 1999
+++ Makefile Fri Jul 23 14:54:17 1999
@@ -11,6 +11,9 @@
NOT_FOR_PLATFORM= *-*-alpha # severe LP64 loss
+DEPENDS= ncurses-4.2:../../devel/ncurses
+NCURSES_LOCATION= $(LOCALBASE)/include/ncurses.h
+
do-build:
cd ${WRKSRC} ; ./configure ; ${MAKE}
--- patches/patch-ad.old Fri Aug 7 13:25:29 1998
+++ patches/patch-ad Fri Jul 23 14:21:36 1999
@@ -10,7 +10,7 @@
+OBJ_OPT =
EXE_FLAG = -w -O2 -o sniffit
-EXE_OPT = -I./libpcap-0.3 -L./libpcap-0.3 -lpcap
-+EXE_OPT = -lpcap
++EXE_OPT = -lpcap $(LDFLAGS)
EXE_OBJ = sn_packets.o sn_generation.o sn_interface.o sn_cfgfile.o \
sn_logfile.o
DEP_FILES = sn_config.h pcap.h sn_data.h sn_defines.h sn_plugins.h \
BTW: sniffit's configure script seems to be really braindamaged...
>Audit-Trail:
>Unformatted: