Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
09-05-2014, 09:37 AM
|
#1
|
LQ Newbie
Registered: Sep 2014
Posts: 8
Rep: 
|
GPSR on ns2.35
Hi
I was trying to patch the GPSR coding to ns2.35 using keliu version. I followed the steps mention in keliu's readme file. And when I try to make ns2.35 I got following output
Code:
21:35:22 **** Incremental Build of configuration Default for project ns-2.35 ****
make all
g++ -c -O2 -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_14 -DHAVE_OTCL_H -DHAVE_LIBTK8_5 -DHAVE_TK_H -DHAVE_LIBTCL8_5 -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I. -I/home/nadeendra/workplace/ns-allinone-2.35/tclcl-1.20 -I/home/nadeendra/workplace/ns-allinone-2.35/otcl-1.14 -I/home/nadeendra/workplace/ns-allinone-2.35/include -I/home/nadeendra/workplace/ns-allinone-2.35/include -I/home/nadeendra/workplace/ns-allinone-2.35/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./satellite -I./wpan -o common/packet.o common/packet.cc
common/packet.cc:44:16: error: conflicting declaration ‘char** p_info::name_’
char** p_info::name_;
^
In file included from common/packet.cc:40:0:
common/packet.h:277:15: error: ‘p_info::name_’ has a previous declaration as ‘char* p_info::name_ [59]’
static char* name_[PT_NTYPE+1];
^
common/packet.cc:44:16: error: declaration of ‘char* p_info::name_ [59]’ outside of class is not definition [-fpermissive]
char** p_info::name_;
^
common/packet.cc:45:22: error: ‘unsigned int p_info::nPkt_’ is not a static member of ‘class p_info’
unsigned int p_info::nPkt_ = 0;
^
common/packet.cc:46:1: error: ‘PacketClassifier’ does not name a type
PacketClassifier *p_info::pc_ = 0;
^
common/packet.cc:48:33: error: no ‘int p_info::addPacket(char*)’ member function declared in class ‘p_info’
int p_info::addPacket(char *name)
^
In file included from common/packet.cc:40:0:
common/packet.cc: In member function ‘virtual void CommonHeaderClass::export_offsets()’:
common/packet.cc:131:42: error: cast from ‘packet_t*’ to ‘int’ loses precision [-fpermissive]
field_offset("ptype_", OFFSET(hdr_cmn, ptype_));
^
common/packet.h:294:50: note: in definition of macro ‘OFFSET’
#define OFFSET(type, field) ((int) &((type *)0)->field)
^
common/packet.cc:132:41: error: cast from ‘int*’ to ‘int’ loses precision [-fpermissive]
field_offset("size_", OFFSET(hdr_cmn, size_));
^
common/packet.h:294:50: note: in definition of macro ‘OFFSET’
#define OFFSET(type, field) ((int) &((type *)0)->field)
^
common/packet.cc:133:40: error: cast from ‘int*’ to ‘int’ loses precision [-fpermissive]
field_offset("uid_", OFFSET(hdr_cmn, uid_));
^
common/packet.h:294:50: note: in definition of macro ‘OFFSET’
#define OFFSET(type, field) ((int) &((type *)0)->field)
^
common/packet.cc:134:42: error: cast from ‘int*’ to ‘int’ loses precision [-fpermissive]
field_offset("error_", OFFSET(hdr_cmn, error_));
^
common/packet.h:294:50: note: in definition of macro ‘OFFSET’
#define OFFSET(type, field) ((int) &((type *)0)->field)
^
make: *** [common/packet.o] Error 1
21:35:26 Build Finished (took 4s.30ms)
I'm working in fedora 19, I successfully installed the ns2.35 before patching it, how ever I replace the packet.h header file with the one provided in the keliu's code as instructed and also delete packet.o file before making it.
I'm new to this and I really need to sort it out because it related with my academic work 
|
|
|
09-05-2014, 12:40 PM
|
#2
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
There is a "GPSR-KeLiu" for ns-2.34 .
First thing to do is to use that ns-2.34 : gpsr-KeLiu-patched-ns234.tar.gz
→ https://drive.google.com/file/d/0B7S...it?usp=sharing
→
$ cd ns-allinone-2.34/
$ tar xvf gpsr-KeLiu-patched-ns234.tar.gz
$ export CC=gcc34 CXX=g++34 && ./install
.... then you can later find out if you can port GPSR-KeLiu to ns-2.35 .
Note : You can have as many versions of ns-allinone as you want,
installed at the same time. But: Do not add any PATH text to .bashrc .
Conclusion : You can very well do with ns-2.34 for GPSR-KeLiu.
GPSR-keliu info http://www.linuxquestions.org/questi...gs/gpsr-keliu/
GPSR-hls http://www.linuxquestions.org/questions/tags/gpsr-hls/
-
|
|
|
09-05-2014, 01:25 PM
|
#3
|
LQ Newbie
Registered: Sep 2014
Posts: 8
Original Poster
Rep: 
|
Quote:
Originally Posted by knudfl
There is a "GPSR-KeLiu" for ns-2.34 .
First thing to do is to use that ns-2.34 : gpsr-KeLiu-patched-ns234.tar.gz
→ https://drive.google.com/file/d/0B7S...it?usp=sharing
→
$ cd ns-allinone-2.34/
$ tar xvf gpsr-KeLiu-patched-ns234.tar.gz
$ export CC=gcc34 CXX=g++34 && ./install
.... then you can later find out if you can port GPSR-KeLiu to ns-2.35 .
-
|
I tried this but when executing
Code:
$ export CC=gcc34 CXX=g++34 && ./install
It says there is no ./install file.
then I try $ make and it give following output
Code:
$ make
g++ -c -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I. -I/home/gaurika/ns-allinone-2.34/tclcl-1.19 -I/home/gaurika/ns-allinone-2.34/otcl -I/home/gaurika/ns-allinone-2.34/include -I/home/gaurika/ns-allinone-2.34/include -I/home/gaurika/ns-allinone-2.34/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./satellite -I./wpan -o tools/random.o tools/random.cc
In file included from tools/random.cc:40:0:
./config.h:60:19: fatal error: tclcl.h: No such file or directory
#include <tclcl.h>
^
compilation terminated.
make: *** [tools/random.o] Error 1
when I install ns2.35 I add PATH variable and some other variable to bash_profile file will that affect to ns2.34 ?
|
|
|
09-05-2014, 01:32 PM
|
#4
|
LQ Newbie
Registered: Sep 2014
Posts: 8
Original Poster
Rep: 
|
Dear knudfl,
there is a file named "instal-sh" but it require some input. should I run it ? what is the input I need to give ?
|
|
|
09-05-2014, 01:50 PM
|
#5
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
Ref. #3 .
Quote:
when I install ns2.35 I add PATH
|
See #2 : No reason to add any *PATH text at all.
It's just an old (1999) text, to add when the University computer is used,
.. and you have no write permissions to /usr/local/bin/.
Your computer : $ cd ns-2.xx/ ; # make install
.. When you have more than one version, please use a copy of ns to a different name:
$ cd ns-2.xx/
$ cp ns ns-keliu
# cp ns-keliu /usr/local/bin/
.. Simulation : $ cd ns-2.34/gpsr/ && ns-keliu gpsr.tcl
More examples : GPSR-KeLiu-examples_0614.tar.gz
→ https://drive.google.com/file/d/0B7S...it?usp=sharing
Quote:
I tried this but when executing
$ export CC=gcc34 CXX=g++34 && ./install
It says there is no ./install file.
|
Can happen only when your location is {the wrong directory}.
I.e. a folder with no file by name `install´.
Deciding your location : $ pwd
The ns234 build goes like :
$ tar xvf ns-allinone-2.34.tar.gz
$ cd ns-allinone-2.34/
$ tar xvf gpsr-KeLiu-patched-ns234.tar.gz
$ pwd
$ export CC=gcc34 CXX=g++34 && ./install
Prerequisites, ns2 : # yum install \
gcc-c++ compat-gcc-34-c++ make automake autoconf libtool patch libXmu-devel
-
|
|
1 members found this post helpful.
|
09-06-2014, 12:46 AM
|
#6
|
LQ Newbie
Registered: Sep 2014
Posts: 8
Original Poster
Rep: 
|
dear knudfl,
Quote:
Can happen only when your location is {the wrong directory}.
I.e. a folder with no file by name `install´.
Deciding your location : $ pwd
The ns234 build goes like :
$ tar xvf ns-allinone-2.34.tar.gz
$ cd ns-allinone-2.34/
$ tar xvf gpsr-KeLiu-patched-ns234.tar.gz
$ pwd
$ export CC=gcc34 CXX=g++34 && ./install
Prerequisites, ns2 : # yum install \
gcc-c++ compat-gcc-34-c++ make automake autoconf libtool patch libXmu-devel
|
I follow the instructions as it is and also installed all the prerequisites. But when I ./install it give this error
Code:
i386 architecture of input file `common/main-monolithic.o' is incompatible with i386:x86-64 output
collect2: ld returned 1 exit status
make: *** [ns] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
my system
Code:
cat fedora-release
Fedora release 19 (Schrödinger’s Cat)
I download the ns2.34 from http://sourceforge.net/projects/nsna...allinone-2.34/
Is this because I use 64bit version ? how can I overcome this
|
|
|
09-06-2014, 03:31 AM
|
#7
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
← #6 .
Don't know how you got the faulty object `common/main-monolithic.o´.
But usually you will have to use a 32bits OS for ns2.
You can read through all posts http://www.linuxquestions.org/questi...gs/gpsr-keliu/
.. to see if anybody succeeded by using a 64bits OS for GPSR-KeLiu.
Also : You can try again in the default build folder :
/home/<name>/ns2/ . And ! Do not use root.
No root commands →
Except for 'make install' or other {write to /usr/local/} commands.
-
Last edited by knudfl; 09-06-2014 at 03:35 AM.
|
|
|
09-06-2014, 05:37 AM
|
#8
|
LQ Newbie
Registered: Sep 2014
Posts: 8
Original Poster
Rep: 
|
Quote:
Originally Posted by knudfl
← #6 .
Don't know how you got the faulty object `common/main-monolithic.o´.
But usually you will have to use a 32bits OS for ns2.
You can read through all posts http://www.linuxquestions.org/questi...gs/gpsr-keliu/
.. to see if anybody succeeded by using a 64bits OS for GPSR-KeLiu.
Also : You can try again in the default build folder :
/home/<name>/ns2/ . And ! Do not use root.
No root commands →
Except for 'make install' or other {write to /usr/local/} commands.
-
|
I tried again with ubuntu 14.04 LTS 32bit it worked 
|
|
|
07-17-2015, 11:59 PM
|
#9
|
Member
Registered: Aug 2012
Posts: 50
Rep: 
|
GPSR patch for ns-2.32
Is there any GPSR patch available for ns-2.32.
Kindly provide me the link
thanks for ur help.
rgds
sims
|
|
|
07-18-2015, 05:43 AM
|
#10
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
Post #9, @sims2801.
GPSR-hls ? ( Or GPSR-Ke-Liu ? )
GPSR-hls : Not easy to do with ns-2.32 . But why ns-2.32 ?
? Which other patch is it that makes ns-2.32 required ?
Note : You can have as many times ns-allinone-2.xx as you want,
installed at the same time : But do never add any *PATH text to .bashrc.
-
Last edited by knudfl; 07-18-2015 at 01:15 PM.
|
|
|
07-18-2015, 05:49 AM
|
#11
|
Member
Registered: Aug 2012
Posts: 50
Rep: 
|
Gpsr ke liu patch
Actually I have lar for ns2.32 .so I want for ns2.32
Is there a LAR patch for ns2.34
Thanks
|
|
|
07-19-2015, 10:39 PM
|
#13
|
Member
Registered: Aug 2012
Posts: 50
Rep: 
|
Thanks for ur reply .
i didnt get the difference between 2 and 3 .
Should i use 2 or 3
In ns2.32 , i have already patched LAR.
rgds
sims
|
|
|
07-20-2015, 03:22 AM
|
#14
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
Re #13.
Post #12 is also intended to be general information.
Add 2) : Is for GPSR only.
Add 3) : Is when you already patched with LAR.
* I.e. you are supposed to use "GPSR-KeLiu_for-LAR-patched_ns232.patch" :
$ cd ns-allinone-2.32/ && patch -p0 < GPSR-KeLiu_for-LAR-patched_ns232.patch
-
|
|
|
07-30-2015, 02:24 AM
|
#15
|
Member
Registered: Aug 2012
Posts: 50
Rep: 
|
I successfully patched GPSR ke-liu on ns2.32
when i am running the wireless-gpsr.tcl with cbr-150 and a scenario fle . after some time it shows the process killed .
I am running the file for 1000 sec time . after 650 sec approx , it gives the message Killed.
I checked for the space , it is showing Free space as 76GB.
I also run it on my hard disk where the free space is approx to 242 GB. Again there was the same error.
How can i proceed further.
plz help
|
|
|
All times are GMT -5. The time now is 10:57 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|