Issue with NS2.34 with BGP patch
Hello Everyone,
I'd like to use NS2 version 2.34 using the BGP patch (available at : http://www.ensc.sfu.ca/~ljilja/cnl/p...-2.34-BGP.html) I've followed the procedure but when I try to run './install' from the ns-allinone-2.34 directory I got : (...) usion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o bgp/Util/ipaddress.o bgp/Util/ipaddress.cc bgp/Util/ipaddress.cc: In constructor ‘IPaddress::IPaddress(std::string)’: bgp/Util/ipaddress.cc:164: warning: comparison between signed and unsigned integer expressions bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::bin2str(boolVector)’: bgp/Util/ipaddress.cc:280: warning: comparison between signed and unsigned integer expressions bgp/Util/ipaddress.cc:296: error: ‘sprintf’ was not declared in this scope bgp/Util/ipaddress.cc: In member function ‘boolVector IPaddress::str2bin(std::string)’: bgp/Util/ipaddress.cc:311: warning: comparison between signed and unsigned integer expressions bgp/Util/ipaddress.cc: In member function ‘int IPaddress::intval()’: bgp/Util/ipaddress.cc:421: warning: comparison between signed and unsigned integer expressions bgp/Util/ipaddress.cc: In member function ‘int IPaddress::masked_intval(int)’: bgp/Util/ipaddress.cc:581: warning: comparison between signed and unsigned integer expressions bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::val2str()’: bgp/Util/ipaddress.cc:668: error: ‘sprintf’ was not declared in this scope bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::toString()’: bgp/Util/ipaddress.cc:699: error: ‘sprintf’ was not declared in this scope make: *** [bgp/Util/ipaddress.o] Erreur 1 Ns make failed! See http://www.isi.edu/nsnam/ns/ns-problems.html for problems I've replaced #include<string.h> with #include<cstring> in the 'ipaddress.cc' but it does not work... I work with Ubuntu10.4... Can you help me ? Thanks ! TLa |
Welcome to LQ.
Ubuntu 10.04 Lucid : Probably : sudo apt-get install g++-4.3 cd ns-allinone-2.34/ && export CC=gcc-4.3 CXX=g++-4.3 && ./install 1) You may have to run 'make clean' in ns-allinone-2.34/ns-2.34/. 2) May be an even older compiler is required. The g++-3.4 from Ubuntu 8.04 Hardy can be used. .. |
Thanks knudfl it's working now ! The problem was the compiler.
Now I have written a script to use BGP I would like to emulate a network made up of 2 AS; and in each AS 5 nodes. For that I have installed the NS-2 2.34 version with the BGP patch. I created two BGP nodes like this : $ns node-config -BGP ON set n0 [$ns node 0:10.0.0.1] set n1 [$ns node 1:10.1.1.1] $ns node -config -BGP OFF And I would like to create the other nodes using the dynamic routing (LS or DV) I know that I cannot use the line : $ns rtproto DV (or LS) otherwise I will be contradictory with the begin with BGP... Do you have an advice on that issue? Is there a possibility to put locally the dynamic routing for a node or a link ? |
hello, which commands have you used to solve the BGP patch issues. thanks
|
# 4, @ lovsis
Quote:
Which OS are you using ? Name and version, please. Examples : 1) Ubuntu 10.04, 10.10 cd ns-allinone-2.34/ && tar xvf ns-2.34-bgp_2.0.tgz && patch -p0 < ns-2.34-bgp_2.0_patch && export CC=gcc-4.1 CXX=g++-4.1 && ./install 2) Ubuntu 11.04 : The "export command" is : export CC=gcc41 CXX=g++41 3) Fedora : export CC=gcc34 CXX=g++34 Simulation example : ns-allinone-2.34/ns-2.34/tcl/bgp/test/ ns drop-peer2.tcl : OK. . |
I am using ubuntu 12.04,i tried to install ns-2.34 but i am getting this error while installing..
In file included from /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tkInt.h:21:0, from /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tk3d.h:18, from /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tk3d.c:16: /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tk.h:81:23: fatal error: X11/Xlib.h: No such file or directory compilation terminated. make: *** [tk3d.o] Error 1 tk8.4.18 make failed! Exiting ... |
Post # 6, @yashwanth58 : Welcome to LQ.
This thread is about BGP only. If you are just installing a plain ns-allinone-2.34 : .... Please start a new thread : http://www.linuxquestions.org/questi...ux-software-2/ > New Thread. Prerequisites for ns2 : sudo apt-get install \ g++ g++-4.4 make automake autoconf libtool patch build-essential xgraph libxmu-dev ... And : gcc41-compat*12*, g++41-compat, post #47 here http://www.linuxquestions.org/questi...532/page4.html - |
#7 @knudfl
I want information regarding bgp only but i am not able to install ns-2.34..i have installed gcc-4.4 but i am getting this error In file included from /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tkInt.h:21:0, from /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tk3d.h:18, from /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tk3d.c:16: /home/yashwanth/ns-allinone-2.34/tk8.4.18/unix/../generic/tk.h:81:23: fatal error: X11/Xlib.h: No such file or directory compilation terminated. make: *** [tk3d.o] Error 1 tk8.4.18 make failed! Exiting ... |
# 8
No ns2 any version can be installed until you do $ sudo apt-get install libxmu-dev Did you read post # 7 : sudo apt-get install \ g++ g++-4.4 make automake autoconf libtool patch build-essential xgraph libxmu-dev And post # 5 : Code:
cd ns-allinone-2.34/ && tar xvf ns-2.34-bgp_2.0.tgz && patch -p0 < ns-2.34-bgp_2.0_patch && export CC=gcc41 CXX=g++41 && ./install |
@knudfl
yashwanth@ubuntu:~$ cd ns-allinone-2.34/ && tar xvf ns-2.34-bgp_2.0.tgz && patch -p0 < ns-2.34-bgp_2.0_patch && export CC=gcc41 CXX=g++-4.1 && ./install while doing this i am getting this patching file ns-2.34/common/node.cc Reversed (or previously applied) patch detected! Assume -R? [n] next what shall i do.. |
# 10
Quote:
You can just hit <Enter> for every "Assume -R? [n] " - |
Thanks for helping me
while installing ns-2.34 i am getting this tcl8.4.18 make succeeded. Warning: tclStubInit.c may be out of date. Developers may want to run "make genstubs" to regenerate. This warning can be safely ignored, do not report as a bug! Installing libtcl8.4.a to /home/yashwanth/ns-allinone-2.34/lib/ cp: cannot create regular file `/home/yashwanth/ns-allinone-2.34/lib/#inst.4683#': Permission denied rm: cannot remove `/home/yashwanth/ns-allinone-2.34/lib/libtcl8.4.a': Permission denied mv: cannot stat `/home/yashwanth/ns-allinone-2.34/lib/#inst.4683#': No such file or directory ranlib: could not create temporary file whilst writing archive: No more archived files make: *** [install-binaries] Error 1 tcl8.4.18 installation failed. Tcl is not part of the ns project. Please see www.Scriptics.com to see if they have a fix for your platform. yashwanth@ubuntu:~/ns-allinone-2.34$ |
previously i changed the
CC= @CC@ and change it to: CC= gcc-4.4 in .bashrc but now these lines are not there in .bashrc itself |
# 13
Quote:
export CC=gcc41 CXX=g++41 # 12 If sudo was used for any commands, you will have no access : Permission denied. Delete everything, and do : Code:
tar xvf ns-allinone-2.34.tar.gz && cd ns-allinone-2.34/ && tar xvf ns-2.34-bgp_2.0.tgz && patch -p0 < ns-2.34-bgp_2.0_patch && export CC=gcc41 CXX=g++41 && ./install |
sir,i followed all the steps above you provided..and installed ns2.34 in uduntu 12.04,while validating i got this
Running test aloha: ../../ns test-suite-satellite.tcl aloha QUIET Test output agrees with reference output Running test aloha.collisions: ../../ns test-suite-satellite.tcl aloha.collisions QUIET Test output agrees with reference output Running test mixed.legacy: ../../ns test-suite-satellite.tcl mixed.legacy QUIET Test output agrees with reference output All test output agrees with reference output. Mon Feb 18 06:05:18 IST 2013 These messages are NOT errors and can be ignored: warning: using backward compatibility mode This test is not implemented in backward compatibility mode validate overall report: some portable tests failed: ./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-manual-routing ./test-all-links some non-portable tests also failed: ./test-all-session to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME yashwanth@ubuntu:~/ns-allinone-2.34/ns-2.34$ i am using ns-2.34-bgp_2.0 patch for using bgp protocol.. > cd ~/ns-allinone-2.34/ns-2.34 > ./configure > make clean ; make while executing last step i got this error bgp/Util/ipaddress.cc: In constructor ‘IPaddress::IPaddress(std::string)’: bgp/Util/ipaddress.cc:163: warning: comparison between signed and unsigned integer expressions bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::bin2str(boolVector)’: bgp/Util/ipaddress.cc:279: warning: comparison between signed and unsigned integer expressions bgp/Util/ipaddress.cc:295: error: ‘sprintf’ was not declared in this scope bgp/Util/ipaddress.cc: In member function ‘boolVector IPaddress::str2bin(std::string)’: bgp/Util/ipaddress.cc:310: warning: comparison between signed and unsigned integer expressions bgp/Util/ipaddress.cc: In member function ‘int IPaddress::intval()’: bgp/Util/ipaddress.cc:420: warning: comparison between signed and unsigned integer expressions bgp/Util/ipaddress.cc: In member function ‘int IPaddress::masked_intval(int)’: bgp/Util/ipaddress.cc:580: warning: comparison between signed and unsigned integer expressions bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::val2str()’: bgp/Util/ipaddress.cc:667: error: ‘sprintf’ was not declared in this scope bgp/Util/ipaddress.cc: In member function ‘std::string IPaddress::toString()’: bgp/Util/ipaddress.cc:698: error: ‘sprintf’ was not declared in this scope make: *** [bgp/Util/ipaddress.o] Error 1 yashwanth@ubuntu:~/ns-allinone-2.34/ns-2.34$ i did this also udo apt-get install \ > g++ g++-4.4 make automake autoconf libtool patch build-essential xgraph libxmu-dev but i checked gcc version through this gcc -v yashwanth@ubuntu:~$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper Target: i686-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) i am not able to run the bgp configured tcl file...please help me out.. |
All times are GMT -5. The time now is 11:02 PM. |