Go to content Go to menu

Recently, for a project, I needed to work with ns2 (1), (2). Adding own protocols to ns2 requires to compile it from the sources instead of just installing it via apt-get.

It has a lot of dependencies (e.g. tcl/tk) which where already installed on my system. According to here there is a all-in-one package of ns2 including ALL its dependencies. As my machine is always near to 100% full and I already have installed its dependencies for other projects I just downloaded ns2 source without dependencies. Downloading the sources and the well known stanza ‘configure / make / make install’ should be enough - I though.

But alas - configure didn’t find required dependencies. OK - so fix some paths to keep configure happy. But now lots of compile time errors occurred. I’m running on Ubuntu Linux 16.04 LTS 64bit and a lot of include files and libraries are not there where ns2’s configure script expects it to find. It also seems that ns2’s dependencies installed via apt-get have been compiled with different compile time options as ns2 expects. Google did not help much and so I decided to fix things so that I can successfully compile ns2 an start hacking new protocols.

This post shows the steps and also provides the patches.

Step 1: Install prerequisites (from package repository)

sudo apt-get install \
   tcl8.6 libtcl8.6 tcl8.6-dev \