HI i have an error when i intend to run make clean. Please help me

67 views
Skip to first unread message

Student 07

unread,
Apr 3, 2022, 10:39:21 AM4/3/22
to Network Simulator 2 (NS2)
so i try to change aodv.h and aodv.cc to add flooded RREQ nodes but when i run the error come out like this :

aodv/aodv.cc: In member function ‘virtual int AODV::command(int, const char* const*)’:
aodv/aodv.cc:182:21: error: expected primary-expression before ‘id’
 AODV::AODV(nsaddr_t id) : Agent(PT_AODV),
                     ^
aodv/aodv.cc:182:23: error: cannot call constructor ‘AODV::AODV’ directly [-fpermissive]
 AODV::AODV(nsaddr_t id) : Agent(PT_AODV),
                       ^
aodv/aodv.cc:182:23: error:   for a function-style cast, remove the redundant ‘::AODV’ [-fpermissive]
aodv/aodv.cc:182:25: error: expected ‘;’ before ‘:’ token
 AODV::AODV(nsaddr_t id) : Agent(PT_AODV),
                         ^
aodv/aodv.cc:1545:1: error: expected ‘}’ at end of input
 }
 ^
aodv/aodv.cc:1545:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [Makefile:97: aodv/aodv.o] Error 1
Ns make failed!

Student 07

unread,
Apr 3, 2022, 10:43:26 AM4/3/22
to Network Simulator 2 (NS2)
First when i run make file the error came out like this :

Makefile.in is newer than Makefile. You need to re-run configure. false make: *** [Makefile] Error 1

i look up in youtube , he said i should run ./install before the error came out like the other one

knudfl

unread,
Apr 5, 2022, 3:57:35 AM4/5/22
to Network Simulator 2 (NS2)
Hi.

ns-2.35 : Default is  $ ./install  in ns-allinone-2.35/
.... i.e. ./install will take care of 'make clean' and configuring ... in the right sequence.
Earlier versions e.g. ns-2.34, you could always do ./configure inside  ns-2.34 .

Makefile.in is newer than Makefile :   Happens when you edit Makefile.in ...
Solution :   $ touch Makefile*   which will set both to the current time.

Student 07

unread,
Apr 6, 2022, 9:54:12 AM4/6/22
to Network Simulator 2 (NS2)
Thank you for replying sir, i did the solution that you suggested but stumble to another error

In file included from aodv/aodv_logs.cc:31:0:
./aodv/aodv.h:235:25: error: variable or field ‘nsaddr_t’ declared void
         void            nsaddr_t attack_dst; // attacking node
                         ^
./aodv/aodv.h:235:25: error: expected ‘;’ at end of member declaration
./aodv/aodv.h:235:34: error: ‘attack_dst’ does not name a type
         void            nsaddr_t attack_dst; // attacking node
                                  ^
make: *** [Makefile:97: aodv/aodv_logs.o] Error 1

i try to fix on line 237 of my aodv.h but still error :

i change from  " nsaddr_t attack_dst; "  to :
void            nsaddr_t attack_dst;

Student 07

unread,
Apr 6, 2022, 10:03:02 AM4/6/22
to Network Simulator 2 (NS2)
my aodv.h that I tryna fix : https://bit.ly/3NLm6n7

knudfl

unread,
Apr 6, 2022, 1:47:02 PM4/6/22
to Network Simulator 2 (NS2)

knudfl

unread,
Apr 6, 2022, 1:48:50 PM4/6/22
to Network Simulator 2 (NS2)
By the way, the  "Flooding-attack_Karthick_ns235.tar" also fails.        

Student 07

unread,
Apr 7, 2022, 2:55:52 AM4/7/22
to Network Simulator 2 (NS2)
thank you sir, well i noticed that sir. Lots of comment in the blogspot said it is error too sir. Can i still use it as my references for comparison sir ?

knudfl

unread,
Apr 7, 2022, 3:56:28 AM4/7/22
to Network Simulator 2 (NS2)
The code suggestion may give you an idea about what to edit in the C++ code.

Errors,  'make clean'  :  May be time to unpack a new ns-allinone-2.35 into a new folder.
I.e. you can have as many ns-allinone-2.xx as you want, installed at the same time
... If you want answers about errors, the error.txt must be shown, or uploaded / attached.

Student 07

unread,
Apr 7, 2022, 9:43:24 AM4/7/22
to Network Simulator 2 (NS2)
Update : I have overcome the error sir

Thank you sir :))

Student 07

unread,
Apr 7, 2022, 10:27:23 AM4/7/22
to ns-u...@googlegroups.com
btw sir how do i create a manet environment flooding attack ? I mean how do I prove it is in manet ? is it because it simply wireless in my tcl file ?
sorry for the dumb question but i really am curious :| 

--
You received this message because you are subscribed to the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-users/70b569e7-fe40-47d2-8393-75c3414bacabn%40googlegroups.com.

knudfl

unread,
Apr 7, 2022, 1:53:42 PM4/7/22
to Network Simulator 2 (NS2)

Student 07

unread,
Apr 8, 2022, 3:53:04 AM4/8/22
to Network Simulator 2 (NS2)
Thank you sir :))
Reply all
Reply to author
Forward
0 new messages