Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 156178 - <net-analyzer/net-snmp-5.4 fails to build
Summary: <net-analyzer/net-snmp-5.4 fails to build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
: 160250 160899 161246 161314 161919 163168 163719 164380 (view as bug list)
Depends on: 163094
Blocks:
  Show dependency tree
 
Reported: 2006-11-24 22:09 UTC by Kenton Groombridge
Modified: 2007-03-13 19:53 UTC (History)
12 users (show)

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


Attachments
net-snmp-defined.patch (net-snmp.patch,3.94 KB, patch)
2007-01-10 13:21 UTC, Jaco Kroon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenton Groombridge 2006-11-24 22:09:46 UTC
I just did a emerge -e world, and out of 652 packages this was the only one that failed.  I also tried very conservative CFLAGS (CFLAGS="-O2 -march=athlon-xp -mtune=athlon-xp -pipe"), but kept getting the same error.

/bin/sh ../../libtool  --mode=compile i686-pc-linux-gnu-gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib   -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm  -I/usr/lib/perl5/5.8.8/i686-linux/CORE   -O3 -march=athlon-xp -mtune=athlon-xp -pipe -Dlinux  -c -o ucd-snmp/disk.lo ucd-snmp/disk.c
rm -f ucd-snmp/.libs/disk.lo
i686-pc-linux-gnu-gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib/perl5/5.8.8/i686-linux/CORE -O3 -march=athlon-xp -mtune=athlon-xp -pipe -Dlinux -c ucd-snmp/disk.c  -fPIC -DPIC -o ucd-snmp/.libs/disk.lo
ucd-snmp/disk.c:232:36: error: operator '||' has no right operand
ucd-snmp/disk.c:299:36: error: operator '||' has no right operand
ucd-snmp/disk.c:431:19: error: #if with no expression
ucd-snmp/disk.c:454:36: error: operator '||' has no right operand
ucd-snmp/disk.c:525:19: error: #if with no expression
ucd-snmp/disk.c:551:36: error: operator '||' has no right operand
make[2]: *** [ucd-snmp/disk.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/net-analyzer/net-snmp-5.3.1-r1/work/net-snmp-5.3.1/agent/mibgroup'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-analyzer/net-snmp-5.3.1-r1/work/net-snmp-5.3.1/agent'
make: *** [subdirs] Error 1

!!! ERROR: net-analyzer/net-snmp-5.3.1-r1 failed.
Call stack:
  ebuild.sh, line 1568:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  net-snmp-5.3.1-r1.ebuild, line 113:   Called die

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



emerge --info
Portage 2.1.2_rc2-r1 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.5-r0, 2.6.18-ck1-r2 i686)
=================================================================
System uname: 2.6.18-ck1-r2 i686 AMD Athlon(tm)
Gentoo Base System version 1.12.6
Last Sync: Fri, 24 Nov 2006 15:30:01 +0000
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp -mtune=athlon-xp -pipe -fomit-frame-pointer -mmmx -msse -m3dnow -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O3 -march=athlon-xp -mtune=athlon-xp -pipe -fomit-frame-pointer -mmmx -msse -m3dnow -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://gentoo.kems.net/mirrors/gentoo http://gentoo.kems.net http://mirror.datapipe.net/gentoo http://ftp.club-internet.fr/pub/mirrors/gentoo ftp://mirror.datapipe.net/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=99999"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext S3TC X a52 aac acpi alsa amarok apache2 arts asf asm audiofile bash-completion berkdb bzip2 cairo cddb cdparanoia cdr cdrom cli cracklib crypt css cups curl dlloader dri dv dvd dvdr dvdread eds elibc_glibc emoticon encode fame ffmpeg firefox flac foomaticdb gdbm gif gimp glibc-omitfp glut gstreamer gtk gtk2 gzip iconv ieee1394 imagemagick imlib input_devices_evdev input_devices_keyboard iproute2 isdnlog jack java javascript joystick jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kernel_linux lame libwww live logitech-mouse lzo mad mikmod mjpeg mmx mmxext motif mozsvg mp3 mpeg mpeg2 mplayer musicbrainz ncurses network nforce2 nls nntp no-old-linux nomalloccheck nptl nptlonly nsplugin nspr nvidia ogg openal opengl pam pcre pdf perl physfs png python qt3 qt4 quicktime readline real reflection rtc samba scanner sdl spell sse ssl subtitles svg sysfs tcpd theora threadsafe tiff transcode truetype truetype-fonts type1 type1-fonts udev unicode urandom usb userland_GNU userlocales v4l v4l2 vcd video_cards_nvidia visualization vorbis win32codecs wmf xcomposite xine xml xorg xpm xrandr xscreensaver xv xvid xvmc zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Kevin Jordan 2006-11-25 11:13:17 UTC
I had the same problem, and oddly running it through cpp with the right include dirs made it compile.

