LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Re: Help regarding installation of NS-2.27 on Ubuntu 9.10 (https://www.linuxquestions.org/questions/linux-newbie-8/re-help-regarding-installation-of-ns-2-27-on-ubuntu-9-10-a-782356/)

Scofield 01-15-2010 05:56 AM

Re: Help regarding installation of NS-2.27 on Ubuntu 9.10
 
Can anyone please help me with the steps to install NS 2.27 on Ubuntu 9.10.

Thank you,
Scofiled

Davno 01-16-2010 04:05 AM

Its all here:
http://nsnam.isi.edu/nsnam/index.php/User_Information

knudfl 01-16-2010 05:57 AM

'ns-2.27' .. .. Ubuntu 9.10 Karmic
 
Welcome to LQ. .. :)

General for all ns2 versions :
sudo apt-get install g++ autoconf automake libtool \
libx11-dev libxmu-dev libxmu-headers libxt-dev
.....
.....
Assume ns-allinone-2.27
You will need ns-allinone-2.34 too.

Edit ns-allinone-2.27/ns-2.27/Makefile.in , line 36-37 to :
CC = gcc-3.3
CPP = g++-3.3

.. and ns-allinone-2.27/nam-1.10/Makefile.in , line 44-45 :
The same.

The required g++-3.3 : sudo apt-get install g++-3.3
For that, hardy must be added to /etc/apt/sources.list
Code:

deb http://76.73.4.58/ubuntu/ hardy-updates main
deb http://76.73.4.58/ubuntu/ hardy universe
deb http://security.ubuntu.com/ubuntu hardy-security main
deb http://security.ubuntu.com/ubuntu hardy-security universe

The g++-3.3 packages can also be found here
http://packages.ubuntu.com/hardy/g++-3.3
to do : sudo dpkg -i \
cpp-3.3_3.3.6-15ubuntu4_i386.deb g++-3.3_3.3.6-15ubuntu4_i386.deb \
gcc-3.3_3.3.6-15ubuntu4_i386.deb gcc-3.3-base_3.3.6-15ubuntu4_i386.deb \
libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb

Having ns-allinone-2.27/ and ns-allinone-2.34/ in the same directory
e.g. /home/"username"/ns2/ :
cd ns-allinone-2.27/
mv otcl-1.8/ back-otcl-1.8
mv tcl8.4.5/ back-tcl8.4.5
mv tclcl-1.15/ back-tclcl-1.15
mv tk8.4.5/ back-tk8.4.5

ln -s ../ns-allinone-2.34/tcl8.4.18/
ln -s ../ns-allinone-2.34/tcl8.4.18/ tcl8.4.5
ln -s ../ns-allinone-2.34/tk8.4.18/
ln -s ../ns-allinone-2.34/tk8.4.18/ tk8.4.5
ln -s ../ns-allinone-2.34/otcl-1.13/
ln -s ../ns-allinone-2.34/otcl-1.13/ otcl-1.8
ln -s ../ns-allinone-2.34/tclcl-1.19/
ln -s ../ns-allinone-2.34/tclcl-1.19/ tclcl-1.15

mkdir -p include
cd include/
ln -s ../tcl8.4.18/generic/tclInt.h
ln -s ../tcl8.4.18/generic/tclIntDecls.h
( These two links may already be present.)

Apply the tk-8.4-lastevent.patch in tk8.4.14.
Apply the otcl-113-configure.in.patch in otcl-1.13.

Then : ./install , in the ns-allinone-2.27/ top directory.

For more info : 'LQ Search' > "Tag Name" = ns2 ,
'LQ Search' > "Tag Name" = leach .

vichia 03-31-2010 08:07 AM

Thank you for your installation guide. I have to work with SIP simulation (which is only supported by ns2 2.27) so I followed your guide above, but there are some problems. What I did are :

I followed your link to install g++3.3 but I can't not do it because :
- g++-3.3_3.3.6-15ubuntu4_i386.deb requires libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb
- libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb requires g++-3.3_3.3.6-15ubuntu4_i386.deb

--> loop

So I install g++ via terminal : sudo apt-get install g++ ---> it is g++-4.4

Then I changed makefile.in as follow :
CC = gcc-3.3
CPP = g++-4.4

After that I did exactly what you said, and I encoutered this error with ./install command :
Quote:

otcl.o: In function `OTclDispatch':
/home/vichenka/Downloads/NS2_Installation/ns-allinone-2.27/otcl-1.8/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/vichenka/Downloads/NS2_Installation/ns-allinone-2.27/otcl-1.8/otcl.c:2284: undefined reference to `__stack_chk_fail_local'
ld: libotcl.so: hidden symbol `__stack_chk_fail_local' isn't defined
ld: final link failed: Nonrepresentable section on output
make: *** [libotcl.so] Error 1
otcl-1.8 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
Can you help me with this ?

knudfl 04-01-2010 04:34 AM

Post # 4 , @ vichia : Welcome to LQ. .. .. :) ..

"" --> loop "" .. or explained in another way :
Both packages depend on each other.
Please use "chain install" :
sudo dpkg -i <package> <package>

In fact, you could have done that from the very beginning ..
sudo dpkg -i <package> <package> <package> <package> <package>
Like shown in post # 3.
.....
.....
And the only reason for installing this 'g++-3.3' is :
The default g++ ( = g++-4.4 ) cannot be used with ns-2.27 !
.....

knudfl 04-19-2010 01:24 AM

1 Attachment(s)
Message from @ Scofield : .... QUOTE :
Hello Knudfl,
I have been working on LEACH protocol and installed it on NS2.27. I have some doubts regarding the files in MIT directory. Under MIT directory, we have a file leach_sims. I am unable to understand the contents of the files in leach_sims such as
1. What are the values represented in leach.alive , leach.data and leach.energy, leach.save1, leach.save2, startup.energy.
2. I have an error returned in leach.err that is
...... See attachment.

3. The leach.out file is empty without any values. Is any value is written in it
4. And also the values given in the file TDMAschedule.0.txt (files 0,20,40,........520)..
.......? why is the time taken upto 520 cycles ?
5. the values are calculated for 100 nodes... what should I do to calculate the values for 200, 300 upto 1000 nodes....

thanking you,
Scofield
------- end QUOTE ---------
EDIT : What is the command that causes the errors ?

Vivek pandey 04-23-2010 10:03 AM

I want to install mannasim in ns-2
But facing the errors like list no suh file or directory.
Errors are for headers of standard template libraries.

So can anyone please help me

Thankin You i Advance
Vivek

knudfl 04-24-2010 06:46 AM

Post #7 , @ Vivek pandey : welcome to LQ.

Mannasim is to be used in ns-allinone-2.29.3
The mannasim threads are found here :
LQ Search http://www.linuxquestions.org/questions/search.php
>>> 'Tag Name' = mannasim

This thread is about ns-2.27, when you have more questions,
please start a new thread. And info about the used Linux, please... EL5 ?
Redhat EL5 or similar : no problems at all with
ns-allinone-2.29.3 + mannasim , if I remember right.
..
.. .. Good luck .. .. :)

_man_ouer 04-24-2010 12:29 PM

I try for some time to install ns-allinone 2.27 to use later leach
without success and I blocked it all the time at installation ns-allinone
and I have this error message.

Code:

Build tcl8.4.5
============================================================
loading cache ./config.cache
checking whether to use symlinks for manpages... no
checking compression for manpages... no
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for unistd.h... yes
checking for limits.h... yes
checking for building with threads... no (default)
checking if the compiler understands -pipe... yes
checking for required early compiler flags...  _LARGEFILE64_SOURCE
checking for 64-bit integer type... long long
checking for struct dirent64... no
checking for struct stat64... yes
checking for off64_t... yes
checking whether byte ordering is bigendian... no
checking for getcwd... yes
checking for opendir... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoll... yes
checking for strtoull... yes
checking for tmpnam... yes
checking for waitpid... yes
checking for strerror... yes
checking for getwd... yes
checking for wait3... yes
checking for uname... yes
checking for realpath... yes
checking dirent.h... yes
checking for errno.h... yes
checking for float.h... yes
checking for values.h... yes
checking for limits.h... (cached) yes
checking for stdlib.h... yes
checking for string.h... yes
checking for sys/wait.h... yes
checking for dlfcn.h... yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for sys/modem.h... no
checking termios vs. termio vs. sgtty... termios
checking for fd_set in sys/types... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for sys/time.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for tm_zone in struct tm... yes
checking for gmtime_r... yes
checking for localtime_r... yes
checking tm_tzadj in struct tm... no
checking tm_gmtoff in struct tm... yes
checking long timezone variable... yes
checking for st_blksize in struct stat... yes
checking for fstatfs... yes
checking for 8-bit clean memcmp... yes
checking for memmove... yes
checking proper strstr implementation... yes
checking for strtoul... yes
checking for strtod... yes
checking for strtod... (cached) yes
checking for Solaris2.4/Tru64 strtod bugs... ok
checking for ANSI C header files... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for socklen_t... yes
checking for opendir... (cached) yes
checking union wait... yes
checking for strncasecmp... yes
checking for BSDgettimeofday... no
checking for gettimeofday... yes
checking for gettimeofday declaration... present
checking whether char is unsigned... no
checking signed char declarations... yes
checking for a putenv() that copies the buffer... no
checking for langinfo.h... yes
checking whether to use nl_langinfo... yes
checking for sin... no
checking for main in -lieee... yes
checking for main in -linet... no
checking for net/errno.h... no
checking for connect... yes
checking for gethostbyname... yes
checking how to build libraries... static
checking for ranlib... ranlib
checking if 64bit support is requested... no
checking if 64bit Sparc VIS support is requested... no
checking system version (for dynamic loading)... ./configure: 1: Syntax error: Unterminated quoted string
tcl8.3.2 configuration failed! Exiting ...
Tcl is not part of the ns project.  Please see www.Scriptics.com
to see if they have a fix for your platform.


also i couldn't found the patch

ubuntu 9.04

thank you for your help

knudfl 04-24-2010 12:59 PM

@_man_ouer , welcome to LQ. .. . :)

The install instructions are here :
http://www.linuxquestions.org/questi...10-a-782356/#3

And please read all the 'LEACH' posts, if any problems.
( There are six "leach" threads.)
LQ Search http://www.linuxquestions.org/questions/search.php
>>> 'Tag Name' = leach

... Good luck.
...

_man_ouer 04-24-2010 01:36 PM

I'am sorry but i don't understand my problem

also i don't understand why i have problem with tcl8.3.2
because the package of ns-allinone2.27 contain tcl8.5.4

i tried to change the makefile.in
(the CC and CPP variable) but i have the same probleme

knudfl 04-24-2010 01:55 PM

# 11 : The word "tcl8.3.2" is just a typo in the install
script, not a real error. But anyway, tcl8.4.5 is not to
be used. You will have to use 8.4.18 like the instructions
say. And take your time. It is not uncomplicated.
..

_man_ouer 04-24-2010 02:55 PM

I followed the instructions that you mentioned
I have now surpassed the installation of tcl but it hangs at tk8


tcl8.4.5 installation succeeded.
============================================================
* Build Tk8.4.5
============================================================
cd: 386: can't cd to ./tk8.4.5/unix
./install: 393: ./configure: not found
tk8.3.2 configuration failed! Exiting ...

even though I followed all the instructions

knudfl 04-24-2010 03:00 PM

#13 : Forgot a link ?

ln -s ../ns-allinone-2.34/tk8.4.18/ tk8.4.5

..

_man_ouer 04-24-2010 03:23 PM

thank you a lot Mr knudfl

i found it too after posting my message , :redface:

but now the make of NS return an error with trace/trace.o:scratch:

Code:

ns-allinone-2.27/tclcl-1.15/tclcl-config.h:37:1: attention : ceci est la localisation d'une précédente définition
In file included from trace/trace.cc:39:
./common/packet.h: In constructor ‘p_info::p_info()’:
./common/packet.h:170: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:171: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:172: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:173: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:174: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:175: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:176: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:177: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:178: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:179: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:180: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:181: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:182: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:183: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:184: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:185: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:186: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:187: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:188: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:189: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:191: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:192: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:193: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:194: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:195: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:196: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:198: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:199: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:200: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:201: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:202: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:203: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:204: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:205: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:206: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:207: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:208: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:209: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:210: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:211: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:213: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:214: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:216: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:217: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:218: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:221: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:224: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:227: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:230: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:233: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:236: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:240: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:244: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:245: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:247: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:248: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:251: attention : deprecated conversion from string constant to ‘char*’
./common/packet.h:253: attention : deprecated conversion from string constant to ‘char*’
In file included from trace/trace.cc:42:
./sctp/sctp.h: At global scope:
./sctp/sctp.h:69: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:82: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:91: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:122: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:137: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:149: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:178: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:190: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:196: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:208: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:216: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:228: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:249: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:255: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:260: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:267: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:269: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:278: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:293: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:374: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:380: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:421: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:432: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:440: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:447: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:453: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:464: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:483: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:488: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:494: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:501: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:507: attention : ‘typedef’ was ignored in this declaration
./sctp/sctp.h:632: erreur: extra qualification ‘SctpAgent::’ on member ‘DumpSendBuffer’
trace/trace.cc:185: attention : deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: attention : deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: attention : deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: attention : deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: attention : deprecated conversion from string constant to ‘char*’
make: *** [trace/trace.o] Erreur 1
Ns make failed!



could you help me with this please
thank you a lot

knudfl 04-24-2010 04:45 PM

#15 : Please hit the edit button and delete the most
of the text, and place the remains in code tags :
[/code] at text end and [code] at the text start.
http://www.linuxquestions.org/questi....php?do=bbcode

About the error : Looks like you are using a wrong compiler.
Did you edit the 'Makefile.in' to CC = gcc-3.3 , CPP = g++-3.3
? ? . Also : the g++-3.3_3.3.6 , gcc-3.3_3.3.6 etc. packages,
must be installed !
..

_man_ouer 04-25-2010 07:04 AM

thank you a lot

I completed the installation of ns-allinone2.27 and leach
thank you for your help

onee_chan 07-01-2010 02:45 AM

hi all,
I am installing ns 2.27 on ubuntu 9.04 and I found some error when patching file
Code:

oriza@oriza-laptop:~/Documents/ns-allinone-2.27/tk8.4.18$ patch -p0 < tk-8.4-lastevent.patch
patching file generic/tk.h
Hunk #1 FAILED at 635.
1 out of 1 hunk FAILED -- saving rejects to file generic/tk.h.rej

can you tell me what happened?
Thank you :)

knudfl 07-01-2010 03:31 AM

Post # 18 , @ onee_chan : Welcome to LQ. .. .. :)

".. hunk FAILED" : Not really an error ( An error is when the text says 'error' )

" hunk FAILED " : Is usually because the line(s) already has been edited.
The patch is for all ' tk-8.4.x(x) '. ( E.g. 8.4.5 ..... 8.4.18 )
The later versions have some of the fixes included.
..

jagadish chandra sekar 10-03-2010 05:04 PM

Quote:

Originally Posted by _man_ouer (Post 3947008)
thank you a lot

I completed the installation of ns-allinone2.27 and leach
thank you for your help

can u tell me how did u rectify the error,since i am having the same error,i need it to use sip patch which works only in this version of ns2,i am doing a project on voip and i need to install it badly,kindly help,i am a newbie in to linux and ns2

jagadish chandra sekar 10-03-2010 05:10 PM

ns-2.27 installation
 
can anyone tell me how to install ns2.7 in ubuntu 8.10 and patch sip protocol,kindly help,i am in desprate situation

knudfl 10-06-2010 03:59 PM

@ jagadish chandra sekar, posts 20-21 : Welcome to LQ. .. .. :) ..

Generally installing 'ns-allinone-2.27' , Ubuntu :
http://www.linuxquestions.org/questi...10-a-782356/#3

About SIP : Which sip patch is it about ? One of these ?
http://www.dcc.fc.up.pt/~rprior/ns/index-en.html

Please specify,,, and provide a direct link to the patch, please.

http://www.linuxquestions.org/linux/...Ask_a_Question
http://www.catb.org/~esr/faqs/smart-questions.html
..

jagadish chandra sekar 10-25-2010 10:20 AM

Can anyone please help me with the steps to install NS 2.26 on Ubuntu 9.04
 
i need to patch sip-udp,which works only in ns-2.26,pls help

knudfl 10-26-2010 11:47 PM

# 23 : ns-2.26 cannot be installed on a Debian based OS.
I.e. Ubuntu, Mint, Mepis, Debian, etc. : No.

'ns-allinone-2.26' : Please use an rpm based OS. (Fedora, CentOS).
The compiler to be used is gcc / g++ version 3.3.3.
Please read the other ns226 threads : LQ Search, Keyword = ns226
..

ashok.alluri8011 11-11-2010 07:46 AM

./sctp/sctp.h:214: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:226: warning: ‘typedef’ was ignored in this declaration
In file included from trace/trace.cc:43:
./sctp/sctp.h:247: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:253: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:258: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:265: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:267: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:276: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:291: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:372: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:378: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:419: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:430: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:438: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:445: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:451: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:462: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:481: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:486: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:492: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:499: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:505: warning: ‘typedef’ was ignored in this declaration
./sctp/sctp.h:632: error: extra qualification ‘SctpAgent::’ on member ‘DumpSendBuffer’
trace/trace.cc:185: warning: deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: warning: deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: warning: deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: warning: deprecated conversion from string constant to ‘char*’
trace/trace.cc:185: warning: deprecated conversion from string constant to ‘char*’
make: *** [trace/trace.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
i am in desperate need of solutin


thanx in advance

Wonu 11-17-2010 02:31 PM

Hello everyone,
I am trying to install ns-2.27 on my amd64 Ubuntu 10.04and i get the error below when i try to make ns-2.27. I am installing the allinone package, all other parts tcl, otcl, tk and tclcl have been succesfully configured and made. I have been trying for several days and i keep getting stuck here. Please i will appreciate any help as I am running behind in my Dissertation.
Thank you in advance.

wonuola@ubuntu:~/ns-allinone-2.27/ns-2.27$ make
g++-3.3 -c -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_8 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=no -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I/home/wonuola/ns-allinone-2.27/tclcl-1.15 -I/home/wonuola/ns-allinone-2.27/otcl-1.8 -I/home/wonuola/ns-allinone-2.27/include -I/home/wonuola/ns-allinone-2.27/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -o tools/random.o tools/random.cc
In file included from config.h:54,
from tools/random.cc:40:
autoconf.h:85: error: namespace `no' undeclared
make: *** [tools/random.o] Error 1

knudfl 11-18-2010 04:35 AM

1 Attachment(s)
# 26 , @ Wonu. No, I do not see errors like that.
./install continues after the binary 'ns' has been created.
( Then there are errors in the probably insignificant subdirectory
ns-2.27/indep-utils/webtrace-conv/ (Has a special Makefile)
(No errors webtrace-conv/ on a 32 Bits Ubuntu 10.04, is only on the amd64 version).)

Code:

validate overall report: some tests failed:
    ./test-all-sctp ./test-all-srm ./test-all-hier-routing ./test-all-algo-routing ./test-all-mcast ./test-all-vc ./test-all-session ./test-all-mixmode ./test-all-red ./test-all-webcache ./test-all-mcache ./test-all-plm ./test-all-satellite


Suggest : cd ns-allinone-2.27/ && sh run_script.txt
.... which is a summary of the required commands
.... i.e. links to ns-allinone-2.34/ etc. etc.
.

bnkdul 12-27-2010 12:56 PM

do you know how to install ns2.27 on Ubuntu 9.10 64-bits
 
Hi knudfl,

Thanks for the valuable guidance instructions for installing ns2.27. I tried to follow your steps to install ns2.27 on my Ubuntu 9.10 64-bits version. I downloaded the gcc-3.3...amd64.deb instead of the one you recommend. When installing the debian files, I get this at the terminal


sudo dpkg -i cpp-3.3_3.3.6-15ubuntu4_amd64.deb g++-3.3_3.3.6-15ubuntu4_amd64.deb gcc-3.3_3.3.6-15ubuntu4_amd64.deb gcc-3.3-base_3.3.6-15ubuntu4_amd64.deb libstdc++5-3.3-dev_3.3.6-15ubuntu4_amd64.deb
[sudo] password for cielo:
(Reading database ... 152340 files and directories currently installed.)
Preparing to replace cpp-3.3 1:3.3.6-15ubuntu4 (using cpp-3.3_3.3.6-15ubuntu4_amd64.deb) ...
Unpacking replacement cpp-3.3 ...
Preparing to replace g++-3.3 1:3.3.6-15ubuntu4 (using g++-3.3_3.3.6-15ubuntu4_amd64.deb) ...
Unpacking replacement g++-3.3 ...
Preparing to replace gcc-3.3 1:3.3.6-15ubuntu4 (using gcc-3.3_3.3.6-15ubuntu4_amd64.deb) ...
Unpacking replacement gcc-3.3 ...
Preparing to replace gcc-3.3-base 1:3.3.6-15ubuntu4 (using gcc-3.3-base_3.3.6-15ubuntu4_amd64.deb) ...
Unpacking replacement gcc-3.3-base ...
Preparing to replace libstdc++5-3.3-dev 1:3.3.6-15ubuntu4 (using libstdc++5-3.3-dev_3.3.6-15ubuntu4_amd64.deb) ...
Unpacking replacement libstdc++5-3.3-dev ...
Setting up gcc-3.3-base (1:3.3.6-15ubuntu4) ...
Setting up cpp-3.3 (1:3.3.6-15ubuntu4) ...
Processing triggers for man-db ...
Setting up gcc-3.3 (1:3.3.6-15ubuntu4) ...
Setting up libstdc++5-3.3-dev (1:3.3.6-15ubuntu4) ...
Setting up g++-3.3 (1:3.3.6-15ubuntu4) ...


I don't see any errors but the file is not installed (I think) because when I go to synaptic
they are not there. And trying to proceed with the ns2 installation results in error since I don't have the gcc3.3

Quote:

Originally Posted by knudfl (Post 3828530)
Welcome to LQ. .. :)

General for all ns2 versions :
sudo apt-get install \
libx11-dev libxmu-dev libxmu-headers libxt-dev libtool
.....
.....
Assume ns-allinone-2.27
You will need ns-allinone-2.34 too.

Edit ns-allinone-2.27/ns-2.27/Makefile.in , line 36-37 to :
CC = gcc-3.3
CPP = g++-3.3

.. and ns-allinone-2.27/nam-1.10/Makefile.in , line 44-45 :
The same.

The g++-3.3 packages , required ..
http://packages.ubuntu.com/hardy/g++-3.3

to do : sudo dpkg -i \
cpp-3.3_3.3.6-15ubuntu4_i386.deb g++-3.3_3.3.6-15ubuntu4_i386.deb \
gcc-3.3_3.3.6-15ubuntu4_i386.deb gcc-3.3-base_3.3.6-15ubuntu4_i386.deb \
libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb

Having ns-allinone-2.27/ and ns-allinone-2.34/ in the same directory
e.g. /home/"username"/ns2/ :
cd ns-allinone-2.27/
mv otcl-1.8/ back-otcl-1.8
mv tcl8.4.5/ back-tcl8.4.5
mv tclcl-1.15/ back-tclcl-1.15
mv tk8.4.5/ back-tk8.4.5

ln -s ../ns-allinone-2.34/tcl8.4.18/
ln -s ../ns-allinone-2.34/tcl8.4.18/ tcl8.4.5
ln -s ../ns-allinone-2.34/tk8.4.18/
ln -s ../ns-allinone-2.34/tk8.4.18/ tk8.4.5
ln -s ../ns-allinone-2.34/otcl-1.13/
ln -s ../ns-allinone-2.34/otcl-1.13/ otcl-1.8
ln -s ../ns-allinone-2.34/tclcl-1.19/
ln -s ../ns-allinone-2.34/tclcl-1.19/ tclcl-1.15

mkdir include ( If not present.)
cd include/
ln -s ../tcl8.4.18/generic/tclInt.h
ln -s ../tcl8.4.18/generic/tclIntDecls.h
( These two links may already be present.)

Apply the tk-8.4-lastevent.patch in tk8.4.14.
Apply the otcl-113-configure.in.patch in otcl-1.13.

Then : ./install , in the ns-allinone-2.27/ top directory.

For more info : 'LQ Search' > "Tag Name" = ns2 ,
'LQ Search' > "Tag Name" = leach .


keepwalking 03-18-2011 09:04 AM

Hellow All

I m trying to install ns2.27 on ubuntu 9.10 but I getting errors when I using the following comnand: wget http://www.tekno.chalmers.se/~yushen...7-gcc410.patch
please help me to solve this error.

knudfl 03-18-2011 11:22 AM

# 29

Installing ns-2.27 on Ubuntu 9.10 : Please read post # 3.

The patch http://www.linuxquestions.org/questi...379/page3.html
'ns-2.27-gcc410.patch' is attached to post # 41.
( http://norae.tistory.com/67 )

'ns-2.27-gcc410.patch' : OK for Ubuntu 7.10, CentOS5, PCLinuxOS. ( Fedora ? )

..

keepwalking 03-22-2011 05:42 AM

Hello every one.
I'm trying to install ns2.27 but I'm finding this error :

keepwalking@ubuntu:~$ wget http://www.tekno.chalmers.se/~yushen...7-gcc410.patch
--2011-03-22 13:39:20-- http://www.tekno.chalmers.se/~yushen...7-gcc410.patch
Resolving squid.uzulu.ac.za... 10.61.3.9
Connecting to squid.uzulu.ac.za|10.61.3.9|:3128... connected.
Proxy request sent, awaiting response... 503 Service Unavailable
2011-03-22 13:39:22 ERROR 503: Service Unavailable.

Can anyone help me to solve this problem.

knudfl 03-22-2011 06:25 AM

# 31 @ keepwalking :

You'd forgot to read the answer to you in post # 30 ? ?



..

shidayat 03-24-2011 07:34 PM

hi LQ,
I want to install ns2.27 under ubuntu 9.10 on Virtual Box.
I've followed the instruction on post #3, but get error when installing packages:

Code:

shidayat@shidayat-vbox:~$ sudo dpkg -i \
> cpp-3.3_3.3.6-15ubuntu4_i386.deb g++-3.3_3.3.6-15ubuntu4_i386.deb \
> gcc-3.3_3.3.6-15ubuntu4_i386.deb gcc-3.3-base_3.3.6-15ubuntu4_i386.deb \
> libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb
dpkg: error processing cpp-3.3_3.3.6-15ubuntu4_i386.deb (--install):
 cannot access archive: No such file or directory
dpkg: error processing g++-3.3_3.3.6-15ubuntu4_i386.deb (--install):
 cannot access archive: No such file or directory
dpkg: error processing gcc-3.3_3.3.6-15ubuntu4_i386.deb (--install):
 cannot access archive: No such file or directory
dpkg: error processing gcc-3.3-base_3.3.6-15ubuntu4_i386.deb (--install):
 cannot access archive: No such file or directory
dpkg: error processing libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 cpp-3.3_3.3.6-15ubuntu4_i386.deb
 g++-3.3_3.3.6-15ubuntu4_i386.deb
 gcc-3.3_3.3.6-15ubuntu4_i386.deb
 gcc-3.3-base_3.3.6-15ubuntu4_i386.deb
 libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb

can someone tell me what wrong?

knudfl 03-25-2011 04:38 AM

#33 @shidayat, welcome to LQ.

Please open a terminal window and do : sudo gedit /etc/apt/sources.list
and add the 'hardy' lines : see the edited post # 3 :
http://www.linuxquestions.org/questi...10-a-782356/#3
Next : install g++-3.3 : sudo apt-get install g++-3.3



When you can't use 'apt-get' ( If you have no internet connection ) :

Using "dpkg -i" : The first command is always 'pwd', to decide your location.
Then you can do : cd Downloads/ ( or wherever the files are. ( Desktop ? )).
And then your "next command" will work.

..

shidayat 03-25-2011 10:43 PM

hi knudfl,

i've added the hardy lines on sources.list but when i sudo apt-get install g++-3.3 it still wont work
so i downloaded those packages and dpkg -i ...

Code:

shidayat@shidayat-vbox:~/ns2$ ls
cpp-3.3_3.3.6-15ubuntu4_i386.deb            ns-allinone-2.27
dk4.patch                                    ns-allinone-2.27-sip-v1_11.tar.gz
g++-3.3_3.3.6-15ubuntu4_i386.deb            ns-allinone-2.27.tar.gz
gcc-3.3_3.3.6-15ubuntu4_i386.deb            ns-allinone-2.34
gcc-3.3-base_3.3.6-15ubuntu4_i386.deb        ns-allinone-2.34.tar.gz
libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb  otcl-113-configure.in.patch
newdiffserv-17-06-2003.tar.gz                tk-8.4-lastevent.patch
shidayat@shidayat-vbox:~/ns2$ sudo dpkg -i \
> cpp-3.3_3.3.6-15ubuntu4_i386.deb g++-3.3_3.3.6-15ubuntu4_i386.deb \
> gcc-3.3_3.3.6-15ubuntu4_i386.deb gcc-3.3-base_3.3.6-15ubuntu4_i386.deb \
> libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb
Selecting previously deselected package cpp-3.3.
(Reading database ... 119606 files and directories currently installed.)
Unpacking cpp-3.3 (from cpp-3.3_3.3.6-15ubuntu4_i386.deb) ...
Selecting previously deselected package g++-3.3.
Unpacking g++-3.3 (from g++-3.3_3.3.6-15ubuntu4_i386.deb) ...
Selecting previously deselected package gcc-3.3.
Unpacking gcc-3.3 (from gcc-3.3_3.3.6-15ubuntu4_i386.deb) ...
Selecting previously deselected package gcc-3.3-base.
Unpacking gcc-3.3-base (from gcc-3.3-base_3.3.6-15ubuntu4_i386.deb) ...
Selecting previously deselected package libstdc++5-3.3-dev.
Unpacking libstdc++5-3.3-dev (from libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb) ...
Setting up gcc-3.3-base (1:3.3.6-15ubuntu4) ...
dpkg: dependency problems prevent configuration of libstdc++5-3.3-dev:
 libstdc++5-3.3-dev depends on libstdc++5 (>= 1:3.3.6-15ubuntu4); however:
  Package libstdc++5 is not installed.
dpkg: error processing libstdc++5-3.3-dev (--install):
 dependency problems - leaving unconfigured
Setting up cpp-3.3 (1:3.3.6-15ubuntu4) ...
dpkg: dependency problems prevent configuration of g++-3.3:
 g++-3.3 depends on libstdc++5-3.3-dev (= 1:3.3.6-15ubuntu4); however:
  Package libstdc++5-3.3-dev is not configured yet.
dpkg: error processing g++-3.3 (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db ...
Setting up gcc-3.3 (1:3.3.6-15ubuntu4) ...
Errors were encountered while processing:
 libstdc++5-3.3-dev
 g++-3.3

it means g++-3.3 wasn't installed right?
could u tell me where went wrong?
======================================================
i download libstdc++5_3.3.6-15ubuntu4_i386.deb and add it on dpkg -i ...
Code:

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

is it fine?

knudfl 03-26-2011 04:02 AM

# 35

The install command is : sudo apt-get install g++-3.3

Meaning : The command will install all the packages ! All !
No need to install any downloaded packages, when apt can do the job.



Quote:

Package libstdc++5 is not installed
If you can't use apt-get or Synaptic : Install libstdc++5 otherwise.

..

keepwalking 03-28-2011 03:13 AM

dear all

I have been trying to download g++33 using the following command: sudo apt-get install g++-33
[sudo] password for keepwalking:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package g++-33
but get the above errors can any one help me to solve this problems

fahimeh_ak 03-28-2011 03:31 AM

help me install ns2.27 on ubunto 10.04
 
Hi everybody
i want to install ns2.27 on ubuntu (i want to use SIP), i read your post, but when you say:

the required g++-3.3 : sudo apt-get install g++-3.3
For that, hardy must be added to /etc/apt/sources.list
Code:

deb http://76.73.4.58/ubuntu/ hardy-updates main
deb http://76.73.4.58/ubuntu/ hardy universe
deb http://security.ubuntu.com/ubuntu hardy-security main
deb http://security.ubuntu.com/ubuntu hardy-security universe

The g++-3.3 packages can also be found here
http://packages.ubuntu.com/hardy/g++-3.3
to do : sudo dpkg -i \
cpp-3.3_3.3.6-15ubuntu4_i386.deb g++-3.3_3.3.6-15ubuntu4_i386.deb \
gcc-3.3_3.3.6-15ubuntu4_i386.deb gcc-3.3-base_3.3.6-15ubuntu4_i386.deb \
libstdc++5-3.3-dev_3.3.6-15ubuntu4_i386.deb

i become confused. I'm new to linux and i can't edit source.list. in addition, i download g++.3.3 but i don't know where i must copy downloaded file to linux can install it?!
please help me. it's very urgent for me!
Thanks

knudfl 03-28-2011 07:05 AM

#38 @ fahimeh_ak.

sudo gedit /etc/apt/sources.list
... Then you can add the four lines.

Quote:

I download g++.3.3
Can be done if you have no internet connection : Five packages are required.
1) cd Download/ ( or wherever you have the packages ( Desktop ? ))
2) sudo dpkg -i <all-packages>

abutre 03-28-2011 01:16 PM

ns-2.29 + ns-2.29-nist-mob-022707.tgz
 
Hi knudfl,

I'm following this post a long time.

I've installed ns-2.29 successfully in ubuntu 10.04. My problem is when i try install mobility package from nist. I copy the ns-2.29 to ns-allinone-2.29 and try to compile.

I got this error, Any idea?

`.gnu.linkonce.t._ZN8hdr_bnep7hdr_lenEv' referenced in section `.rodata' of bluetooth/scat-form.o: defined in discarded section `.gnu.linkonce.t._ZN8hdr_bnep7hdr_lenEv' of bluetooth/scat-form.o
collect2: ld returned 1 exit status
make: *** [ns] Error 1
Ns make failed!

Thank You!

knudfl 03-28-2011 03:00 PM

@abutre post #40 : Welcome to LQ.

Read the LQ Rules http://www.linuxquestions.org/linux/rules.html
Double posting is not allowed.
And avoid off topic questions : This thread is not about ns-2.29.
http://www.linuxquestions.org/linux/...Ask_a_Question
http://linuxsilo.net/docs/smart-questions_en.html

shidayat 03-29-2011 07:37 PM

hi knudfl,

finally, g++-3.3 installed. as you told me, after changing the sources.list, I must sudo apt-get update.

at your patching step, i found copying tk-8.4-lastevent.patch to tk8.4.14 is it should be tk8.4.18 ? because there is no tk8.4.14 at my ns directory
i assume this should be tk8.4.18, and i patching there then ./install
my error is the same as post #4
Code:

otcl-1.8 make failed! Exiting ...
is there something i miss?

i searching on other thread n found that before build ns2 sudo apt-get remove tcl* must be done is it right?

fahimeh_ak 03-30-2011 09:31 AM

problem with installing ns2.27!!!
 
1 Attachment(s)
Hi
first of all, sorry for my bad english
I am trying to install ns2.27 on my ubuntu 10.04
I used your post #3 and i done all of it's step according to attached file.
but when I run ./install i got this error:

In file included from /usr/include/math.h:40,
from setdest.cc:43:
/usr/include/bits/inf.h:27:1: warning: this is the location of the previous definition
In file included from ../../../config.h:54,
from setdest.h:5,
from setdest.cc:57:
../../../autoconf.h:85: error: ‘CPP_NAMESPACE’ is not a namespace-name
../../../autoconf.h:85: error: expected namespace-name before ‘;’ token
In file included from setdest.cc:57:
setdest.h:26: error: extra qualification ‘vector::’ on member ‘operator=’
setdest.h:31: error: extra qualification ‘vector::’ on member ‘operator+=’
setdest.h:36: error: extra qualification ‘vector::’ on member ‘operator==’
setdest.h:39: error: extra qualification ‘vector::’ on member ‘operator!=’
setdest.cc: In member function ‘void Node::Dump()’:
setdest.cc:876: error: cast from ‘Neighbor*’ to ‘int’ loses precision
make[1]: *** [setdest.o] Error 1
make[1]: Leaving directory `/home/fahimeh/ns/ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen/setdest'
make[1]: Entering directory `/home/fahimeh/ns/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/dec'
g++ -c -DSTL_NAMESPACE=@STL_NAMESPACE@ -I. -I/home/fahimeh/ns/ns-allinone-2.27/tclcl-1.15 -I/home/fahimeh/ns/ns-allinone-2.27/otcl-1.8 -I/home/fahimeh/ns/ns-allinone-2.27/include -I/home/fahimeh/ns/ns-allinone-2.27/include -I/usr/include/pcap -o proxytrace.o proxytrace.cc
In file included from proxytrace.cc:3:
../../../autoconf.h:85: error: ‘CPP_NAMESPACE’ is not a namespace-name
../../../autoconf.h:85: error: expected namespace-name before ‘;’ token
make[1]: *** [proxytrace.o] Error 1
make[1]: Leaving directory `/home/fahimeh/ns/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/dec'
make[1]: Entering directory `/home/fahimeh/ns/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/epa'
g++ -c -I. -I/home/fahimeh/ns/ns-allinone-2.27/tclcl-1.15 -I/home/fahimeh/ns/ns-allinone-2.27/otcl-1.8 -I/home/fahimeh/ns/ns-allinone-2.27/include -I/home/fahimeh/ns/ns-allinone-2.27/include -I/usr/include/pcap -o tr-stat.o tr-stat.cc
tr-stat.cc: In function ‘double lf_analyze(Entry&)’:
tr-stat.cc:154: error: cast from ‘void*’ to ‘int’ loses precision
make[1]: *** [tr-stat.o] Error 1
make[1]: Leaving directory `/home/fahimeh/ns/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/epa'
make[1]: Entering directory `/home/fahimeh/ns/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/nlanr'
g++ -c -DSTL_NAMESPACE=@STL_NAMESPACE@ -I. -I../../.. -I/home/fahimeh/ns/ns-allinone-2.27/tclcl-1.15 -I/home/fahimeh/ns/ns-allinone-2.27/otcl-1.8 -I/home/fahimeh/ns/ns-allinone-2.27/include -I/home/fahimeh/ns/ns-allinone-2.27/include -I/usr/include/pcap -o tr-stat.o tr-stat.cc
In file included from ../../../config.h:54,
from logparse.h:7,
from tr-stat.cc:24:
../../../autoconf.h:85: error: ‘CPP_NAMESPACE’ is not a namespace-name
../../../autoconf.h:85: error: expected namespace-name before ‘;’ token
tr-stat.cc: In function ‘double lf_analyze(lf_entry&)’:
tr-stat.cc:141: error: cast from ‘void*’ to ‘int’ loses precision
tr-stat.cc:152: error: cast from ‘void*’ to ‘int’ loses precision
make[1]: *** [tr-stat.o] Error 1
make[1]: Leaving directory `/home/fahimeh/ns/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/nlanr'
make[1]: Entering directory `/home/fahimeh/ns/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/ucb'
g++ -c -I. -I/home/fahimeh/ns/ns-allinone-2.27/tclcl-1.15 -I/home/fahimeh/ns/ns-allinone-2.27/otcl-1.8 -I/home/fahimeh/ns/ns-allinone-2.27/include -I/home/fahimeh/ns/ns-allinone-2.27/include -I/usr/include/pcap -o tr-stat.o tr-stat.cc
tr-stat.cc: In function ‘double lf_analyze(lf_entry&)’:
tr-stat.cc:174: error: cast from ‘void*’ to ‘int’ loses precision
tr-stat.cc:187: error: cast from ‘void*’ to ‘int’ loses precision
make[1]: *** [tr-stat.o] Error 1
make[1]: Leaving directory `/home/fahimeh/ns/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/ucb'
make: *** [all-recursive] Error 2
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems


actually i don't know what I must do know! please help me!

knudfl 03-30-2011 01:34 PM

# 42 @shidayat : We'll look at that later, when you have edited post # 42,
i.e. shortened "long words", that spoil formatting.
Please delete this "word" : =========================================================


@fahimeh_ak , post # 43 :
Quote:

make[1]: Leaving directory `/home/fahimeh/ns/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/ucb
All "indep-utils/" come with a Makefile. Edit the Makefile "CC = gcc" to e.g. gcc-3.3.

Not very important : The binary 'ns' has been created at this stage.
"indep-utils/" are just the last "extra files".
They usually fail that way in a 64bits Ubuntu 10.xx.

..

knudfl 03-31-2011 05:22 AM

# 42 , @ shidayat
cd tk8.4x/ ( That be tk8.4, any version. 8.4.14 is just a typo somewhere.)
patch -p0 < <path-to-where-you-have-the-patch> tk-8.4-lastevent.patch
I.e. copying the patch to tk8.4.18/ is not really required.


cd ns-allinone-2.27/ && export CC=gcc-3.3 CXX=g++-3.3 && ./install

... This will insure that all applications use g++-3.3
Be aware that the "export ..." command is temporary, will reset to g++(4.4)
when you exit the terminal.

P.S. : If you still have issues with otcl : Edit the otcl Makefile line 7 to :
CC = gcc-3.3
I.e. not all Makefiles are recreated, when you run ./install.

..

shidayat 03-31-2011 07:25 PM

Code:

Nam has been installed successfully.
Please compile your xgraph separately.
Please compile your gt-itm & sgb2ns separately.
Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.4.5:        /home/shidayat/ns2/ns-allinone-2.27/{bin,include,lib}
tk8.4.5:                /home/shidayat/ns2/ns-allinone-2.27/{bin,include,lib}
otcl:                /home/shidayat/ns2/ns-allinone-2.27/otcl-1.8
tclcl:                /home/shidayat/ns2/ns-allinone-2.27/tclcl-1.15
ns:                /home/shidayat/ns2/ns-allinone-2.27/ns-2.27/ns
nam:        /home/shidayat/ns2/ns-allinone-2.27/nam-1.10/nam

yes, finally installation complete. thank you knudfl.

ps:
after patching tk-8.4 and otcl-113, i made a change on Makefile.in at otcl-1.8 --> CC = gcc-3.3
then after that ./install

fahimeh_ak 04-05-2011 02:31 AM

Thanks
 
Thank you so much
using "export CC=gcc-3.3 CXX=g++-3.3" my ns2.27 installed successfully!
but I have another problem now.
before installing ns2.27 I had install ns2.34, and now i edit bashrc file as bellow:

Code:

# LD_LIBRARY_PATH
OTCL_LIB=/home/fahimeh/ns/ns-allinone-2.27/otcl-1.8
NS2_LIB=/home/fahimeh/ns/ns-allinone-2.27/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/home/fahimeh/ns/ns-allinone-2.27/tcl8.4.5/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/fahimeh/ns/ns-allinone-2.27/bin:/home/fahimeh/ns/ns-allinone-2.27/tcl8.4.5/unix:/home/fahimeh/ns/ns-allinone-2.27/tk8.4.5/unix
NS=/home/fahimeh/ns/ns-allinone-2.27/ns-2.27/
NAM=/home/fahimeh/ns/ns-allinone-2.27/nam-1.10/
PATH=$PATH:$XGRAPH:$NS:$NA
M

but when i use ns from command line it get following error:

Code:

** glibc detected *** ns: realloc(): invalid next size: 0x00000000024d28f0 ***
======= Backtrace: =========
/lib/libc.so.6(+0x775b6)[0x7f1ff2c3a5b6]
/lib/libc.so.6(+0x7dd96)[0x7f1ff2c40d96]
/lib/libc.so.6(realloc+0xf0)[0x7f1ff2c410b0]
ns(Tcl_Realloc+0x15)[0x838f75]
ns(Tcl_SetObjLength+0x7a)[0x88b32a]
ns(TclpNativeJoinPath+0xa5)[0x863a25]
ns(Tcl_FSJoinPath+0x42b)[0x87403b]
ns(Tcl_JoinPath+0x5f)[0x86267f]
ns(TclpInitLibraryPath+0x5a3)[0x89e303]
ns[0x854777]
ns(Tcl_FindExecutable+0x92)[0x8548a2]
ns(Tcl_Main+0x3d)[0x87a18d]
ns(nslibmain+0x25)[0x827a01]
ns(main+0x20)[0x827b90]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f1ff2be1c4d]
ns[0x594b09]
======= Memory map: ========
00400000-00a0a000 r-xp 00000000 07:00 811317                            /home/fahimeh/ns-allinone-2.34-mysip/ns-2.34/ns
00c09000-00c0b000 r--p 00609000 07:00 811317                            /home/fahimeh/ns-allinone-2.34-mysip/ns-2.34/ns
00c0b000-00caa000 rw-p 0060b000 07:00 811317                            /home/fahimeh/ns-allinone-2.34-mysip/ns-2.34/ns
00caa000-00cb7000 rw-p 00000000 00:00 0
024cb000-024ec000 rw-p 00000000 00:00 0                                  [heap]
7f1fec000000-7f1fec021000 rw-p 00000000 00:00 0
7f1fec021000-7f1ff0000000 ---p 00000000 00:00 0
7f1ff259d000-7f1ff25a2000 r-xp 00000000 07:00 265010                    /usr/lib/libXdmcp.so.6.0.0
7f1ff25a2000-7f1ff27a1000 ---p 00005000 07:00 265010                    /usr/lib/libXdmcp.so.6.0.0
7f1ff27a1000-7f1ff27a2000 r--p 00004000 07:00 265010                    /usr/lib/libXdmcp.so.6.0.0
7f1ff27a2000-7f1ff27a3000 rw-p 00005000 07:00 265010                    /usr/lib/libXdmcp.so.6.0.0
7f1ff27a3000-7f1ff27a5000 r-xp 00000000 07:00 264999                    /usr/lib/libXau.so.6.0.0
7f1ff27a5000-7f1ff29a5000 ---p 00002000 07:00 264999                    /usr/lib/libXau.so.6.0.0
7f1ff29a5000-7f1ff29a6000 r--p 00002000 07:00 264999                    /usr/lib/libXau.so.6.0.0
7f1ff29a6000-7f1ff29a7000 rw-p 00003000 07:00 264999                    /usr/lib/libXau.so.6.0.0
7f1ff29a7000-7f1ff29c2000 r-xp 00000000 07:00 266005                    /usr/lib/libxcb.so.1.1.0
7f1ff29c2000-7f1ff2bc1000 ---p 0001b000 07:00 266005                    /usr/lib/libxcb.so.1.1.0
7f1ff2bc1000-7f1ff2bc2000 r--p 0001a000 07:00 266005                    /usr/lib/libxcb.so.1.1.0
7f1ff2bc2000-7f1ff2bc3000 rw-p 0001b000 07:00 266005                    /usr/lib/libxcb.so.1.1.0
7f1ff2bc3000-7f1ff2d3d000 r-xp 00000000 07:00 790629                    /lib/libc-2.11.1.so
7f1ff2d3d000-7f1ff2f3c000 ---p 0017a000 07:00 790629                    /lib/libc-2.11.1.so
7f1ff2f3c000-7f1ff2f40000 r--p 00179000 07:00 790629                    /lib/libc-2.11.1.so
7f1ff2f40000-7f1ff2f41000 rw-p 0017d000 07:00 790629                    /lib/libc-2.11.1.so
7f1ff2f41000-7f1ff2f46000 rw-p 00000000 00:00 0
7f1ff2f46000-7f1ff2f5c000 r-xp 00000000 07:00 786604                    /lib/libgcc_s.so.1
7f1ff2f5c000-7f1ff315b000 ---p 00016000 07:00 786604                    /lib/libgcc_s.so.1
7f1ff315b000-7f1ff315c000 r--p 00015000 07:00 786604                    /lib/libgcc_s.so.1
7f1ff315c000-7f1ff315d000 rw-p 00016000 07:00 786604                    /lib/libgcc_s.so.1
7f1ff315d000-7f1ff3253000 r-xp 00000000 07:00 265904                    /usr/lib/libstdc++.so.6.0.13
7f1ff3253000-7f1ff3453000 ---p 000f6000 07:00 265904                    /usr/lib/libstdc++.so.6.0.13
7f1ff3453000-7f1ff345a000 r--p 000f6000 07:00 265904                    /usr/lib/libstdc++.so.6.0.13
7f1ff345a000-7f1ff345c000 rw-p 000fd000 07:00 265904                    /usr/lib/libstdc++.so.6.0.13
7f1ff345c000-7f1ff3471000 rw-p 00000000 00:00 0
7f1ff3471000-7f1ff34f3000 r-xp 00000000 07:00 790634                    /lib/libm-2.11.1.so
7f1ff34f3000-7f1ff36f2000 ---p 00082000 07:00 790634                    /lib/libm-2.11.1.so
7f1ff36f2000-7f1ff36f3000 r--p 00081000 07:00 790634                    /lib/libm-2.11.1.so
7f1ff36f3000-7f1ff36f4000 rw-p 00082000 07:00 790634                    /lib/libm-2.11.1.so
7f1ff36f4000-7f1ff36f6000 r-xp 00000000 07:00 790632                    /lib/libdl-2.11.1.so
7f1ff36f6000-7f1ff38f6000 ---p 00002000 07:00 790632                    /lib/libdl-2.11.1.so
7f1ff38f6000-7f1ff38f7000 r--p 00002000 07:00 790632                    /lib/libdl-2.11.1.so
7f1ff38f7000-7f1ff38f8000 rw-p 00003000 07:00 790632                    /lib/libdl-2.11.1.so
7f1ff38f8000-7f1ff390f000 r-xp 00000000 07:00 790636                    /lib/libnsl-2.11.1.so
7f1ff390f000-7f1ff3b0e000 ---p 00017000 07:00 790636                    /lib/libnsl-2.11.1.so
7f1ff3b0e000-7f1ff3b0f000 r--p 00016000 07:00 790636                    /lib/libnsl-2.11.1.so
7f1ff3b0f000-7f1ff3b10000 rw-p 00017000 07:00 790636                    /lib/libnsl-2.11.1.so
7f1ff3b10000-7f1ff3b12000 rw-p 00000000 00:00 0
7f1ff3b12000-7f1ff3c43000 r-xp 00000000 07:00 264995                    /usr/lib/libX11.so.6.3.0
7f1ff3c43000-7f1ff3e43000 ---p 00131000 07:00 264995                    /usr/lib/libX11.so.6.3.0
7f1ff3e43000-7f1ff3e44000 r--p 00131000 07:00 264995                    /usr/lib/libX11.so.6.3.0
7f1ff3e44000-7f1ff3e48000 rw-p 00132000 07:00 264995                    /usr/lib/libX11.so.6.3.0
7f1ff3e48000-7f1ff3e59000 r-xp 00000000 07:00 265012                    /usr/lib/libXext.so.6.4.0
7f1ff3e59000-7f1ff4058000 ---p 00011000 07:00 265012                    /usr/lib/libXext.so.6.4.0
7f1ff4058000-7f1ff4059000 r--p 00010000 07:00 265012                    /usr/lib/libXext.so.6.4.0
7f1ff4059000-7f1ff405a000 rw-p 00011000 07:00 265012                    /usr/lib/libXext.so.6.4.0
7f1ff405a000-7f1ff407a000 r-xp 00000000 07:00 790622                    /lib/ld-2.11.1.so
7f1ff4263000-7f1ff426a000 rw-p 00000000 00:00 0
7f1ff4277000-7f1ff4279000 rw-p 00000000 00:00 0
7f1ff4279000-7f1ff427a000 r--p 0001f000 07:00 790622                    /lib/ld-2.11.1.so
7f1ff427a000-7f1ff427b000 rw-p 00020000 07:00 790622                    /lib/ld-2.11.1.so
7f1ff427b000-7f1ff427c000 rw-p 00000000 00:00 0
7fffdec4d000-7fffdec62000 rw-p 00000000 00:00 0                          [stack]
7fffdedff000-7fffdee00000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted

