for your eyes only
Knowledge Hurts – a blog of thoughts, things and stuff.

ns-2.29, mannasim & gcc-4.3

A happy hello to all students and engineers out there battling with Network Simulator 2 to get mannasim up and working under Ubuntu 9.04!

It’s not me who had this idea first and so it’s not me who has found the solution all by myself either… Cudos go out to Ravit Sachasiri who posted a manual on the ns-2 Mailing List. I just made a patch out of his solution in order to keep you from manually changing a total of 6 files.

Background: Since gcc-4.3, the way standard C++ libraries are included is strictly following the latest standard. That’s why people get errors because of headers not being included correctly. One example of an error can be seen below:

 mannasim/ In member function ‘virtual void  AccessPointApp::forward_data(int, AppData*)’:
 mannasim/ error: ‘AppDataList’ was not declared in  this scope
 mannasim/ error: expected `;' before ‘list’
 mannasim/dataGenerator.h: At global scope:
 mannasim/dataGenerator.h:65: warning: inline function ‘virtual void  EventTimer::expire(Event*)’ used but never defined
 mannasim/dataGenerator.h:52: warning: inline function ‘virtual void  SensingTimer::expire(Event*)’ used but never defined
 mannasim/sensorBaseApp.h:83: warning: inline function ‘virtual void  DisseminatingTimer::expire(Event*)’ used but never defined
 make: *** [mannasim/accessPointApp.o] Error 1
 Ns make failed!

You can use the following patch to avoid this…

Link to the patch:

howto apply the patch:

patch -p0 < ns-mannasim-patch-ns2.29+gcc-4.3.patch

Find out more about this here:


2 Responses to “ns-2.29, mannasim & gcc-4.3”

  1. Hi,
    I am trying to build ns-2.29 and mannasim using gcc-4.4.2 on arch linux (i686-pc-linux-gnu) . It fails when building Tclcl-1.17 with some warnings about deprecated conversations from string constant to char* and an error about an invalid conversion from const char* to char*. Anyway I was hoping you might have some insight in to what I can do to get round this as it appears to be similar to what you’ve fixed here.
    I have tried to use the patch here after applying the mannasim patch but the errors are still the same. Are there changes to make to the base ns-2.29 source to get this to work?

    Any help would be greatly appreciated.

  2. linux on mac…

    […]ns-2.29, mannasim & gcc-4.3 « for your eyes only[…]…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: