on emerge i get this error: i686-pc-linux-gnu-g++ -c -O5 -march=athlon-tbird -funroll-loops -fomit-frame-pointer -pipe -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_8 -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 -o apps/sctp_app1.o apps/sctp_app1.cc sctp/sctp.cc: In destructor `virtual SctpAgent::~SctpAgent()': sctp/sctp.cc:154: error: ISO C++ forbids cast to non-reference type used as lvalue i686-pc-linux-gnu-g++ -c -O5 -march=athlon-tbird -funroll-loops -fomit-frame-pointer -pipe -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_8 -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 -o sctp/sctp-timestamp.o sctp/sctp-timestamp.cc make: *** [sctp/sctp.o] Error 1 make: *** Waiting for unfinished jobs.... !!! ERROR: net-analyzer/ns-2.27-r1 failed. !!! Function src_compile, Line 46, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. Reproducible: Always Steps to Reproduce: Portage 2.0.51-r2 (default-linux/x86/2004.2, gcc-3.4.2, glibc-2.3.4.20041021-r0, 2.6.9 i686) ================================================================= System uname: 2.6.9 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.6.5 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/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O5 -march=athlon-tbird -funroll-loops -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /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="-O5 -march=athlon-tbird -funroll-loops -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X acl alsa apm avi berkdb bitmap-fonts cdr cjk crypt cups eds encode f77 faad fam flac foomaticdb gdbm gif gnome gpm gstreamer gtk gtk2 guile hal imagemagick imlib ipv6 java jpeg libg++ libwww mad mikmod mmx motif mozilla mpeg ncurses nls oggvorbis opengl pam pda pdflib perl png python quicktime readline samba sdl slang speex spell ssl svga tcltk tcpd tetex tiff truetype unicode x86 xinerama xml2 xv xvid zlib"
Created attachment 43827 [details, diff] Fixes sctp error This should fix correctly that bug, even if epatch doesn't use it...maybe an error on the patch file (it's the first i write by myself lol). However there are other errors during building that still remains. Precisely in the file: webcache/webtraf.cc, line 415. Take a look please. I NEED NS! :
Created attachment 43827 [details, diff] Fixes sctp error This should fix correctly that bug, even if epatch doesn't use it...maybe an error on the patch file (it's the first i write by myself lol). However there are other errors during building that still remains. Precisely in the file: webcache/webtraf.cc, line 415. Take a look please. I NEED NS! :°
i686-pc-linux-gnu-g++ -c -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_8 -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 -o webcache/webtraf.o webcache/webtraf.cc webcache/webtraf.cc: In member function `virtual int WebTrafPool::command(int, const char* const*)': webcache/webtraf.cc:415: error: ISO C++ forbids initialization in array new make: *** [webcache/webtraf.o] Error 1 This is the bug that still remains...
FINALLY I DID IT!!!! on webcache/webtraf.cc: #include "config.h" #include <tclcl.h> #include <iostream> + #include <vector> <- including this ... } else if (strcmp(argv[1], "set-num-server") == 0) { nServer_ = atoi(argv[2]); if (server_ != NULL) delete []server_; std::vector<WebServer> server_(nServer_, this); // GCC 3.4.X COMPATIBLE //server_ = new WebServer[nServer_] (this); // ERROR return (TCL_OK); I'll try to make the patch!
Created attachment 43867 [details, diff] Fixes webtraf.cc error I made patches, now could someone tell me why emerge gives this message? >>> Unpacking ns-src-2.27.tar.gz to /var/tmp/portage/ns-2.27-r2/work /usr/local/portage/net-analyzer/ns/ns-2.27-r2.ebuild: line 27: epatch: command not found /usr/local/portage/net-analyzer/ns/ns-2.27-r2.ebuild: line 28: epatch: command not found However now ns builds...PLEASE add this fixed version to the portage tree
Created attachment 43868 [details, diff] Fixes webtraf.cc error
ns-2.27 code it's TOTALLY uncompatible with gcc 3.4 branch!!! New issue: i686-pc-linux-gnu-g++ -c -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_8 -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 -o linkstate/ls.o linkstate/ls.cc In file included from linkstate/ls.cc:42: linkstate/ls.h: In member function `void LsList<_Tp>::eraseAll()': linkstate/ls.h:89: error: there are no arguments to `begin' that depend on a template parameter, so a declaration of `begin' must be available linkstate/ls.h:89: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) linkstate/ls.h:89: error: there are no arguments to `end' that depend on a template parameter, so a declaration of `end' must be available linkstate/ls.h: In member function `void LsMap<Key, T>::eraseAll()': linkstate/ls.h:112: error: there are no arguments to `begin' that depend on a template parameter, so a declaration of `begin' must be available linkstate/ls.h:112: error: there are no arguments to `end' that depend on a template parameter, so a declaration of `end' must be available make: *** [linkstate/ls.o] Error 1 I'm going away for a week...please look at this. I need ns :(
Created attachment 46293 [details, diff] GCC-3.4 Patch for ns-2.27 Found this on ns mailing list. From: Qihe Wang <qwang@ececs.uc.edu> To: ns-users@ISI.EDU Subject: [ns] ns2.27-gcc34 patch Date: Thu, 16 Dec 2004 09:20:18 -0500 (EST) (15:20 CET) Hi, This patch is mostly based on Mathieu Robin's post on Dec.8. I corrected something about WebTraffic and added a small patch to enable it to compile under Solaris x86. Just think it might be convenient for some people. http://www.ececs.uc.edu/~cdmc/ucbt/src/ns227-gcc34.patch md5sum ac94ed69a899ac45f56c4d4b21e547f4 How to apply, 1. get a fresh ns-allinone-2.27.tgz 2. tar zxvf ns-allinone-2.27.tgz 3. patch -p0 < ns227-gcc34.patch 4. cd ns-allinone-2.27 5. ./install These assume GNU versions of tar and patch. Regards, Qihe
Are you up to modifing the ebuild to achieve this?
Created attachment 48547 [details, diff] Patch for compatibility with gcc 3.4
Created attachment 48548 [details] Added patching of 2.27 source for gcc 3.4 compatibility to ebuild This ebuild and the ns-2.27-gcc34.path allow compilation of ns 2.27 with gcc 3.4. The patch is based on the patch attached by kenzelma@stud.uni-frankfurt.de, but had to modify it to remove code changes to nam and tclcl also included Buils correctly and works (apparently) correctly, but I experience problems trying to build with USE doc.
Fixed. Thanks very much for the report.