Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 67671 - ngrep fails to compile
Summary: ngrep fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-15 08:35 UTC by gentoo
Modified: 2005-02-28 07:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gentoo 2004-10-15 08:35:01 UTC
i686-pc-linux-gnu-gcc -march=pentium4 -O3 -pipe -DLINUX -DHAVE_CONFIG_H  -D_BSD_SOURCE=1 -D__FAVOR_BSD=1  -I. -I/usr/include  -g -c ngrep.c
ngrep.c: In function `process':
ngrep.c:620: error: structure has no member named `source'
ngrep.c:621: error: structure has no member named `dest'
make: *** [ngrep.o] Error 1
Comment 1 Eldad Zack (RETIRED) gentoo-dev 2004-10-15 13:51:22 UTC
emerge info please
Comment 2 gentoo 2004-10-15 17:11:19 UTC
Portage 2.0.51_rc9 (default-x86-1.4, gcc-3.4.2, glibc-2.3.4.20041006-r0, 2.6.7 i
686)
=================================================================
System uname: 2.6.7 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz
Gentoo Base System version 1.5.3
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux-headers-2.4.22
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2
/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /
usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/s
hare/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/t
ex/platex/config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks sandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/dis
tributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib acpi alsa apm arts avi berkdb bitmap-fonts bonobo cdr crypt cups db
a dga dvd dvdr encode esd f77 foomaticdb gd gdbm gdk-pixbuf gif gimpprint gnome 
gphoto2 gpm gtk gtk2 gtkhtml guile imap imlib java jpeg kde libg++ libwww mad ma
trox mbox mikmod mmx motif mozilla mpeg mysql ncurses nls offensive oggvorbis op
engl oss pam pdflib perl png python qt quicktime readline ruby samba sdl session
 slang spell sqlite sse ssl svga tcltk tcpd tetex tiff truetype unicode usb x86 
xinerama xml xml2 xmms xprint xv zlib"

Comment 3 Antoine Martin 2004-12-07 09:00:33 UTC
checking for pcap_open_live in -lpcap... yes
checking for pcap_restart in -lpcap... yes

configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
make[1]: Entering directory `/var/tmp/portage/ngrep-1.42/work/ngrep-1.42/regex-0.12'
gcc -g  -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1  -I. -I. -c regex.c
make[1]: Leaving directory `/var/tmp/portage/ngrep-1.42/work/ngrep-1.42/regex-0.12'
gcc -O2 -DLINUX -DHAVE_CONFIG_H  -D_BSD_SOURCE=1 -D__FAVOR_BSD=1  -I. -I/usr/include  -g -c ngrep.c
ngrep.c: In function `process':
ngrep.c:620: error: structure has no member named `source'
ngrep.c:621: error: structure has no member named `dest'
make: *** [ngrep.o] Error 1

!!! ERROR: net-analyzer/ngrep-1.42 failed.
!!! Function src_compile, Line 32, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.
Comment 4 Daniel Black (RETIRED) gentoo-dev 2005-01-08 01:39:34 UTC
Portage 2.0.51-r8 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20040808-r1, 2.6.10-gentoo-r2 i686)
=================================================================
System uname: 2.6.10-gentoo-r2 i686 AMD Athlon(tm) XP 1900+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Oct 24 2004, 08:06:09)]
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r5
sys-devel/automake:  1.8.5-r1
sys-devel/binutils:  2.15.90.0.1.1-r3
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache cvs distcc distlocks sandbox sfperms sign userpriv usersandbox"
GENTOO_MIRRORS="ftp://mirror.internode.on.net/pub/gentoo             http://gentoo.oregonstate.edu             http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS=""
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowex X aalib acl acpi alsa apm arts artswrappersuid avi berkdb bitmap-fonts bonobo cdr crypt cscope cups directfb encode ethereal fam fastcgi fla flac foomaticdb fortran gd ggi gif gphoto2 gstreamer gtk gtkhtml guile imagemagick imlib ipv6 jack java jpeg junit kde kerberos libgda libwww mad mbox mikmod mmx motif mozilla mpeg mysql nas nptl ntlm oggvorbis openal operanom2 pam pdflib perl php png postgres ppds python qt quicktime readline ruby samba sdl slp snmp socks5 sox speex spell sse ssl svga tcltk tetex tiff truetype usb vhosts xinerama xml xml2 xv zlib"

couldn't replicate please attach: /var/tmp/portage/ngrep-1.42/work/ngrep-1.42/config.log
Comment 5 Jordan Ritter 2005-02-24 23:17:00 UTC
ngrep 1.43 was released a few days ago, and I also had a report of a similar problem on SuSE 9.2.  The short summary is that the test program itself was based on a bad assumption that if it failed, it failed because of a problem with udp.h.  The report exposed the fact that it can fail for other reasons, and assuming all failures mean the header is broken was wrong.

The full explanation is at:  http://sourceforge.net/tracker/index.php?func=detail&aid=1144991&group_id=10752&atid=110752

I am the author of ngrep and an avid user of Gentoo.  I have come across bugs in your database several times typically by my own interest only; I think only once did you guys ever notify me (and I promptly fixed it).  I would be very happy to address bugs more directly and quickly if would just notify me.  Is there a system with which I can register my email address or gentoo bugs account that can be automatically notified of new bugs as they arise?  
Comment 6 Daniel Black (RETIRED) gentoo-dev 2005-02-25 21:31:53 UTC
Jordan - thankyou for your comment and the fix. I've added ngrep-1.43 to the gentoo distro.

I apologise for the lack of notification. To improve notification in future I have added your name/email to the metadata that is typically used to assign bugs.
In the preferences section of bugzilla you could watch netmon bugs however I feel you would be overwhelmed with bugs you are not interested it.

I'm hoping adding your name to metadata will alleviate any further lack of communication.

bug 52000 lists a patch for pcap for inclusion that was included for ngrep-1.42. I've removed it cause it doesn't apply cleanly and it seems you have addressed some of the issues. Can you just to a quick check to make sure it doen't include fixes that haven't been included please.
Comment 7 Jordan Ritter 2005-02-28 07:47:43 UTC
Thanks for the response Daniel, I appreciate it.

I've looked over the patch again and AFAICT the purpose of the patch was to figure out which #include was correct, set that via AUTOCONF/config.h, and let that drive an #ifdef/else/endif wrapping the correct #include.

My solution was simply to remove it; at least as far back as 0.6.2, libpcap already included the file through pcap.h, making a separate bpf.h include unnecessary.  

So, confirmed, the referenced patch is not necessary and contains no additional functionality that needed to be rolled into ngrep 1.43.

In the past I've tried to support libpcaps all the way back to 0.2 (OpenBSD at one point), so that may explain why I had the bpf include in the first place.  I don't remember anymore, but I don't think that I'll have to address this again unless some old libpcap is used, and at this point I don't see a reason for why that should be (I'd probably just respond to support requests  that they should upgrade libpcap anyway).

Thanks again.