cpp -I /var/tmp/portage/net-analyzer/net-snmp-5.3.1-r1/work/net-snmp-5.3.1/agent/mibgroup/ucd-snmp -I /var/tmp/portage/net-analyzer/net-snmp-5.3.1-r1/work/net-snmp-5.3.1/agent/mibgroup /var/tmp/portage/net-analyzer/net-snmp-5.3.1-r1/work/net-snmp-5.3.1/agent/mibgroup/ucd-snmp/disk.c > disk.c
Comment 2 Cédric Krier gentoo-dev 2006-11-26 14:00:10 UTC
Seems to be fix in version 5.4
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-01-05 05:04:15 UTC
*** Bug 160250 has been marked as a duplicate of this bug. ***
Comment 4 Andrew Ross (RETIRED) gentoo-dev 2007-01-08 01:04:14 UTC
I can confirm this error with net-snmp-5.2.1.2-r1 (latest stable version). Using net-snmp-5.4 from ~x86 worked for me.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-01-08 15:18:42 UTC
*** Bug 160899 has been marked as a duplicate of this bug. ***
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-01-10 07:32:13 UTC
*** Bug 161246 has been marked as a duplicate of this bug. ***
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2007-01-10 13:09:33 UTC
*** Bug 161314 has been marked as a duplicate of this bug. ***
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-01-10 13:10:11 UTC
Reopen; either stabilize something working (5.4) or fix this please.
Comment 9 Jaco Kroon 2007-01-10 13:21:38 UTC
Created attachment 106348 [details, diff]
net-snmp-defined.patch

This patch makes it compile for me, should apply cleanly with patch -p1, guess this should be sufficient to allow maintainer to create a -r2 and get this resolved, thanks.
Comment 10 Alexander Zubkov 2007-01-11 14:40:23 UTC
Same issue. Added mysqelf to CC.
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2007-01-13 19:15:43 UTC
*** Bug 161919 has been marked as a duplicate of this bug. ***
Comment 12 John Miller 2007-01-17 22:08:00 UTC
Same issue with 5.2.1.2-r1.

Further up in my log, specifically in the "checking for platform-specific source..." secion, I see:
checking for library containing getmntent... none required

Which might mean that the value is being ignored rather than set to 0.  Would it be better to correct that in case some other cases actually behave differently when it is set to 0?  I believe this patch would break those.

Sorry, don't know enough to suggest a different patch.
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2007-01-22 07:29:50 UTC
*** Bug 163168 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2007-01-22 07:30:45 UTC
5.4 stabilization handled in Bug 163094, closing again.
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2007-01-25 08:39:11 UTC
*** Bug 163719 has been marked as a duplicate of this bug. ***
Comment 16 Jakub Moc (RETIRED) gentoo-dev 2007-01-29 12:14:56 UTC
*** Bug 164380 has been marked as a duplicate of this bug. ***
Comment 17 Ian Stakenvicius 2007-03-13 19:53:53 UTC
It would still be nice to fix this bug in 5.2.1.2-r1 at least.  

I traced through some more of the code built a similar patch, which wraps all occurrences of HAVE_GETMNTENT, HAVE_STATFS, HAVE_STATVFS, and HAVE_SETMNTENT
with defined().  It looks like these variables are supposed to be empty (or simply #DEFINE'd), so I'm guessing the error shows up now because the newer GCCs substitute and then process the ||, whereas the older ones probably didn't (or something similar)...