Ns-2 make error
Hi, I m working on the energy model of leach protocol, and for that using Ns-2.29 with mannasim. I have added few lines in battery.cc and battery.h ( which is used for sensor nodes), and run make command, my code compiles perfectly without any error, then I commented the changes made and run make command, now I m getting this error. I haven't access or changed any of these files but don't know why I m getting this. I'll be grateful if anyone can help in resolving this issue.
Regards, Najma classifier/classifier-bst.cc classifier/classifier-bst.cc:62:17: error: ump.h: No such file or directory classifier/classifier-bst.cc: In member function ‘virtual void MCastBSTClassifier::recv(Packet*, Handler*)’: classifier/classifier-bst.cc:158: error: ‘hdr_ump’ was not declared in this scope classifier/classifier-bst.cc:158: error: ‘ump’ was not declared in this scope classifier/classifier-bst.cc:158: error: ‘hdr_ump’ is not a class or namespace make: *** [classifier/classifier-bst.o] Error 1 |
ump.h should be in the ns-2.29/adc/ subdirectory so check your NS2 source first? (Not that I know anything about NS2 BTW...)
|
Quote:
You could try : $ make depend && make |
Hi, thanks for the reply, i have checked it and found that adc folder is somehow moved to another folder which i simply don't know how. i simply change the location of the folder and now not getting that error, but something else which i simply don't understand what it is b/c i have been working with ns-2 from last 1 year and have never experienced these issues. please guide now how to resolve the new error hundreds of lines which i m encountering when run make command. i m pasting the last few lines of the error.
regard, najma accessPointDiffApp.cc:(.text._ZN24NRSimpleAttributeFactoryIfE4findEPSt6vectorIP11NRAttributeSaIS3_EE PN9__gnu_cxx17__normal_iteratorIPS3_S5_EE[NRSimpleAttributeFactory<float>::find(std::vector<NRAttribute*, std::allocator<NRAttribute*> >*, __gnu_cxx::__normal_iterator<NRAttribute**, std::vector<NRAttribute*, std::allocator<NRAttribute*> > >*)]+0x3a): undefined reference to `NRAttribute::find_key_from(int, std::vector<NRAttribute*, std::allocator<NRAttribute*> >*, __gnu_cxx::__normal_iterator<NRAttribute**, std::vector<NRAttribute*, std::allocator<NRAttribute*> > >, __gnu_cxx::__normal_iterator<NRAttribute**, std::vector<NRAttribute*, std::allocator<NRAttribute*> > >*)' mannasim/diffusion/accessPointDiffApp.o:(.rodata._ZTI18AccessPointDiffApp[typeinfo for AccessPointDiffApp]+0x18): undefined reference to `typeinfo for DiffApp' collect2: ld returned 1 exit status make: *** [ns] Error 1 root@ubuntu:/home/najmaismat/ns-allinone-2.29/ns-2.29# |
# 4 .
Looks like you are using the wrong compiler ? What's in the Makefile line 37 ? CPP = ?? Your error output : Difficult to read without the code tags. Please edit post #4 to use code tags. I.e. type [/code] at text end, and [code] at text start : http://www.linuxquestions.org/questi....php?do=bbcode - |
hi,
on line 37 of Make.in file: CPP = @CXX@ Edited Post # 4 Code:
gnu_cxx::__normal_iterator<NRAttribute**, std::vector<NRAttribute*, std::allocator<NRAttribute*> > >*)]+0x3a): undefined reference to `NRAttribute::find_key_from(int, std::vector<NRAttribute*, std::allocator<NRAttribute*> >*, __gnu_cxx::__normal_iterator<NRAttribute**, std::vector<NRAttribute*, std::allocator<NRAttribute*> > >, __gnu_cxx::__normal_iterator<NRAttribute**, std::vector<NRAttribute*, std::allocator<NRAttribute*> > >*)' |
# 6 .
! It's not about the "Makefile.in" ! Repeat : What's in the 'Makefile' , line 37 ? CPP = ?? |
#7
At line 37 of Makefile CPP = g++ |
# 8 .
OK, seems that you generated a new Makefile. Either edit line 37 to your g++ version 4.1.2, like CPP = g++41 Or reconfigure ns-2.29/ by including your compiler : $ export CXX=g++41 && ./configure P.S. : It's always a good idea to save the original Makefile : $ cp Makefile Makefile.orig ... then you could have checked the original line 37. - |
Ok thanks..will let you know the outcome .
|
hi,
i m getting this when run $ export CXX=g++41 && ./configure $ make Code:
Explicitly disabling static compilation |
# 11.
Quote:
before you can use it. *** Note : Must be ns-allinone-2.29.3.tar.gz Which Ubuntu are you using ? Please show the replies from these two commands : 1. $ uname -m <Enter> 2. $ cat /etc/issue - |
Post#12
i have ns-allinone-2.29.3.tar.gz najmaismat@ubuntu:~$ uname -m x86_64 najmaismat@ubuntu:~$ cat /etc/issue Ubuntu 10.04.4 LTS \n \l |
Post# 13 when i try to install {gcc/g++ version 4.1.2}, i m getting this error:
najmaismat@ubuntu:~$ sudo apt-get install gcc-4.1.2 [sudo] password for najmaismat: Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package gcc-4.1.2 najmaismat@ubuntu:~$ sudo apt-get install g++-4.1.2 Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package g++-4.1.2 najmaismat@ubuntu:~$ |
# 14 .
If "gcc-4.1" is still available on the old Ubuntu 10.04, the install command is : $ sudo apt-get install g++-4.1 ( 'gcc-4.1' is automatically installed as dependency.) Note : ns2 is for a 32bits OS (i686) not 64bits (x86_64), though some ns2 versions and some patches will work on 64bits. But with a reduced functionality. (Inferior validate result.) Ubuntu 10.04 / gcc-4.1 / g++-4.1, the install command is $ export CC=gcc-4.1 CXX=g++-4.1 && ./install Configuring ns-2.29/ : $ export CC=gcc-4.1 CXX=g++-4.1 && ./configure - |
All times are GMT -5. The time now is 12:00 PM. |