You are on page 1of 13

Required Cygwin Packages for NS2

by Teerawat Issariyakul

November 2011

Introduction Cygwin required packages How do I know? How to install missing packages?


Here is one of the system requirement for NS2 installation

Windows Platform Cygwin 1.7.9 with additional packages: gcc4, gcc4-g++, gzip, make, patch, perl, w32api, libmpfr4, X11

NS 2.35 (full-release)

How do I know?
That those packages are required? Just run ./install at the ns2 directory and youll see

Checking for gcc4 NO!

How do I know?
You can continue by entering y But there is no guarantee that your installation will be successful

Do you wish to proceed regardless? [y/N]

How do I know?
Suppose you enter y You will see that several packages are missing

Checking for gcc4-g++ NO!


First, keep pressing y.

Write down all missing packages. Well, here is the list: gcc4, gcc4-g++, make, gzip, patch, perl, w32api, X11 Go back to install missing packages using the Cygwin setup wizard.

Upon completion, install NS2 again by executing


Installing missing packages

Search the package name here, e.g., gcc4 Expand package category by clicking +

Click here to install all the optional package

When you are done, hit next


Error Again!
This is with the installation of Tcl Even if you installed all required packages, you are still going to see this error!

error: C compiler cannot create executable

See config.log for more details.

Tcl8.5.10 configuration failed! Exiting 10

Lets see the file config.log

Location: ns-allinone-2.35/tcl8.5.10/unix

This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by tcl configure 8.5, which was generated by GNU Autoconf 2.59. Invocation command line was

configure:1785: checking for C compiler default output file name configure:1788: gcc conftest.c >&5 /usr/lib/gcc/i686-pc-cygwin/4.5.3/cc1.exe: error while loading shared libraries: cygmpfr-4.dll: cannot open shared object file: No such file or directory configure:1791: $? = 1

Here is the problem: cygmpfr-4.dll is not installed. 11

Lets fix it!

Go to Cygwin and install a package libmfr4 Then reinstall NS2.



For more information about NS 2

Please see this book from Springer

T. Issaraiyakul and E. Hossain, Introduction to Network Simulator NS2, Springer 2009