Linux - SoftwareThis 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.
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.
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
Distribution: PCLinuxOS2023 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,486
Rep:
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.
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 .
Distribution: PCLinuxOS2023 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,486
Rep:
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
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
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
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
Distribution: PCLinuxOS2023 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,486
Rep:
← #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.
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
Distribution: PCLinuxOS2023 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,486
Rep:
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.