Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132555 - Network Simulator (net-analyzer/ns) compilation error
Summary: Network Simulator (net-analyzer/ns) compilation error
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-07 05:32 UTC by Francesco Grieco
Modified: 2006-06-17 21:06 UTC (History)
1 user (show)

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


Attachments
patch to compile ns-2.29 against gcc-4.1.1 (ns-2.29-gcc4.patch,4.51 KB, patch)
2006-06-17 21:06 UTC, P Purkayastha
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Grieco 2006-05-07 05:32:52 UTC
I can't compile this package. These are the errors...

i686-pc-linux-gnu-g++ -c -O2 -march=pentium-m -pipe -fomit-frame-pointer -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR  -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_9 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H  -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./wpan -o queue/jobs.o queue/jobs.cc
queue/cbq.cc:112: error: ISO C++ forbids declaration of 
Comment 1 Francesco Grieco 2006-05-07 05:32:52 UTC
I can't compile this package. These are the errors...

i686-pc-linux-gnu-g++ -c -O2 -march=pentium-m -pipe -fomit-frame-pointer -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR  -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_9 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H  -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./wpan -o queue/jobs.o queue/jobs.cc
queue/cbq.cc:112: error: ISO C++ forbids declaration of CBQueue with no type
queue/cbq.cc:112: error: expected ; before * token
queue/cbq.cc: In member function virtual int CBQueue::insert_class(CBQClass*):
queue/cbq.cc:488: error: class CBQClass has no member named cbq_
queue/cbq.cc: In constructor CBQClass::CBQClass():
queue/cbq.cc:805: error: class CBQClass does not have any field named cbq_
queue/cbq.cc: In member function virtual void CBQClass::recv(Packet*, Handler*):
queue/cbq.cc:850: error: cbq_ was not declared in this scope
queue/cbq.cc:856: error: cbq_ was not declared in this scope
queue/cbq.cc: In member function void CBQClass::update(Packet*, double):
queue/cbq.cc:873: error: cbq_ was not declared in this scope
queue/cbq.cc: In member function int CBQClass::desc_with_demand():
queue/cbq.cc:928: error: cbq_ was not declared in this scope
queue/cbq.cc: In member function void CBQClass::newallot(double):
queue/cbq.cc:975: error: cbq_ was not declared in this scope
queue/cbq.cc: In member function virtual int CBQClass::command(int, const char* const*):
queue/cbq.cc:1002: error: cbq_ was not declared in this scope
make: *** [queue/cbq.o] Error 1
make: *** Waiting for unfinished jobs....

!!! ERROR: net-analyzer/ns-2.28 failed.
Call stack:
  ebuild.sh, line 1525:   Called dyn_compile
  ebuild.sh, line 928:   Called src_compile
  ns-2.28.ebuild, line 62:   Called die

!!! (no error message)


My info:
Portage 2.1_pre10-r3 (default-linux/x86/2006.0, gcc-4.0.2, glibc-2.4-r1, 2.6.16-gentoo-r1 i686)
=================================================================
System uname: 2.6.16-gentoo-r1 i686 Genuine Intel(R) CPU           T2400  @ 1.83GHz
Gentoo Base System version 1.12.0_pre19
dev-lang/python:     2.4.2-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
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/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium-m -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.ngi.it "
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LINGUAS="it"
MAKEOPTS="-j3"
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-05-13 00:28:19 UTC
GCC4 error. Please submit a patch to make it work with GCC4 and reopen.
Comment 3 Francesco Grieco 2006-05-15 03:16:09 UTC
I'm not able to write a patch. Can you add to portage an ebuild for the
last ns version?It's the 2.29 and it compiles fine with gcc4.0.2. To compile i just copied the ebuild of 2.28 as 2.29 and removed the ns-gentoo and ns-gcc41 patches.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-05-15 13:50:56 UTC
2.29 in the tree now.
Comment 5 P Purkayastha 2006-06-17 21:06:10 UTC
Created attachment 89440 [details, diff]
patch to compile ns-2.29 against gcc-4.1.1

Following the directions in this url:
http://mailman.isi.edu/pipermail/ns-users/2006-April/054996.html
I was able to compile ns-2.29 successfully with gcc-4.1.1.  The attached patch is supposed to be applied *in addition* to the ns-2.28-gcc41.patch present in the files directory. 

So, the patches I applied are 
1. ns-2.29-gcc41.patch (which is just ns-2.28-gcc41.patch renamed to 2.29), and 2. the patch in the attachment.

I did not apply the ns-2.28-gentoo.diff patch.

Diff of the two ebuilds:
diff -u /usr/portage/net-analyzer/ns/ns-2.29.ebuild ./ns-2.29.ebuild                    
--- /usr/portage/net-analyzer/ns/ns-2.29.ebuild	2006-05-15 16:50:24.000000000 -0400
+++ ./ns-2.29.ebuild	2006-06-17 23:13:49.000000000 -0400
@@ -31,7 +31,8 @@
 	unpack ${A}
 	cd ${S}
 #	epatch ${FILESDIR}/${P}-gentoo.diff
-#	epatch ${FILESDIR}/${P}-gcc41.patch
+	epatch ${FILESDIR}/${P}-gcc41.patch
+	epatch ${FILESDIR}/${P}-gcc4.patch
 	sed '/$(CC)/s!-g!$(CFLAGS)!g' ${S}/indep-utils/model-gen/Makefile
 }
 


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