Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 121497 - net-analyzer/ntop-3.2-r1 fails to compile
Summary: net-analyzer/ntop-3.2-r1 fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-03 20:01 UTC by Jason Wever (RETIRED)
Modified: 2006-02-07 14:02 UTC (History)
2 users (show)

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


Attachments
Patch for snmpPlugin.c to fix USE="-ipv6 snmp" compilation problem. (ntop-3.2-snmp_plugin_ipv6.diff,1.58 KB, patch)
2006-02-05 13:54 UTC, Peter Volkov (RETIRED)
Details | Diff
Patch for ntop-3.2-r1.ebuild to enable snmpPlugin.patch. (ntop-3.2-r1-add_snmpPlugin.patch,1.11 KB, patch)
2006-02-05 13:56 UTC, Peter Volkov (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Wever (RETIRED) gentoo-dev 2006-02-03 20:01:27 UTC
ntop-3.2-r1 fails to compile on ~sparc with the following:

(cd .libs && rm -f librrdPlugin.la && ln -s ../librrdPlugin.la librrdPlugin.la)
if /bin/sh ../libtool --tag=CC --mode=compile sparc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I..  -I../myrrd  -DLINUX  -g -mcpu=ultrasparc3 -mvis -O2 -pipe -Wa,-Av8plusa -g -Wshadow -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wnested-externs  -fPIC -DPIC -MT libsnmpPlugin_la-snmpPlugin.lo -MD -MP -MF ".deps/libsnmpPlugin_la-snmpPlugin.Tpo" -c -o libsnmpPlugin_la-snmpPlugin.lo `test -f 'snmpPlugin.c' || echo './'`snmpPlugin.c; \
then mv -f ".deps/libsnmpPlugin_la-snmpPlugin.Tpo" ".deps/libsnmpPlugin_la-snmpPlugin.Plo"; else rm -f ".deps/libsnmpPlugin_la-snmpPlugin.Tpo"; exit 1; fi
 sparc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../myrrd -DLINUX -g -mcpu=ultrasparc3 -mvis -O2 -pipe -Wa,-Av8plusa -g -Wshadow -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fPIC -DPIC -MT libsnmpPlugin_la-snmpPlugin.lo -MD -MP -MF .deps/libsnmpPlugin_la-snmpPlugin.Tpo -c snmpPlugin.c  -fPIC -DPIC -o .libs/libsnmpPlugin_la-snmpPlugin.o
snmpPlugin.c: In function `getHostSerialFromIndex':
snmpPlugin.c:480: error: structure has no member named `Ip6Address'
snmpPlugin.c:482: error: structure has no member named `Ip6Address'
snmpPlugin.c: In function `encodeIpv6':
snmpPlugin.c:702: error: structure has no member named `Ip6Address'
snmpPlugin.c: In function `processRequest':
snmpPlugin.c:854: error: structure has no member named `Ip6Address'
make[3]: *** [libsnmpPlugin_la-snmpPlugin.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/ntop-3.2-r1/work/ntop-3.2/plugins'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/ntop-3.2-r1/work/ntop-3.2/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/ntop-3.2-r1/work/ntop-3.2'
make: *** [all] Error 2

!!! ERROR: net-analyzer/ntop-3.2-r1 failed.
Call stack:
  ebuild.sh, line 1894:   Called dyn_compile
  ebuild.sh, line 941:   Called src_compile

!!! compile problem
!!! If you need support, post the topmost build error, and the call stack if relevant.


emerge info: 
Portage 2.1_pre4-r1 (!/usr/portage/profiles/default-linux/sparc/sparc64/2005.1, gcc-3.3.6, glibc-2.3.3.20040420-r2, 2.6.15.1 sparc64)
=================================================================
System uname: 2.6.15.1 sparc64 sun4u
Gentoo Base System version 1.12.0_pre15
distcc 2.18.3 sparc-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.4.26-r1
ACCEPT_KEYWORDS="sparc ~sparc"
AUTOCLEAN="yes"
CBUILD="sparc-unknown-linux-gnu"
CFLAGS="-mcpu=ultrasparc3 -mvis -O2 -pipe -Wa,-Av8plusa"
CHOST="sparc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /etc/mail/dspam /opt/openjms/config /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/fax /usr/lib/mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/control /var/run/dspam /var/service /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-mcpu=ultrasparc3 -mvis -O2 -pipe -Wa,-Av8plusa"
DISTDIR="/nfs/distfiles"
FEATURES="autoaddcvs autoconfig buildpkg ccache cvs distlocks nostrip sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.mirrors.easynews.com/linux/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://open-systems.ufl.edu/mirrors/gentoo http://mirror.datapipe.net/gentoo ftp://gentoo.mirrors.tds.net/gentoo"
LINGUAS="english"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/gentoo-x86"
PORTDIR_OVERLAY="/nfs/overlay /usr/local/portage"
SYNC="rsync://stargazer.weeve.org/gentoo-portage"
USE="sparc X X509 Xaw3d a52 aac aalib accessibility acl ada adns aim aimextras ao apache apache2 ares arts artworkextra asf async athena audiofile authdaemond automount avahi avi bash-completion bcmath bcp beep berkdb bgpclassless bidi big-tables bitmap-fonts bittorrent bjam blas bluetooth bmp bmpx bonobo brltty buffysize bzip2 bzlib c++ cairo calendar camaelon canvas ccache cdb cdda cddb cdf cdio cdparanoia cdr cdrom cgi chasen chipcard chroot cid clamav clearcase cli corba cracklib crypt cscope css ctype cups curl curlwrappers cvsgraph daap dba dbase dbi dbus dbx dga diet dillo dio discard-path dllloader dlloader dnd dnsdb doc drac dri dtaus dts dv dvd dvdr dvdread dynagraph edirectory editor edl eds effects emacs encode enscript escreen esd estraier etwin evolution examples exif exiscan exiscan-acl expat extensions extraengine fam fame fastcgi fat fax fbcon ffmpeg fftw finger firebird firefox fits fix-connected-rt flac flash flatfile flood fluidsynth font-server fontconfig foomaticdb force-cgi-redirect fortran fpx frascend freetds freetts freetype freewnn frxp ftp fuse gcc-libffi gcc64 gcj gd gdbm gecko-sdk geldkarte geoip geometry geos gg ggi gif gimpprint gitsendemail gkrellm glade glut gmail gmailtimestamps gml gmp gnokii gnome gnomecanvas gnomedb gnustep gnutls gopher gpgme gphoto2 gpm grammar graphicsmagick graphviz gs gsl gsm gsnd gssapi gstreamer gtalk gtk gtk2 gtkhtml guile haskell hbci hlapi howl hpn httpd iconv icq id3 ide idled idn ieee1394 imagemagick imap imlib imlib2 inifile inkjar innodb inode insecure-drivers iodbc iproute2 irc irda irssi jabber jack jai jasper java java-external javamail javascript jbig jikes jimi jms jmx joystick jp2 jpeg jpeg2k junit jython kakasi kaspersky kde kdeenablefinal kerberos kig-scripting krb4 lame lapack latex lcms ldap libcaca libclamav libg++ libgda libsamplerate libvisual libwww lingerd live lj lmtp logitech-mouse logrotate lua lzo lzw mad maildir mailwrapper math matroska max-idx-128 mbox mbrola mcal mcve mdb mecab memlimit mgetty mhash migemo mikmod mime ming mjpeg mmap mng mod_python modelock motif mozcalendar mozdevelop mozilla mozsha1 mozxmlterm mp3 mp4live mpeg mpeg2 mpeg4 mpi mplayer mpm-loader mpm-prefork msn msnextras mssql mule multipath muse musepack musicbrainz mysql nagios-dns nagios-game nagios-ntp nagios-ping nagios-ssh nas ncurses neXt net netcdf nethack netpbm network neural nfs nis nls nntp nodrm nsplugin ntfs oav objc ocaml odbc offensive ofx ogdi ogg oggvorbis on-the-fly-crypt openal openexr opengl oscar ospfapi oss pam pango pascal passfile pcntl pcre pda pdf pdflib pdo-external pear perforce perl php player plotutils plugin png pop pop3d portaudio posix postgres povray ppds prelude pri print procmail profile pvm pwdb python qdbm qt quicktime quotes radius rdesktop readline realms rhino rle rplay rrdtool rsh rss rtc ruby samba sametime sample sasl scanner screen sdl server session sftp shared sharedext shout sid silc silvercity silverxp simplexml skey skins slang slp smartcard smime smp smux sndfile snmp soap sockets socks5 softquota source sox spamassassin speedo speex spell spf spl sql sqlite sqlite3 srp srs ssl standalone startup-notification stream stroke subtitles subversion svg swat sylpheed syslog sysvipc szip t1lib tagwriting tcltk tcp-zebra tcpd tcpmd5 test tetex tga theora thesaurus threads thumbnail tidy tiff tlen tokenizer toolbar tools translator truetype truetype-fonts type1-fonts udev udpfromto uim underscores unicode ups urandom usb user-homedirs utf8 uudeview v4l vcd vda vdesktop vidix vim virtual-users vis visualization vlm vmdbmysql vorbis vpopmail wddx web webdav winbind withsamplescripts wma wmf wordexp wordperfect wxgtk1 wxwindows xaa xanim xattr xbase xchat xchatdccserver xcomposite xemacs xface xgetdefault xim xine xinetd xlockrc xml xml2 xmlreader xmlrpc xmms xosd xpm xprint xrandr xscreensaver xsl xv xvid yahoo yaz yv12 zeroconf zip zlib zvbi elibc_glibc kernel_linux linguas_english userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS
Comment 1 Markus Ullmann (RETIRED) gentoo-dev 2006-02-04 03:40:46 UTC
Does ntop 3.1 work for you? There had been some internal rewrites in 3.2
Comment 2 Jason Wever (RETIRED) gentoo-dev 2006-02-04 07:37:30 UTC
ntop-3.2 had built fine for me on multiple boxes, but not 3.2-r1
Comment 3 Peter Volkov (RETIRED) gentoo-dev 2006-02-05 13:54:03 UTC
Created attachment 78971 [details, diff]
Patch for snmpPlugin.c to fix USE="-ipv6 snmp" compilation problem.

Bug is reproduceable with both snmp and -ipv6 in USE flags. snmpPlugin.c does not have necessary #ifdef INET6 ... #endif blocks around Ip6Address part of structure.

I can suggest two possible solutions: 
1. Apply attached here patch. But this is quick fix not coming from upstream. Although it works for me I need somebody to try it first. You need also apply comming in next comment, as it is not possible to compile both ntop with ipv6 flag and net-snmp without ipv6 flag, and reverse.
2. May be we should drop snmp support without ipv6 in USE flags and report upstream about problem. I can fix ebuild to disable snmp support if we do not have ipv6 in use flags.
Comment 4 Peter Volkov (RETIRED) gentoo-dev 2006-02-05 13:56:35 UTC
Created attachment 78972 [details, diff]
Patch for ntop-3.2-r1.ebuild to enable snmpPlugin.patch.


So what is better solution here?
Comment 5 Marcelo Goes (RETIRED) gentoo-dev 2006-02-05 14:12:27 UTC
With regard to the second solution, if you go that route: instead of dropping the snmp flag if -ipv6 is set, you should make the ebuild fail so that the user knows what is going on. Something of this sort would be more appropriate:

pkg_setup() {
 if (! use ipv6 && use snmp ); then
  eerror "snmp without ipv6 is broken"
  die "snmp without ipv6 is broken"
 fi
}
Comment 6 Peter Volkov (RETIRED) gentoo-dev 2006-02-07 14:02:10 UTC
Upstream states that snmpPlugin is under development and it is not good to use on production server. There is lack of documentation about it also. Thus I see no reasons to fix sources now. I've reported about problem upstream so may be next versions of ntop will not have such problem.

For now... ntop-3.2-r1.ebuild fixed.

Thanks for reporting.