LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 09-05-2014, 09:37 AM   #1
nad_y
LQ Newbie
 
Registered: Sep 2014
Posts: 8

Rep: Reputation: Disabled
Unhappy 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
 
Old 09-05-2014, 12:40 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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/

-
 
Old 09-05-2014, 01:25 PM   #3
nad_y
LQ Newbie
 
Registered: Sep 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
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 ?
 
Old 09-05-2014, 01:32 PM   #4
nad_y
LQ Newbie
 
Registered: Sep 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
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 ?
 
Old 09-05-2014, 01:50 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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.
Old 09-06-2014, 12:46 AM   #6
nad_y
LQ Newbie
 
Registered: Sep 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
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)
Code:
# uname -m
x86_64
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
 
Old 09-06-2014, 03:31 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
← #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.
 
Old 09-06-2014, 05:37 AM   #8
nad_y
LQ Newbie
 
Registered: Sep 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
← #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
 
Old 07-17-2015, 11:59 PM   #9
sims2801
Member
 
Registered: Aug 2012
Posts: 50

Rep: Reputation: Disabled
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
 
Old 07-18-2015, 05:43 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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.
 
Old 07-18-2015, 05:49 AM   #11
sims2801
Member
 
Registered: Aug 2012
Posts: 50

Rep: Reputation: Disabled
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
 
Old 07-18-2015, 02:09 PM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
GPSR - KeLiu for the LAR+DREAM patched ns-2.32

Re post #11.

Patches : (1) toilers-LAR-DREAM-2.32.patch )
(2) gpsr-KeLiu_ns232.patch )
https://drive.google.com/file/d/0B7S...ew?usp=sharing

* 3) GPSR-KeLiu_for-LAR-patched_ns232.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing

Build example :
cd ns-allinone-2.32/
patch -p1 < toilers-LAR-DREAM-2.32.patch
patch -p0 < GPSR-KeLiu_for-LAR-patched_ns232.patch
export CC=gcc-4.4 CXX=g++-4.4 && ./install
cd ns-2.32/
cp ns ns232-LAR_gpsrKeLiu
sudo cp ns232-LAR_gpsrKeLiu /usr/local/bin/

Simulation :
ns232-LAR_gpsrKeLiu box-Helen.tcl : OK
ns232-LAR_gpsrKeLiu Deolasi-box.tcl : OK
ns232-LAR_gpsrKeLiu wireless-gpsr.tcl : OK

Examples :
lar+dream-examples-0714.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing
GPSR-KeLiu-examples_01.2015.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing


P.S. :
There is a LAR patch for ns234, but LAR+DREAM works best with ns232.
See http://www.linuxquestions.org/questions/tags/lar/
.. and http://network-simulator-ns-2.7690.n...=lar&sort=date


-

Last edited by knudfl; 07-18-2015 at 02:17 PM.
 
Old 07-19-2015, 10:39 PM   #13
sims2801
Member
 
Registered: Aug 2012
Posts: 50

Rep: Reputation: Disabled
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
 
Old 07-20-2015, 03:22 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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

-
 
Old 07-30-2015, 02:24 AM   #15
sims2801
Member
 
Registered: Aug 2012
Posts: 50

Rep: Reputation: Disabled
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
 
  


Reply

Tags
gpsr-keliu, lar and gpsr-keliu, ns2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] GPSR on NS2.34 farfattou Linux - Software 17 01-10-2015 08:29 AM
[SOLVED] GPSR in ns2 aidin8790 Linux - Software 36 07-05-2014 02:56 AM
problem with GPSR in ns2 aidin8790 Linux - Software 0 04-26-2014 04:50 PM
patch GPSR in NS2.34 Mednabil Linux - Wireless Networking 2 12-23-2013 06:24 PM
Code of GPSR for ns2.33 or ns2.35 monikagoyal Linux - Software 31 04-26-2013 12:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration