LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-26-2012, 08:09 AM   #1
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Rep: Reputation: Disabled
error adding new module in ns2


Hi
I'm not sure if i have to post this thread here or in the NS2 website, but i will post on both to see if am lucky to get some help.
i was trying to add a new routing protocol (rumor routing) . i modified the makefile and after that i tried to compile again. but am having an error message and am not quiet sure what its mean. the error is the one below

make: *** No rule to make target `rumor/rumor_packet.o', needed by `ns'. Stop

is the error with NS2 or Ubuntu?
 
Old 07-26-2012, 11:34 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,737

Rep: Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317
Welcome to LQ.

Quote:
make: *** No rule to make target `rumor/rumor_packet.o'
The file ns-allinone-2.xx/ns-2.xx/rumor/rumor_packet.cc
.. is missing. Or the naming isn't correct. ? rumor.cc ?
Please check. May be you have a copy in a wrong location.
http://web.cs.du.edu/~hwu/rumorRouting/rumor.html
>
http://web.cs.du.edu/~hwu/rumorRouti...run_rumor.html
→ → I don't see any files "rumor_packet.cc" :
Then there can be no "rumor_packet.o" in the Makefile(.in).

.

Last edited by knudfl; 07-26-2012 at 11:42 AM.
 
1 members found this post helpful.
Old 07-26-2012, 11:52 AM   #3
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Original Poster
Rep: Reputation: Disabled
Actually there isn't, I will correct it in the makefile!and let you know if it works well :-)
 
Old 07-26-2012, 03:47 PM   #4
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Original Poster
Rep: Reputation: Disabled
now the lines on rumor are fixed but still got this error message, up to now am trying to
figure out what the problem might be

o common/ptypes2tcl.cc
g++ -Wl,-export-dynamic -o common/ptypes2tcl common/ptypes2tcl.o
./common/ptypes2tcl > gen/ptypes.cc
Segmentation fault (core dumped)
make: *** [gen/ptypes.cc] Error 139
 
Old 07-26-2012, 03:50 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,737

Rep: Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317
Which version of ns-allinone ?

And which Ubuntu version ? ( 'cat /etc/issue' )
 
Old 07-26-2012, 03:51 PM   #6
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Which version of ns-allinone ?

And which Ubuntu version ? ( 'cat /etc/issue' )
ns-allinone-2.35 on ubuntu 12.04 LTS
------------
i saw this thread where you discussed a similar issue with ns-2.33 did you come to any solution?
http://www.linuxquestions.org/questi...roblem-866379/

Last edited by r0w225; 07-26-2012 at 04:15 PM.
 
Old 07-26-2012, 04:17 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,737

Rep: Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317
Ns-allinone-2.35 : Please use gcc / g++ version 4.4 ..

sudo apt-get install g++-4.4

cd ns-allinone-2.35/tclcl-1.20/ && make clean && rm Makefile &&
cd ../otcl-1.14/ && make clean &&
cd ../ns-2.35/ && make clean && rm Makefile &&
cd ../ && export CC=gcc-4.4 CXX=g++-4.4 && ./install

.
 
Old 07-26-2012, 04:29 PM   #8
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Ns-allinone-2.35 : Please use gcc / g++ version 4.4 ..

sudo apt-get install g++-4.4

cd ns-allinone-2.35/tclcl-1.20/ && make clean && rm Makefile &&
cd ../otcl-1.14/ && make clean &&
cd ../ns-2.35/ && make clean && rm Makefile &&
cd ../ && export CC=gcc-4.4 CXX=g++-4.4 && ./install

.
thanx one more time for your assistance
when am in ns-2.35 i cant remove the makefile, the following error appears

cl.o gen/ptypes.o common/win32.o emulate/net-ip.o emulate/net.o emulate/tap.o emulate/ether.o emulate/internet.o emulate/ping_responder.o emulate/arp.o emulate/icmp.o emulate/net-pcap.o emulate/nat.o emulate/iptap.o emulate/tcptap.o emulate/inet.o common/tclAppInit.o common/main-monolithic.o common/tkAppInit.o nstk gen/* ns.core core core.ns core.nsx core.nse common/ptypes2tcl common/ptypes2tcl.o
rm: cannot remove `gen/version.o': Permission denied
rm: cannot remove `gen/ns_tcl.o': Permission denied
rm: cannot remove `gen/ptypes.o': Permission denied
rm: cannot remove `gen/ns_tcl.cc': Permission denied
rm: cannot remove `gen/ns_tcl.o': Permission denied
rm: cannot remove `gen/ptypes.cc': Permission denied
rm: cannot remove `gen/ptypes.o': Permission denied
rm: cannot remove `gen/version.c': Permission denied
rm: cannot remove `gen/version.o': Permission denied
make: *** [clean] Error 1
====================
i typed makefile instead of Makefile, typos error now it has been removed

after the last step (export CC-gcc...) it gives me this error now

gcc-4.4 -O2 -pipe -Wl,--export-dynamic tclAppInit.o -L/home/williams/ns-allinone-2.35/tcl8.5.10/unix -ltcl8.5 -ldl -lieee -lm \
-Wl,-rpath,/home/williams/ns-allinone-2.35/lib -o tclsh
tcl8.5.10 make succeeded.
Installing libtcl8.5.a to /home/williams/ns-allinone-2.35/lib/
cp: cannot create regular file `/home/williams/ns-allinone-2.35/lib/#inst.15445#': Permission denied
rm: cannot remove `/home/williams/ns-allinone-2.35/lib/libtcl8.5.a': Permission denied
mv: cannot stat `/home/williams/ns-allinone-2.35/lib/#inst.15445#': No such file or directory
ranlib: could not create temporary file whilst writing archive: No more archived files
make: *** [install-binaries] Error 1
tcl8.5.10 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.

Last edited by r0w225; 07-26-2012 at 04:37 PM.
 
Old 07-26-2012, 05:13 PM   #9
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Original Poster
Rep: Reputation: Disabled
am getting this now:

‘char*’
common/ptypes2tcl.cc:82: warning: deprecated conversion from string constant to ‘char*’
common/ptypes2tcl.cc:83: warning: deprecated conversion from string constant to ‘char*’
common/ptypes2tcl.cc:84: warning: deprecated conversion from string constant to ‘char*’
g++-4.4 -Wl,-export-dynamic -o common/ptypes2tcl common/ptypes2tcl.o
./common/ptypes2tcl > gen/ptypes.cc
Segmentation fault (core dumped)
make: *** [gen/ptypes.cc] Error 139
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

And am wondering if the problem is not the changes made in common/packet.h regarding the new protocol type that i added (rumor), am suspecting the following lines
Code:
this line:
      // M-DART packets
static const packet_t PT_MDART = 72;
	
        // insert new packet types here
static packet_t	      PT_RUMOR=73; //used in trace
static packet_t       PT_CRUMOR=74; //used in trace
static packet_t       PT_NTYPE = 75; // This MUST be the LAST one
		initName();

Last edited by r0w225; 07-27-2012 at 06:56 AM. Reason: ok well the problem is not from the lines i added but from the incompatibility in version
 
Old 07-26-2012, 05:55 PM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,737

Rep: Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317
Well, no wonder if it isn't working. If you are using the files from
http://web.cs.du.edu/~hwu/rumorRouting/rumor.html
The page info says : "Modified : Mon 09 Dec 2002 02:10:51 PM CST"

And : http://web.cs.du.edu/~hwu/rumorRouti...run_rumor.html
→ → "ns2.1b9a/rumor".
That's a 10 year old ns2. With a syntax different the 2.2x / 2.3x versions.

? May be you will have to use ns-allinone-2.1b9a-gcc32.tar.gz ?
Or : Find some code for a later version.

.
 
Old 07-26-2012, 06:01 PM   #11
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Well, no wonder if it isn't working. If you are using the files from
http://web.cs.du.edu/~hwu/rumorRouting/rumor.html
The page info says : "Modified : Mon 09 Dec 2002 02:10:51 PM CST"

And : http://web.cs.du.edu/~hwu/rumorRouti...run_rumor.html
→ → "ns2.1b9a/rumor".
That's a 10 year old ns2. With a syntax different the 2.2x / 2.3x versions.

? May be you will have to use ns-allinone-2.1b9a-gcc32.tar.gz ?
Or : Find some code for a later version.

.
well the files am using hav been used to compiled the CRUMOR in 2010 on ns2.34, so i guess if it has worked 2 years ago it should work again. just maybe i modified the packet.h the wrong way . am still investigating before i completely change
 
Old 07-26-2012, 07:45 PM   #12
r0w225
Member
 
Registered: Jul 2012
Location: South Africa
Distribution: Ubuntu precise pangolin 12.04LTS
Posts: 48

Original Poster
Rep: Reputation: Disabled
i changed the file packet.h of ns2.35 with the one on the ns2.34, it solves the problem but comes with a new error.. pfffff
Code:
dccp/dccp.cc: In member function ‘bool DCCPAgent::checkPacket(Packet*)’:
dccp/dccp.cc:220:23: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
dccp/dccp.cc:221:34: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
dccp/dccp.cc:222:34: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
dccp/dccp.cc:226:41: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
dccp/dccp.cc:234:23: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
dccp/dccp.cc: In member function ‘void DCCPAgent::output(bool)’:
dccp/dccp.cc:649:19: error: ‘PT_DCCP_REQ’ was not declared in this scope
dccp/dccp.cc:657:19: error: ‘PT_DCCP_RESP’ was not declared in this scope
dccp/dccp.cc:665:20: error: ‘PT_DCCP_ACK’ was not declared in this scope
dccp/dccp.cc:674:20: error: ‘PT_DCCP_DATA’ was not declared in this scope
dccp/dccp.cc:683:20: error: ‘PT_DCCP_DATAACK’ was not declared in this scope
dccp/dccp.cc:686:20: error: ‘PT_DCCP_ACK’ was not declared in this scope
dccp/dccp.cc:696:21: error: ‘PT_DCCP_ACK’ was not declared in this scope
dccp/dccp.cc:726:19: error: ‘PT_DCCP_CLOSEREQ’ was not declared in this scope
dccp/dccp.cc:731:19: error: ‘PT_DCCP_CLOSE’ was not declared in this scope
dccp/dccp.cc:765:7: error: ‘PT_DCCP_DATA’ was not declared in this scope
dccp/dccp.cc:768:7: error: ‘PT_DCCP_ACK’ was not declared in this scope
dccp/dccp.cc:771:7: error: ‘PT_DCCP_DATAACK’ was not declared in this scope
dccp/dccp.cc: In member function ‘void DCCPAgent::sendReset(dccp_reset_reason, u_int8_t, u_int8_t, u_int8_t)’:
dccp/dccp.cc:813:18: error: ‘PT_DCCP_RESET’ was not declared in this scope
dccp/dccp.cc: In member function ‘virtual int DCCPAgent::setFeature(u_int8_t, dccp_feature_location, u_char*, u_int8_t, bool)’:
dccp/dccp.cc:1163:36: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
dccp/dccp.cc:1170:37: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
dccp/dccp.cc:1203:37: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
dccp/dccp.cc: In constructor ‘DCCPAgent::DCCPAgent()’:
dccp/dccp.cc:1427:32: error: ‘PT_DCCP’ was not declared in this scope
make: *** [dccp/dccp.o] Error 1
 
Old 09-10-2014, 11:29 AM   #13
huangguanglun
LQ Newbie
 
Registered: Sep 2014
Posts: 10

Rep: Reputation: Disabled
HELP

Quote:
Originally Posted by r0w225 View Post
ns-allinone-2.35 on ubuntu 12.04 LTS
------------
i saw this thread where you discussed a similar issue with ns-2.33 did you come to any solution?
http://www.linuxquestions.org/questi...roblem-866379/
i also meet the same problem like you ,did you solve that problem?
 
Old 09-10-2014, 01:22 PM   #14
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,737

Rep: Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317Reputation: 3317
Post #13, @huangguanglun.

Please describe the errors you have.

And also tell if you did any changes to ns-2.xx .

Rumor info http://www.linuxquestions.org/questi...s2-4175495634/


-

Last edited by knudfl; 09-10-2014 at 02:59 PM.
 
Old 09-11-2014, 11:06 AM   #15
huangguanglun
LQ Newbie
 
Registered: Sep 2014
Posts: 10

Rep: Reputation: Disabled
@knudfl

Quote:
Originally Posted by knudfl View Post
Post #13, @huangguanglun.

Please describe the errors you have.

And also tell if you did any changes to ns-2.xx .

Rumor info http://www.linuxquestions.org/questi...s2-4175495634/


-
knudfl,i got the following errors
o common/ptypes2tcl.cc
g++ -Wl,-export-dynamic -o common/ptypes2tcl common/ptypes2tcl.o
./common/ptypes2tcl > gen/ptypes.cc
Segmentation fault (core dumped)
make: *** [gen/ptypes.cc] Error 139

and the version of ns-allinone i use is ns-allinone-2.35, the ubuntu version is 12.04
 
  


Reply

Tags
lcsrumor, ns2, rumor, tcl-debug


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
make error in ns2.29 when adding new protocol assassin91 Linux - Newbie 25 04-24-2012 12:17 AM
error in adding new protocol in ns2.34 for fedora 14 jothi8 LinuxQuestions.org Member Success Stories 0 03-06-2012 12:33 AM
Got error when add a new antenna module into NS2! haiying7 Linux - Software 4 12-02-2011 03:03 AM
Apache error after adding module in httpd.conf - but cant see why???? paul123 Linux - Server 2 04-26-2007 04:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:51 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration