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

ns 2.28 compilation with gcc 4

If ever you should come accross this:

checking system version (for dynamic loading)... ./configure: 1: Syntax error: Unterminated quoted string

or this:

checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... ./configure: 1: Syntax error: Unterminated quoted string

then you should make a replacement in some of the configure scripts

wrong:

system=MP-RAS-`awk ' { print $3 } '/etc/.relid'`

right:

system=MP-RAS-`awk ' { print $3 } '/etc/.relid`

All the steps together:

  1. edit tcl8.4.11/unix/configure
  2. -> autoconf
  3. edit tk8.4.11/unix/configure
  4. -> autoconf
  5. edit otcl-1.11/configure
  6. -> autoconf

A good patch to make ns 2.28 work with gcc 4 and higher is this one: http://www.cs.uc.edu/~cdmc/ucbt/src/ns228-gcc40.patch

I have made a patch that does steps 1-6 by changing directly the configure scripts. It is available here: http://www.box.net/shared/ottfdyaz60

Read on! Knowledge hurts.

Advertisements

3 Responses to “ns 2.28 compilation with gcc 4”

  1. Awesome .. kinda great subject. I will blog about it also!

  2. i already change the configure file but it still give the same error…
    i’m using ubuntu 11.04
    do u have any idea how to fix it? 😦

  3. Thanks!
    It works!!

    Apply the patch in the following way.

    Copy the patch in the ns-allinone directory.

    cd ns-allinone/
    patch -p1 < patchfile


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: