Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 137053 - net-analyzer/nam-1.11 fails to build with gcc-4.1.1
Summary: net-analyzer/nam-1.11 fails to build with gcc-4.1.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL: http://mailman.isi.edu/pipermail/ns-u...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-17 00:54 UTC by P Purkayastha
Modified: 2006-08-01 16:24 UTC (History)
1 user (show)

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


Attachments
gcc4 patch for nam-1.11 (nam-1.11-gcc4.patch,1.39 KB, patch)
2006-06-17 00:57 UTC, P Purkayastha
Details | Diff
New ebuild which uses the gcc4 patch (nam-1.11.ebuild,1.87 KB, text/plain)
2006-06-17 01:03 UTC, P Purkayastha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description P Purkayastha 2006-06-17 00:54:41 UTC
emerge of net-analyzer/nam-1.11 fails with gcc-4.1.1. Here are the steps I followed:

1. emerge -av nam

2. The relevant error message is posted below:

rm -f netview.o; i686-pc-linux-gnu-g++ -o netview.o -c  -DTCL_TK  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_9 -DHAVE_OTCL_H -DHAVE_LIBTCLDBG -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H -DHAVE_LIBZ1_1_4 -DHAVE_ZLIB_H  -I. -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include  netview.cc
rm -f netmodel.o; i686-pc-linux-gnu-g++ -o netmodel.o -c  -DTCL_TK  -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_9 -DHAVE_OTCL_H -DHAVE_LIBTCLDBG -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H -DHAVE_LIBZ1_1_4 -DHAVE_ZLIB_H  -I. -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include  netmodel.cc
parser.h:97: error: extra qualification 'ParseTable::' on member 'nam4wpan'
parser.h:98: error: extra qualification 'ParseTable::' on member 'wpan_bradius'
node.h:226: error: extra qualification 'Node::' on member 'getTclScriptLabel'
make: *** [netview.o] Error 1
make: *** Waiting for unfinished jobs....
parser.h:97: error: extra qualification 'ParseTable::' on member 'nam4wpan'
parser.h:98: error: extra qualification 'ParseTable::' on member 'wpan_bradius'
node.h:226: error: extra qualification 'Node::' on member 'getTclScriptLabel'
make: *** [netmodel.o] Error 1

!!! ERROR: net-analyzer/nam-1.11 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  nam-1.11.ebuild, line 60:   Called die

!!! (no error message)
!!! If you need support, post the topmost build error, and the call stack if relevant.


Possible solution to this problem:
1. Patch the files nam-1.11/netgraph.h, nam-1.11/node.h, nam-1.11/parser.h as shown in the attachment and as mentioned in the url:
http://mailman.isi.edu/pipermail/ns-users/2006-May/055731.html

2. Patch the ebuild to include the gcc4 patch.

3. emerge -av nam.  It now successfully compiles and runs.

My emerge --info:
Portage 2.1 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.16-gentoo-r9 i686)
=================================================================
System uname: 2.6.16-gentoo-r9 i686 AMD Athlon(tm) XP 3200+
Gentoo Base System version 1.6.14
ccache version 2.3 [enabled]
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
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-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe -mmmx -msse -m3dnow -fforce-addr -ftracer -frename-registers"
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 /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/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe -mmmx -msse -m3dnow -fforce-addr -ftracer -frename-registers -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu ftp://gentoo.ccccom.com ftp://gentoo.mirrors.pair.com ftp://ftp.ndlug.nd.edu/pub/gentoo http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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 X acl alsa apache2 apm avi bash-completion berkdb bitmap-fonts bzip2 bzlib cairo cdr cli crypt curl curlwrappers dri dvd dvdr encode fam flac foomaticdb gdbm gif glitz gpm gtk gtk2 imap imlib isdnlog jpeg jpeg2k kdehiddenvisibility ldap lesstif libg++ libwww mad mikmod mmx mmx2 motif mp3 mpeg ncurses nls nptl nptlonly ogg opengl oss pam pcre pdflib perl pic png pppd python qt quicktime readline reflection sdl session spl sse ssl tcpd tetex tiff truetype truetype-fonts type1-fonts udev vorbis xml xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 P Purkayastha 2006-06-17 00:57:22 UTC
Created attachment 89364 [details, diff]
gcc4 patch for nam-1.11

Patch for nam-1.11. It modifies nam-1.11/netgraph.h, nam-1.11/node.h, nam-1.11/parser.h
Comment 2 P Purkayastha 2006-06-17 01:03:04 UTC
Created attachment 89365 [details]
New ebuild which uses the gcc4 patch

New ebuild which applies the gcc4 patch.  The only modification to the ebuild currently in portage is on lines 48,49.  Provided below is the diff of the two ebuilds:

diff -u /usr/portage/net-analyzer/nam/nam-1.11.ebuild ./nam-1.11.ebuild
--- /usr/portage/net-analyzer/nam/nam-1.11.ebuild	2006-01-22 10:09:38.000000000 -0500
+++ ./nam-1.11.ebuild	2006-06-17 04:02:44.000000000 -0400
@@ -45,6 +45,8 @@
 src_unpack() {
 	unpack ${MY_P}.tar.gz
 	EPATCH_OPTS="-d ${S} -p0" epatch ${DISTDIR}/${P}.patch
+	cd ${S}
+	epatch ${FILESDIR}/${P}-gcc4.patch
 }
 
 src_compile() {
Comment 3 Danny van Dyk (RETIRED) gentoo-dev 2006-06-17 11:05:30 UTC
Robin: please comment on applying the attached patch.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-06-17 17:22:25 UTC
no objections, I'll get to applying it in a bit if you don't beat me to it.
Comment 5 Marcelo Goes (RETIRED) gentoo-dev 2006-08-01 16:24:57 UTC
Thanks, added gcc 4 patch to 1.11.