how to add CBRP+LTE_ns235.patch at ns2.35?

100 views
Skip to first unread message

Muhammad Nurusshobah

unread,
Jun 3, 2018, 10:27:37 PM6/3/18
to Network Simulator 2 (NS2)
when i run CBRP patch ( I try cbrp patch from this site https://drive.google.com/drive/folde...00?usp=sharing), i get this notification:

cbrp/cbrpagent.cc:875:25: error: ‘CBRP_XmitFailureCallback’ was not declared in this scope
   cmnh->xmit_failure_ = CBRP_XmitFailureCallback;
                         ^
cbrp/cbrpagent.cc: In member function ‘int CBRP_Agent::UnicastRREQ(CBRP_Packet&, nsaddr_t)’:
cbrp/cbrpagent.cc:1375:25: error: ‘CBRP_XmitFailureCallback’ was not declared in this scope
   cmnh->xmit_failure_ = CBRP_XmitFailureCallback;
                         ^
cbrp/cbrpagent.cc: In member function ‘void CBRP_Agent::sendOutPacketWithRoute(CBRP_Packet&, bool, Time)’:
cbrp/cbrpagent.cc:1572:25: error: ‘CBRP_XmitFailureCallback’ was not declared in this scope
   cmnh->xmit_failure_ = CBRP_XmitFailureCallback;
                         ^
make: *** [cbrp/cbrpagent.o] Error 1
Ns make failed!

is there a solution for this? thanks for your attention


knudfl

unread,
Jun 4, 2018, 6:49:18 AM6/4/18
to Network Simulator 2 (NS2)
Hi.

The old CBRP code can be compiled with g++34, from gcc version 3.4.6 .
compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb ( Ubuntu 12* .. 18.04 - 64 )
https://drive.google.com/file/d/0B7S255p3kFXNRTkzQnRSNXZ6UVU/view?usp=sharing
compat-gcc-34-c++_3.4.6-20_amd64.deb ( All 64bit Ubuntu versions )
https://drive.google.com/file/d/0B7S255p3kFXNV3J3bnVoWGNWdG8/view?usp=sharing

Download, and install :
sudo gdebi Downloads/compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb
sudo gdebi Downloads/compat-gcc-34-c++_3.4.6-20_amd64.deb

tar xvf ns-allinone-2.35_gcc5.tar.gz  (g++-4.6 .. gcc/g++ -5.4 can be used)
https
://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing
cd ns
-allinone-2.35/
patch
-p0 < CBRP+LTE_ns235.patch
https
://drive.google.com/file/d/0B7S255p3kFXNMlJBRy10SlYwWk0/view?usp=sharing
./install   (if g++ >5.4 : export CC=gcc-4.8 CXX=g++-4.8 && ./install)
                       
// Stops with error in ns-2.35/cbrp/*
cd ns
-2.35/    
                       
// Edit the Makefile line 37 to CPP    = g++34

make
                       
// Stops with errors. Edit the Makefile to g++

make

cp ns ns235
-cbrp-lte
# cp ns235-cbrp-lte /usr/local/bin/

Simulation :  $ ns235-cbrp-lte ex.tcl

cbrp-examples-2.tar.gz
https://drive.google.com/file/d/1Bs7mO6aG5zkmGedSNS7nl7r0c1eJthcI/view?usp=sharing

-

Muhammad Nurusshobah

unread,
Jul 8, 2018, 12:18:38 AM7/8/18
to Network Simulator 2 (NS2)
Thanks for Your solution, but still error with this information :
cbrp/cbrpagent.cc:2360:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
               tell_id.dump());
                             ^
cbrp/cbrpagent.cc:2382:25: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
             to_id.dump());
                         ^
cbrp/cbrpagent.cc:2403:28: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
           deadlink->to_addr);

                            ^
make: *** [cbrp/cbrpagent.o] Error 1
Ns make failed!

what's wrong Mister?

knudfl

unread,
Jul 8, 2018, 6:54:55 AM7/8/18
to Network Simulator 2 (NS2)
No errors are shown in your post.        Warnings are not errors.

Missing information : Where are you in the build sequence ?
1.  $ pwd                      shows the output about location.
2.  Please show lines that say ``error´´.
                ( » make: *** [cbrp/cbrpagent.o] Error « :  tells nothing about the cause.)
3.  Which command caused the above output with warnings ?
4.  Which compiler was used for the terminal output ?
5.  Which OS are you using?  Name and version, please.

Muhammad Nurusshobah

unread,
Jul 8, 2018, 7:29:56 AM7/8/18
to Network Simulator 2 (NS2)
Thank you for your response,
1. I installed ns2 in the directory /home/cbrp/Document/ns-allinone-2.35
2. When i installing as described earlier, I run the command ./install and show this  make: *** [cbrp/cbrpagent.o] Error 1
3. Command ./install after editing on Makefile in line 37 to g++
4. I used compiler gcc-4.8 and g++-4.8
5. Ubuntu 14.04.5 LTS

knudfl

unread,
Jul 8, 2018, 11:29:13 AM7/8/18
to Network Simulator 2 (NS2)
As you know from my previous post, g++34 is also required.
I.e. when "cbrp/cbrpagent.o" fails, edit the Makefile to g++34 .

Please read my post of ``4 Jun´´ carefully.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages