LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-28-2013, 12:21 AM   #1
en.khalid82
Member
 
Registered: Apr 2013
Posts: 61

Rep: Reputation: Disabled
How to implement GPRS routing protocol in ns 2.33


Dear friends, I tried to implement GPRS in ns 2.33 & ubuntu linux 10.10 with the following commannds

cd ns-allinone-2.33/
cd ns-2.33/
patch -p1 < ns-2.33-hls.patch
tar xvf hls-files-ns233.tar.gz
cd ../
./install

But the following errors appeared

common/packet.h:391: error: ‘PT_LOCS’ was not declared in this scope
common/packet.h:394: error: ‘PT_HLS’ was not declared in this scope
common/packet.h:397: error: ‘PT_GPSR’ was not declared in this scope
common/packet.h:400: warning: deprecated conversion from string constant to ‘char*’
common/scheduler.cc: In member function ‘virtual int Scheduler::command(int, const char* const*)’:
common/scheduler.cc:216: warning: deprecated conversion from string constant to ‘char*’
make: *** [common/scheduler.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
khalid@khalid-linux:~/ns-allinone-2.33$

Please, anyone may help me to avoid this problem.

Thanks
 
Old 11-30-2013, 01:20 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
patch -p1 < ns-2.33-hls.patch
This is GPSR , not GPRS.
 
Old 11-30-2013, 02:30 AM   #3
en.khalid82
Member
 
Registered: Apr 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
Sorry for this mistake Mr.knudfl, yes GPSR not GPRS. May you help me about how can I avoid this problem and incorporate GPSR in ns 2.33.

Thanks
 
Old 11-30-2013, 09:56 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
#1 + #3 .
Quote:
cd ns-allinone-2.33/
cd ns-2.33/
patch -p1 < ns-2.33-hls.patch
tar xvf hls-files-ns233.tar.gz
cd ../
./install
In Ubuntu 10.10, you will have to handle the `./install' command this way :
$ export CC=gcc-4.1 CXX=g++-4.1 && ./install

You will of course have to install compilers version 4.1.2 :
$ sudo apt-get install g++-4.1

-

Last edited by knudfl; 11-30-2013 at 10:57 PM.
 
Old 11-30-2013, 11:06 AM   #5
en.khalid82
Member
 
Registered: Apr 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
How to implement GPSR in ns 2.33 & ubuntu linux 10.10

[QUOTE=knudfl;5072982]#1 + #3 .

In Ubuntu 10.10, you will have to handle the `./install' command this way :
$ export CC=gcc-4.1 CXX=g++-4.1 && .install

You will of course have to install compilers version 4.1.2 :
$ sudo apt-get install g++-4

Dear Mr.Knudfl, I tried to install tyhe compilers version 4.1.2 but the following error appeared. May you help me about how can I override this error.

bash: :/usr/X11R6/lib:/usr/local/lib: No such file or directory
khalid@khalid-linux:~$ export CC=gcc-4.1 CXX=g++-4.1
khalid@khalid-linux:~$ ./install
bash: ./install: No such file or directory


Thanks
 
Old 11-30-2013, 10:57 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 5 .

To insure that the compilers were installed, please do these commands :
a) $ which gcc-4.1
b) $ which g++-4.1


Quote:
bash: ./install: No such file or directory
Your location must of course be the directory with the file 'install'.
The command to decide your location is $ pwd

-
 
Old 12-02-2013, 09:57 PM   #7
en.khalid82
Member
 
Registered: Apr 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
Dear Mr.Knudfl, I did all the steps to incorporate GPSR inside ns 2.33 but the following error appeared.

locservices/ls_queued_timer.cc: In member function ‘void QueuedTimer:rintQueue()’:
locservices/ls_queued_timer.cc:307: error: cast from ‘void*’ to ‘int’ loses precision
locservices/ls_queued_timer.cc: In member function ‘void TimerHeap:rintTable()’:
locservices/ls_queued_timer.cc:472: error: cast from ‘void*’ to ‘int’ loses precision
make: *** [locservices/ls_queued_timer.o] Error 1
Ns make failed!

Please, may you help me.

Thanks
 
Old 12-03-2013, 02:15 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 7 .
Quote:
locservices/ls_queued_timer.cc:307: error: cast from ‘void*’ to ‘int’ loses precision
Looks like "patch -p1 < ns-2.33-hls.patch" failed.

