Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Mar 2006 07:09:18 GMT
From:      Chris St Denis <chris@ctgameinfo.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/94217: net/ngrep does not work with ports pcap option
Message-ID:  <200603080709.k2879IJj094495@www.freebsd.org>
Resent-Message-ID: <200603080710.k287A5J5003275@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         94217
>Category:       ports
>Synopsis:       net/ngrep does not work with ports pcap option
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 08 07:10:05 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Chris St Denis
>Release:        6.0-RELEASE-p4
>Organization:
>Environment:
FreeBSD 6.0-RELEASE-p4 FreeBSD 6.0-RELEASE-p4 #1: Fri Feb 17 14:10:25 PST 2006     root@server:/usr/obj/usr/src/sys/SERVER  amd64
>Description:
when the WITH_PORTS_PCAP option is selected, ngrep port looks for pcap.2 and if its not found it installs net/libpcap.

net/libpcap does not install this file. Its pkg-plist contains
lib/libpcap.a
%%BASE%%lib/libpcap.so.2
%%BASE%%lib/libpcap.so
include/pcap.h
include/pcap-namedb.h
include/pcap-bpf.h


This causes it to not accept that it is installed and try to reinstall it.


I discovered this problem because ngerp was segfaulting on my system -- not sure if that itsself is also a bug or just a pcap issue as the standard compile message suggests it may be.
>How-To-Repeat:
make with the "Use ports PCAP instead of system PCAP" option turned on.

===>  Found saved configuration for ngrep-1.44
===>  Extracting for ngrep-1.44
=> MD5 Checksum OK for ngrep-1.44-1.tar.bz2.
=> SHA256 Checksum OK for ngrep-1.44-1.tar.bz2.
===>  Patching for ngrep-1.44
===>  Applying FreeBSD patches for ngrep-1.44
===>   ngrep-1.44 depends on shared library: pcap.2 - not found
===>    Verifying install for pcap.2 in /usr/ports/net/libpcap
===>  Extracting for libpcap-0.9.4
=> MD5 Checksum OK for libpcap-0.9.4.tar.gz.
=> SHA256 Checksum OK for libpcap-0.9.4.tar.gz.
===>  Patching for libpcap-0.9.4
===>   libpcap-0.9.4 depends on executable: bison - found
===>  Configuring for libpcap-0.9.4
configure: WARNING: you should use --build, --host, --target
checking build system type... amd64-portbld-freebsd6.0
checking host system type... amd64-portbld-freebsd6.0
checking target system type... amd64-portbld-freebsd6.0
checking for amd64-portbld-freebsd6.0-gcc... cc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking gcc version... 3
checking for inline... inline
checking for __attribute__... yes
checking for u_int8_t using cc... yes
checking for u_int16_t using cc... yes
checking for u_int32_t using cc... yes
checking how to run the C preprocessor... cc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/ioccom.h usability... yes
checking sys/ioccom.h presence... yes
checking for sys/ioccom.h... yes
checking sys/sockio.h usability... yes
checking sys/sockio.h presence... yes
checking for sys/sockio.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for netinet/if_ether.h... no
configure: Rechecking with some additional includes
checking for netinet/if_ether.h... yes
checking for ANSI ioctl definitions... yes
checking for strerror... yes
checking for strlcpy... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for library containing gethostbyname... none required
checking for library containing socket... none required
checking for library containing putmsg... no
checking for ether_hostton... yes
checking whether ether_hostton is declared... yes
checking if --disable-protochain option is specified... enabled
checking packet capture type... bpf
checking for getifaddrs... yes
checking ifaddrs.h usability... yes
checking ifaddrs.h presence... yes
checking for ifaddrs.h... yes
checking if --enable-ipv6 option is specified... yes
checking whether to build optimizer debugging code... no
checking whether to build parser debugging code... no
checking whether we have /proc/net/dev... no
checking whether we have Septel API... no
checking for flex... flex
checking for flex 2.4 or higher... yes
checking for bison... bison
checking for amd64-portbld-freebsd6.0-ranlib... no
checking for ranlib... ranlib
checking if sockaddr struct has sa_len member... yes
checking if sockaddr_storage struct exists... yes
checking if dl_hp_ppa_info_t struct has dl_module_id_1 member... no
checking if unaligned accesses fail... no
checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
===>  Building for libpcap-0.9.4
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./pcap-bpf.c
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./fad-getad.c
sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' ./VERSION > version.h
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./pcap.c
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./inet.c
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./gencode.c
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./optimize.c
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./nametoaddr.c
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./etherent.c
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./savefile.c
rm -f bpf_filter.c
ln -s ./bpf/net/bpf_filter.c bpf_filter.c
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c bpf_filter.c
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./bpf_image.c
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c ./bpf_dump.c
flex -Ppcap_ -t ./scanner.l > $$.scanner.c; mv $$.scanner.c scanner.c
bison -y -p pcap_ -d ./grammar.y
mv y.tab.c grammar.c
mv y.tab.h tokdefs.h
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c scanner.c
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -Dyylval=pcap_lval -c grammar.c
sed -e 's/.*/char pcap_version[] = "&";/' ./VERSION > version.c
cc -O2 -O -pipe -march=opteron -fPIC -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -c version.c
ar rc libpcap.a pcap-bpf.o fad-getad.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o bpf_filter.o bpf_image.o bpf_dump.o  scanner.o grammar.o version.o
ranlib libpcap.a
===>  Installing for libpcap-0.9.4
===>   Generating temporary packing list
===>  Checking if net/libpcap already installed
===>   libpcap-0.9.4 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of net/libpcap
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop in /usr/ports/net/libpcap.
*** Error code 1

Stop in /usr/ports/net/ngrep.

>Fix:
the ngrep makefile should probebly refrence a different file. I couldn't get it to work with libpcap.2, libpcap.so, or libpcap.a so I dont know what. 
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603080709.k2879IJj094495>