"
what i must do know??

knudfl 04-05-2011 05:24 AM

Post # 47 @fahimeh_ak
Quote:

and now I edit bashrc file as bellow
Probably no reason to have any entries to bashrc for any ns2 stuff at all.


Will this work : 'cd ns/ns-allinone-2.27/ns-2.27/ && ./ns' ?

The most easy way to have 'ns' in the PATH is :
cd ns/ns-allinone-2.27/ns-2.27/ && sudo make install
→ → 'ns' will be copied to /usr/local/bin/ : And thus be in a system path.

LD_LIBRARY_PATH settings : ns is statically compiled, and depends only on files
in /usr/lib/ , which already are in the system LD_LIBRARY_PATH.
(The suggestion to edit bashrc is an old text, required for older ns2 (=<2.26)).
...

knudfl 04-06-2011 04:29 AM

Post # 47 @fahimeh_ak

And by the way : Colored text is not appreciated :
Please use the edit button and change red to black. The yellow can be deleted.

Also : code tags must be used :
I.e. [/code] at code end, and [code] at code text start. Please edit.

..

eheim602 04-16-2011 11:07 AM

Hello knudfl,

You've helped a lot of people here. I'm trying to install ns-2.27 on Ubuntu 10.04.1. The install goes fine until I get to Tclcl-1.15 and I get this:

Code:

============================================================
* Build Tclcl-1.15
============================================================
No .configure file found in current directory
Continuing with default options...
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking for main in -lXbsd... no
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... yes
checking for dcgettext in -lintl... no
checking for getnodebyname in -ldnet_stub... no
checking that g++ can handle -O2... no
checking standard STL is available... no
checking for ranlib... ranlib
checking for snprintf... yes
checking for ANSI C header files... (cached) yes
checking for strtoq... yes
checking for strtoll... yes
checking size of long... 4
checking for __int64_t... no
checking for long long... yes
checking for int64_t... yes
checking which kind of 64-bit int to use... int64_t
checking for tcl.h... -I../include
checking for tclInt.h... -I../include
checking for libtcl8.4... -L../lib -ltcl8.4
checking for init.tcl... ../lib/tcl8.4
checking for http.tcl... ../lib/tcl8.4/http1.0
checking Tcl http.tcl library... yes
checking for tclsh8.4.18... no
checking for tclsh8.4... ../bin/tclsh8.4
checking for tk.h... -I../include
checking for libtk8.4... -L../lib -ltk8.4
checking for tk.tcl... ../lib/tk8.4
checking for otcl.h... -I../otcl
checking for libotcl1.13... -L../otcl -lotcl
checking for X11 header files
checking for X11 library archive
checking for XOpenDisplay in -lX11... yes
checking for XShmAttach in -lXext... yes
checking for zlib.h... -I/usr/include
checking for libz1.1.3... -L/usr/lib -lz
No explicit static compilation flag; setting V_STATIC to ""
checking for dlopen in -ldl... yes
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
g++-3.3 -c  -DNO_TK  -DNDEBUG -DUSE_SHM -DHAVE_LIBZ1_1_3 -DHAVE_ZLIB_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCLINT_H -DHAVE_TCL_H  -DHAVE_CONFIG_H -I. -I/usr/include -I/home/eric/Programs/ns-2/ns-allinone-2.27/otcl -I/home/eric/Programs/ns-2/ns-allinone-2.27/include -I/home/eric/Programs/ns-2/ns-allinone-2.27/include -I/home/eric/Programs/ns-2/ns-allinone-2.27/include -o Tcl.o Tcl.cc
In file included from Tcl.cc:49:
tclcl.h:44:18: otcl.h: No such file or directory
In file included from Tcl.cc:49:
tclcl.h:297: error: syntax error before `*' token
Tcl.cc: In member function `int TclObject::traceVar(const char*, TclObject*)':
Tcl.cc:418: error: `OTclObject' undeclared (first use this function)
Tcl.cc:418: error: (Each undeclared identifier is reported only once for each
  function it appears in.)
Tcl.cc:418: error: `otcl_object' undeclared (first use this function)
Tcl.cc:419: error: `OTclGetObject' undeclared (first use this function)
Tcl.cc:421: error: `OTclOInstVarOne' undeclared (first use this function)
Tcl.cc: In constructor `TclClass::TclClass(const char*)':
Tcl.cc:452: error: class `TclClass' does not have any field named `class_'
Tcl.cc: In static member function `static int TclClass::create_shadow(void*,
  Tcl_Interp*, int, const char**)':
Tcl.cc:508: error: `OTclGetObject' undeclared (first use this function)
Tcl.cc:509: error: `OTclAddPMethod' undeclared (first use this function)
Tcl.cc: In static member function `static int TclClass::dispatch_instvar(void*,
  Tcl_Interp*, int, const char**)':
Tcl.cc:537: error: `OTclGetObject' undeclared (first use this function)
Tcl.cc:571: error: `OTclOInstVarOne' undeclared (first use this function)
Tcl.cc: In member function `virtual void TclClass::bind()':
Tcl.cc:601: error: `class_' undeclared (first use this function)
Tcl.cc:601: error: `OTclGetClass' undeclared (first use this function)
Tcl.cc:603: error: `OTclAddIMethod' undeclared (first use this function)
Tcl.cc: In member function `void TclClass::add_method(const char*)':
Tcl.cc:617: error: syntax error before `)' token
make: *** [Tcl.o] Error 1
tclcl-1.15 make failed! Exiting ...

For some reason it cannot find otcl.h? Any thoughts? Also, I have a working build of ns-2.34. Is there a way to just install 2.27 without having to rebuild the entire stack of other stuff?


All times are GMT -5. The time now is 02:44 AM.