I have made a new "patch package" with everything included / patched :
{ The ns-2.33-hls.patch, hls-files-ns233.tar.gz, Makefile.in } → →
gpsr-hls-ns233-patching.tar.bz2 ( 5.3 MB ) →
https://drive.google.com/file/d/0B7S...it?usp=sharing

The new build instructions are then much simpler :
$ cd ns-allinone-2.33/
$ tar xvf gpsr-hls-ns233-patching.tar.bz2
$ export CC=gcc-4.1 CXX=g++-4.1
$ ./install

-

Last edited by knudfl; 12-03-2013 at 02:27 AM.
 
Old 12-03-2013, 12:47 PM   #9
en.khalid82
Member
 
Registered: Apr 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
Dear Mr.Knudfl

I have replaced ns-2.33 with the one that you gave and did the following :

$ cd ns-allinone-2.33/
$ tar xvf gpsr-hls-ns233-patching.tar.bz2
$ export CC=gcc-4.1 CXX=g++-4.1
$ ./install

but we have same errors

locservices/ls_queued_timer.cc: In member function ‘void QueuedTimer:rintQueue()’:
locservices/ls_queued_timer.cc:307: error: cast from ‘void*’ to ‘int’ loses precision
locservices/ls_queued_timer.cc: In member function ‘void TimerHeap:rintTable()’:
locservices/ls_queued_timer.cc:472: error: cast from ‘void*’ to ‘int’ loses precision
make: *** [locservices/ls_queued_timer.o] Error 1
Ns make failed!

Please,how can I avoid this problem.
 
Old 12-03-2013, 01:19 PM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 9 .

? What's the outputs from the commands
a) $ ls /usr/bin/gcc*
b) $ ls /usr/bin/g++*
c) $ which gcc-4.1
d) $ which g++-4.1

-
 
Old 12-03-2013, 10:55 PM   #11
en.khalid82
Member
 
Registered: Apr 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
Dear Mr.Knudfl, I did the commands in Quote 10 and the following results for each command are:

for No1: $ ls /usr/bin/gcc* /usr/bin/gcc /usr/bin/gcc-4.3 /usr/bin/gccbug-4.1 /usr/bin/gcc-4.1 /usr/bin/gcc-4.4
for No2: ls /usr/bin/g++ /usr/bin/g++
For No3. which gcc-4.1 /usr/bin/gcc-4.1
for No4. which g++-4.1 /usr/bin/g++-4.1

Note: we used ubuntu 9.10 ((x86_64)

Thanks
 
Old 12-04-2013, 01:11 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 11 .

Ubuntu 9.10 : No support / help with an OS that old.

*** But the major issue is "x86_64" :

GPRS will not work with x86_64 , 64bits ? ns2 is for i686.

* Use any 32bits OS, CentOS 6.5, or any newer Ubuntu, 32bits (i686).


-

Last edited by knudfl; 12-04-2013 at 01:17 AM.
 
Old 12-04-2013, 02:24 AM   #13
hothifa
LQ Newbie
 
Registered: Dec 2013
Posts: 13

Rep: Reputation: Disabled
Hi
any link for downloading ubuntu 32bits(i686)

thanks
 
Old 12-04-2013, 02:44 AM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 13 .

This page, right column line 12 : "Download Linux" →
http://iso.linuxquestions.org/ → → http://iso.linuxquestions.org/ubuntu/
http://iso.linuxquestions.org/ubuntu/ubuntu-12.04.3/ → x86


Or use Google "ubuntu", the first hit is ..
http://www.ubuntu.com/downloadhttp://www.ubuntu.com/download/desktop
→ → For extended support, choose Ubuntu 12.04 LTS → Choose your flavour →
→ select 32bit

-
 
Old 12-04-2013, 03:09 AM   #15
en.khalid82
Member
 
Registered: Apr 2013
Posts: 61

Original Poster
Rep: Reputation: Disabled
Dear Mr.Knudfl, are you mean 32bit (i386) instead of (i686) in quote #12, because I didn't found Ubuntu-linux with the extention of i686.

Thanks
 
  


Reply

Tags
gpsr, gpsr-hls, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to implement my own protocol with AgenjJ dissou Programming 2 02-14-2011 08:49 AM
How to implement my own protocol with AgentJ dissou Linux - Networking 0 02-10-2011 03:25 AM
Telnet protocol through GPRS/GSM Modem capa_master Linux - Newbie 1 12-22-2010 03:05 AM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM
LXer: Tutorial: Border Gateway Protocol, The Routing Protocol of the Internet LXer Syndicated Linux News 0 11-13-2008 05:11 AM

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

All times are GMT -5. The time now is 02:13 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