LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NS2 v2.26 installation on Ubuntu 11.10 (https://www.linuxquestions.org/questions/linux-newbie-8/ns2-v2-26-installation-on-ubuntu-11-10-a-934738/)

ulyssues.fam 03-16-2012 02:42 AM

NS2 v2.26 installation on Ubuntu 11.10
 
Hello all,

I'm not quite sure if I should post here but from what I've seen most the people have posted about this issue in this part of the forum.

I've been trying to install NS2 v2.26 on my Ubuntu 11.10 for the past two weeks asI am trying to implement the Z-MAC protocol I have found from http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm and the DRAND from http://www4.ncsu.edu/~rhee/export/zm...rand/drand.htm which is needed in order for the Z-MAC implementation to work.

It is been two hectic weeks where I have not managed yet to make it work. I've only managed to install NS2 v.2.35 which works flawlessly. I;ve checked all the possible sites and threads for the subject but cannot work it out! I always get the following error:

* Build tcl8.3.2
============================================================
loading cache ./config.cache
checking for ranlib... ranlib
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 getcwd... yes
checking for opendir... yes
checking for strstr... yes
checking for strtol... 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 termios vs. termio vs. sgtty... termios
checking fd_set and sys/select... 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 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 opendir... (cached) yes
checking union wait... yes
checking matherr support... 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 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 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 ...


In my attempts to find a solution I have tried to install NS2 v2.27 based on the following thread:
http://www.linuxquestions.org/questi...9-10-a-782356/

but when it asks to apply the patch from this thread:
http://www.linuxquestions.org/questi...12-a-797763/#7

I get the following errors:

******@***:~/NS2/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


My basic objectives are the following:
1)If there is ANY way that I can install NS2 2.26 on my Ubuntu 11.10
or
2)If there is a way to fix the patching process for v2.27, maybe it will work with the Z-MAC I am trying to work with.


Any ideas?

Thank you all for your precious time! :)

knudfl 03-16-2012 04:56 AM

Welcome to LQ. .. :) ..

Quote:

If there is ANY way that I can install NS2 2.26 on my Ubuntu 11.10
No. Definitely not. Out of the box ns-2.35 only. And a fixed ns-2.34 :
http://erl1.wordpress.com/2011/10/14...neiric-ocelot/

All ns- 2.27 ... 2.33 : Ubuntu 10.04 will do.
2.27 http://www.linuxquestions.org/questi...10-a-782356/#3

NS-allinone-2.26 will compile with g++/gcc version 3.3.3,
not available for any contemporary Ubuntu. And Ubuntu : No go with tcl8.3.2.
There may be a patch that makes it possible on Ubuntu 10.04 with g++-4.1 :
( Or g++-3.4 = version 3.4.6 )
#15 http://www.linuxquestions.org/questi...2-a-797763/#15
The ns-2.26-gcc410.patch will also fix tcl / tk 8.3.2 configuring.

But : All the builds, I have seen, or answered to, (and tested)
were done on a default ns2 OS = Fedora or CentOS.

'gcc33-c++-3.3.3', for Fedora, CentOS (and Suse)
http://download.opensuse.org/reposit...E-10_SDK/i586/

.

Satyaveer Arya 03-16-2012 05:05 AM

You'll keep on getting errors in ubuntu. Ubuntu is not the right OS to install and use ns. Use CentOS or OpenSuse for ns and use ns-allinone.

ulyssues.fam 03-16-2012 06:09 AM

Ok guys, I will follow your advice!

Which version of Fedora should I use? I've found version 8 but I believe that is obselete and maybe I won't be able to download any packets that I may need.

Any ideas?

Thanks!

knudfl 03-16-2012 06:42 AM

The "Long Term Supported" version is CentOS 6, based on Fedora 12.
( Identical to RHEL 6 and Scientific Linux SL6.)
Works perfect with ns-2.26.

CentOS 6.2 http://www.centos.org/ > http://centos.arcticnetwork.ca/6.2/isos/i386/


.

ulyssues.fam 03-16-2012 10:11 AM

I've went into http://centos.arcticnetwork.ca/6.2/isos/i386/ and downloaded the CentOS-6.2-i386-LiveDVD but when I try to make a bootable USB through the Startup Disk Creator of my Ubuntu, it does not recognize the iso. the same with Windows when I try to create a Bootable Usb through the USB Installer (www.pendrivelinux.com).

Maybe I'm not doing something right? I've started downloading CentOS-6.2-i386-bin-DVD1to2, I hope that will work.

ulyssues.fam 03-17-2012 11:15 AM

No luck, still I cannot create a bootable USB for the CentOS 6.2

Any ideas?

Thank you in advance!

Satyaveer Arya 03-18-2012 01:48 AM

Checkout these two links for creating bootable USB:
http://blog.chenhow.net/2010/07/23/l...nstallation-2/
http://www.cyberciti.biz/faq/linux-c...table-usb-pen/

Satyaveer Arya 03-18-2012 01:51 AM

Or you just burn the DVDs and use them to install CentOS.

ulyssues.fam 03-18-2012 02:46 PM

Done good up to now! Thank you for your help!

After managing to install CentOS 6.2, I am faced with one problem. Everytime I plug in my USB, I cannot enter my ext3 partition as it says: "THe folder contents could not be displayed. You do not have the permissions necessary to view the contents of ...."

It has to do with the privilages of my account. I have found something about visudo but I think that only works for the termina or something..

I logged in as root and I can see my USB and open it and also other applications. But I do not wan to use the root account to work on NS. I just want to work through my account.
I've tried opening KUser for the root account and edited my account and added it into the root group but nothing works.


What can I do in order for my account to have the same funcionality as root?
Any ideas?

Thank you in advance!

ulyssues.fam 03-19-2012 11:58 AM

Hey guys one more question:

After succesfully installing NS2 2.26 on my CentOS 6.2, i run ./validate

UNfortunately after a few tests I get the following error:

Running test pi1:
../../ns test-suite-pi.tcl pi1 QUIET
*** glibc detected *** ../../ns: malloc(): memory corruption (fast): 0x08c799f0 ***


ANy ideas?

THank you

knudfl 03-20-2012 06:58 PM

Two ns-2.26 test builds on the 32bits Scientific Linux SL6.2
( Identical to CentOS 6.2 ) :
The builds were made in different locations ( /home/<?>/8tmp/ ,
/home/<?>/0tmp/ ), to have 2 different ns-2.26 to test.

1) With the "gcc410 patch" :
tar xvf ns-allinone-2.26.tar.gz && patch -p0 < ns-2.26-gcc410.patch
&& cd ns-allinone-2.26/ && export CC=gcc34 CXX=g++34 && ./install
&& cd ns-2.26/ && ./validate : After "500 tests" this appears ..
Running test pi1:
../../ns test-suite-pi.tcl pi1 QUIET
*** glibc detected *** ../../ns: malloc():
memory corruption (fast): 0x094ef840 ***

Never seen that error before. But then again :
There are other errors in the ns-2.26 test suite.
The file "validate.out", line 3378 ( the last line ) :
""validate overall report: all tests passed""
.... So actually the test continues to the end,
but no result is shown in the terminal.
( The test that causes errors : "./test-all-pi" : validate.out, line 2283.)


2) No patches.
# rpm -Uvh cpp33-3.3.3-51.1.i586.rpm
# rpm -Uvh --nodeps gcc33-3.3.3-51.1.i586.rpm
# rpm -Uvh libstdc++33-3.3.3-51.1.i586.rpm
# rpm -Uvh libstdc++33-devel-3.3.3-51.1.i586.rpm
# rpm -Uvh gcc33-c++-3.3.3-51.1.i586.rpm

cd ns-allinone-2.26/ && export CC=gcc-3.3 CXX=g++-3.3 && ./install
&& cd ns-2.26/ && ./validate : The same "memory corruption" error.

And again : "validate.out", line 3378 :
validate overall report: all tests passed
.

visego 05-03-2012 03:28 AM

Hello all,

I am in the same situation of ulyssues.fam. I want work with Z-MAC and DRAND for my project.

I have followed the steps and now, I am running CentOS 6.2 and I have downloaded ns2.26 but when I type ./install for install ns2.26 happen this:

============================================================
* Testing for Cygwin environment
============================================================
Cygwin not detected, proceeding with regular install.
============================================================
* Build XGraph-12.1
============================================================
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... no
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking if malloc debugging is wanted... no
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
./install: línea 163: make: no se encontró la orden
Can not create xgraph; But xgraph is an optional package, continuing...
============================================================
* Build CWeb
============================================================
Making cweb
./install: línea 186: make: no se encontró la orden
cweb failed to make, but it's optional
chmod: no se puede acceder a «cweave»: No existe el fichero o el directorio
chmod: no se puede acceder a «ctangle»: No existe el fichero o el directorio
============================================================
* Build Stanford GraphBase
============================================================
Making sgb
./install: línea 215: make: no se encontró la orden
Unable to create sgb library, but it's optional, so continuing...
============================================================
* Build GT-ITM
============================================================
./install: línea 246: make: no se encontró la orden
./install: línea 252: make: no se encontró la orden
============================================================
* Build zlib
============================================================
Checking for gcc...
Building static library libz.a version 1.1.4 with cc.
Checking for unistd.h... No.
Checking for errno.h... No.
Checking for mmap support... No.
./install: línea 272: make: no se encontró la orden
Zlib make failed, but it's optional Continue ...
============================================================
* Build tcl8.3.2
============================================================
loading cache ./config.cache
checking for ranlib... ranlib
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
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.
[visego@localhost ns-allinone-2.26]$ ^C
[visego@localhost ns-allinone-2.26]$ dpkg --get-selections | grep -i build
bash: dpkg: no se encontró la orden
[visego@localhost ns-allinone-2.26]$ ./install
============================================================
* Testing for Cygwin environment
============================================================
Cygwin not detected, proceeding with regular install.
============================================================
* Build XGraph-12.1
============================================================
loading cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... no
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking if malloc debugging is wanted... no
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
./install: línea 163: make: no se encontró la orden
Can not create xgraph; But xgraph is an optional package, continuing...
============================================================
* Build CWeb
============================================================
Making cweb
./install: línea 186: make: no se encontró la orden
cweb failed to make, but it's optional
chmod: no se puede acceder a «cweave»: No existe el fichero o el directorio
chmod: no se puede acceder a «ctangle»: No existe el fichero o el directorio
ln: creating symbolic link «cweave»: El fichero ya existe
ln: creating symbolic link «ctangle»: El fichero ya existe
============================================================
* Build Stanford GraphBase
============================================================
Making sgb
./install: línea 215: make: no se encontró la orden
Unable to create sgb library, but it's optional, so continuing...
============================================================
* Build GT-ITM
============================================================
./install: línea 246: make: no se encontró la orden
./install: línea 252: make: no se encontró la orden
============================================================
* Build zlib
============================================================
Checking for gcc...
Building static library libz.a version 1.1.4 with cc.
Checking for unistd.h... No.
Checking for errno.h... No.
Checking for mmap support... No.
./install: línea 272: make: no se encontró la orden
Zlib make failed, but it's optional Continue ...
============================================================
* Build tcl8.3.2
============================================================
loading cache ./config.cache
checking for ranlib... ranlib
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
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.
[visego@localhost ns-allinone-2.26]$ yum -y install gcc
Loaded plugins: fastestmirror, refresh-packagekit, security
You need to be root to perform this command.

Do somebody know how solutionate this?

Sorry for my English,

Thanks in advance,

Vicente

knudfl 05-03-2012 06:23 AM

1 Attachment(s)
Post # 13, @visego.

CentOS, Fedora. The ns2 prerequisites : 1) su <password>
2) yum install \
gcc-c++ compat-gcc-34-c++ automake autoconf libtool libX11-devel \
libXext-devel libXau-devel libXmu-devel xorg-x11-proto-devel

And : The install commands are like "1)" in the above post #12 :
tar xvf ns-allinone-2.26.tar.gz && patch -p0 < ns-2.26-gcc410.patch
&& cd ns-allinone-2.26/ && export CC=gcc34 CXX=g++34 && ./install
.

visego 05-03-2012 10:22 AM

Thank you very much knudfl but still I haven't installed ns2.26 because show this error:

When I type
ns-2.26-gcc410.patch

bash: patch: no se encontró la orden (In English is "it didn't find the order)

Do you know that it happen?

Thanks again in advance

Vicente,

knudfl 05-03-2012 12:58 PM

# 15.

It's either : patch -p0 < ns-2.26-gcc410.patch
Or : patch -p0 < ns-2.26-gcc410.patch.txt

The patch must be present in the directory where you extract ns-allinone-2.26.tar.gz


.

visego 05-03-2012 03:42 PM

My last post is wrong, I wanted to say that.



I typed this in the directory of I have ns-2.26-gcc410.patch logically:

patch -p0 < ns-2.26-gcc410.patch

bash: patch: no se encontró la orden (In English is "it didn't find the order)

Do you know that it happen?

Thanks knudfl

knudfl 05-03-2012 03:56 PM

# 17 :

Can mean two things : ( The Spanish text is not quite clear ?
But I think that 'orden' means "command". Ref. my old Danish/Spanish dictionary.)

1) The ns-2.26-gcc410.patch is not present in the current directory.

2) The patch command is not installed :
sudo apt-get install patch / # yum install patch

.

visego 05-04-2012 02:09 AM

Yeah, order means command knudfl

I have installed patch

yum install patch and all OK! Installed: patch.i686 0:2.6-6.el6

And then, I type patch ns-2.26-gcc410.patch and this command don't return nothing. The program is like working but it don't finish...

Next, I type export CC=gcc34 CXX=g++34 and OK! but when I want install with

./install

============================================================
* Testing for Cygwin environment
============================================================
Cygwin not detected, proceeding with regular install.
============================================================
* Build XGraph-12.1
============================================================
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... no
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... missing
checking if malloc debugging is wanted... no
checking for gcc... gcc34
checking whether the C compiler (gcc34 ) works... yes
checking whether the C compiler (gcc34 ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc34 accepts -g... yes
checking how to run the C preprocessor... gcc34 -E
checking for X... libraries , headers
checking for dnet_ntoa in -ldnet... no
checking for dnet_ntoa in -ldnet_stub... no
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for float.h... yes
checking for limits.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for strings.h... yes
checking for unistd.h... yes
checking for strcasecmp... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating autoconf.h
./install: línea 163: make: no se encontró la orden
Can not create xgraph; But xgraph is an optional package, continuing...
============================================================
* Build CWeb
============================================================
Making cweb
./install: línea 186: make: no se encontró la orden
cweb failed to make, but it's optional
chmod: no se puede acceder a «cweave»: No existe el fichero o el directorio
chmod: no se puede acceder a «ctangle»: No existe el fichero o el directorio
============================================================
* Build Stanford GraphBase
============================================================
Making sgb
./install: línea 215: make: no se encontró la orden
Unable to create sgb library, but it's optional, so continuing...
============================================================
* Build GT-ITM
============================================================
./install: línea 246: make: no se encontró la orden
./install: línea 252: make: no se encontró la orden
============================================================
* Build zlib
============================================================
Building static library libz.a version 1.1.4 with gcc34.
Checking for unistd.h... Yes.
Checking for errno.h... Yes.
Checking for mmap support... Yes.
./install: línea 272: make: no se encontró la orden
Zlib make failed, but it's optional Continue ...
============================================================
* Build tcl8.3.2
============================================================
loading cache ./config.cache
checking for ranlib... ranlib
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 getcwd... yes
checking for opendir... yes
checking for strstr... yes
checking for strtol... 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 termios vs. termio vs. sgtty... termios
checking fd_set and sys/select... 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 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 opendir... (cached) yes
checking union wait... yes
checking matherr support... 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 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 if 64bit support is requested... no
checking if 64bit Sparc VIS support is requested... no
checking system version (for dynamic loading)... Linux-2.6.32-220.el6.i686
checking if gcc is being used... yes (gcc -pipe)
checking for dlopen in -ldl... yes
checking for build with symbols... no
checking for sys/ioctl.h... yes
checking for sys/filio.h... no
checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... O_NONBLOCK
checking how to build libraries... static
updating cache ./config.cache
creating ./config.status
creating Makefile
creating tclConfig.sh
./install: línea 298: make: no se encontró la orden
tcl8.3.2 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com

I hope that you can help me again,

Thank you very much,

Vicente,

knudfl 05-04-2012 02:51 AM

#19.
Quote:

I type patch ns-2.26-gcc410.patch
Wrong. It is : patch < ns-2.26-gcc410.patch


Quote:

./install: línea 298: make: no se encontró la orden
make : no such command.

Please do : # yum install make


.

visego 05-04-2012 04:48 AM

The patch is Ok but when I want install with ./install,the error is this

queue/red.cc: In member function ‘virtual void REDQueue::trace(TracedVar*)’:
queue/red.cc:807: error: conversión inválida de ‘const char*’ a ‘char*’
queue/red.cc:808: error: conversión inválida de ‘const char*’ a ‘char*’
queue/red.cc:809: error: conversión inválida de ‘const char*’ a ‘char*’
queue/red.cc:810: error: conversión inválida de ‘const char*’ a ‘char*’
make: *** [queue/red.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

What happen now? Sorry but I am a beginner in CentOS.

Thanks again knudfl

knudfl 05-04-2012 07:34 AM

# 21

Every time you start an "./install" you will have to type :
export CC=gcc34 CXX=g++34 <Enter>
... before you use the './install' command.

Be aware that the export command is temporary :
Will reset to gcc / g++ version 4.4.4 (CentOS6)
when you exit the terminal window.

.

visego 05-06-2012 05:02 AM

Hi again,

I type

export CC=gcc34 CXX=g++34 and this command doesn't return nothing.

After in the same terminal, I type:

./install and the error is the same:

queue/red.cc: In member function ‘virtual void REDQueue::trace(TracedVar*)’:
queue/red.cc:807: error: conversión inválida de ‘const char*’ a ‘char*’
queue/red.cc:808: error: conversión inválida de ‘const char*’ a ‘char*’
queue/red.cc:809: error: conversión inválida de ‘const char*’ a ‘char*’
queue/red.cc:810: error: conversión inválida de ‘const char*’ a ‘char*’
make: *** [queue/red.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

It is strange but I hope that you can help me!

Thanks in advance knudfl,

knudfl 05-06-2012 05:21 AM

#23

If you by accident used the wrong gcc / g++, I guess you will have to
start from scrath with a new unpacked ns-allinone-2.26.tar.gz.

Unless you do a 'make clean' in all the concerned applications / libraries:
tcl8.3.2/unix/, tk8.3.2/unix/, otcl-1.0a8/, tclcl-1.0b13/, ns-2.26/.
And also delete the Makefile, which 'make clean' isn't doing in them all.

.

visego 05-06-2012 01:22 PM

Thank you very much knudfl

Everything is resolved :)

One question, now have I got add some to path??


Now, I'm going to install ZMAC and DRAND. Have you used this protocols?

Regards,

knudfl 05-06-2012 03:36 PM

# 25
Quote:

One question, now have I got add some to path ?
Not required. This will do : 1) cd ns-allinone-2.26/ns-2.26/
su
make install
( 'make install' will copy the binary 'ns' to a system PATH :
/usr/local/bin/ ).
And 2) Make a backup copy of 'ns' : You will need it for default files.
An ns that has new protocols added, will most often not work with default tcl files.

Quote:

Now, I'm going to install ZMAC and DRAND
Please show direct download links to files and documentation,
if you want some advice. And no. I don't know the protocols.
But installing a patch etc. is usually rather easy.

.

visego 05-07-2012 02:34 AM

Quote:

Originally Posted by knudfl (Post 4671842)
# 25

Not required. This will do : 1) cd ns-allinone-2.26/ns-2.26/
su
make install
( 'make install' will copy the binary 'ns' to a system PATH :
/usr/local/bin/ ).

.

[root@localhost ns-2.26]# make install
/usr/bin/install -c -m 555 -o bin -g bin ns /usr/local/bin
/usr/bin/install -c -m 444 -o bin -g bin ns.1 /usr/local/man/man1
/usr/bin/install: no se puede crear el fichero regular «/usr/local/man/man1»: No existe el fichero o el directorio
make: *** [install-man] Error 1

What is it happening?



Quote:

Originally Posted by knudfl (Post 4671842)
# 25
Please show direct download links to files and documentation,
if you want some advice. And no. I don't know the protocols.
But installing a patch etc. is usually rather easy.

.

http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm
http://www4.ncsu.edu/~rhee/export/zm...rand/drand.htm

Thanks again ;)

knudfl 05-07-2012 03:22 AM

Quote:

/usr/bin/install: no se puede crear el fichero regular «/usr/local/man/man1»:
No existe el fichero o el directorio
Doesn't matter, unless you want to use the man page.
And if you want to install the man page : 1) su
2) mkdir -p /usr/local/man/man1
... Then the 'make install' can copy ns.1 to /usr/local/man/man1

knudfl 05-07-2012 06:57 AM

2 Attachment(s)
#25, #27.

http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm :
>>> Before using Z-MAC, some setup is required. For a given topology,
Z-MAC requires each node to know its TDMA slot. This is achieved using DRAND.

Looks like it could be an advantage to have two (more?) installs of ns-2.26.
( Make a backup of the binary 'ns' as 'ns-orig', if you are going to reuse the ns-2.26.)
NS-2.26 is first used with DRAND. If you then afterwords patch the same
install with ZMAC, you will not be able to go back and do more DRAND work.

A) The DRAND ns-2.26.
http://www4.ncsu.edu/~rhee/export/zm...rand/drand.htm
tar xvf ns-allinone-2.26.tar.gz && patch -p0 < ns-2.26-gcc410.patch
cd ns-allinone-2.26/ns-2.26/ && tar xvf drandNS2.tar.gz
Then copy the new files ns-packet.tcl packet.h mac-802_11.cc cmu-trace.cc
to their destinations.
And the new Makefile.in : cp -a drand-Makefile.in.txt Makefile.in
cd ../ && export CC=gcc34 CXX=g++34 && ./install
And the "DRAND ns" binary is created.
Suggest : Make a backup : cd ns-2.26/ && cp ns ns-drand


B) The ZMAC ns-2.26
http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm
tar xvf ns-allinone-2.26.tar.gz && patch -p0 < ns-2.26-gcc410.patch
cd ns-allinone-2.26/ns-2.26/ && tar xvf zmac.tar.gz
cp zmac/* mac/
http://www4.ncsu.edu/~rhee/export/zm...mobilenode.tcl
>>> cp -a ns-mobilenode.tcl tcl/lib/
And the new Makefile.in : cp -a zmac-Makefile.in.txt Makefile.in
Delete the Makefile, and run 'make clean', if this is an ns-2.26 reuse.
cd ../ && export CC=gcc34 CXX=g++34 && ./install
Result : The "ZMAC ns" binary.
A backup : cd ns-2.26/ && cp ns ns-zmac

...

visego 05-07-2012 12:11 PM

Hello again,

I have followed your instructions and I have DRAND installed succesfully.

The problem is ZMAC when I type ./install the error is the next:

creating tcl/lib/ns-autoconf.tcl
creating indep-utils/webtrace-conv/ucb/Makefile
creating indep-utils/webtrace-conv/dec/Makefile
creating indep-utils/webtrace-conv/nlanr/Makefile
creating indep-utils/webtrace-conv/epa/Makefile
creating indep-utils/cmu-scen-gen/setdest/Makefile
creating autoconf.h
autoconf.h is unchanged
make: *** No hay ninguna regla para construir el objetivo `pushback/logging-data-stcp', necesario para `ns'. Alto.
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems


Do you know solve this problem?

Thank you very much. You are helping me too much.

Vicente,

knudfl 05-07-2012 01:35 PM

# 30

? Is this a new install of an ns-allinone-2.26 ? ?
→ → The DRAND install cannot be used for ZMAC.

Are you quite sure that you are using the "zmac Makefile.in" ?

'grep -n logging zmac-Makefile.in.txt' shows this :
"267 : pushback/logging-data-struct.o \"

... There should be no words like "pushback/logging-data-stcp"
in any of the files in ns-2.26.

.

visego 05-07-2012 02:23 PM

Thanks, Thanks and Thanks knudfl.

Have you worked with Z-MAC, DRAND or SMAC??

Regards,

Vicente

knudfl 05-07-2012 02:45 PM

#32
Quote:

Have you worked with Z-MAC, DRAND or SMAC ? ?
No. Only the two hours, when I worked with two ns-2.26 builds today.
So now it's your turn to do some hard work .. again . :)

You know, it's like this ... a week to learn how to build ns2.
And three? months to learn how to use it.

visego 05-08-2012 07:05 AM

Hi again knudfl

Have you ever installed any program for debugging in NS2?

I am trying install Eclipse and gdb but I don't get that this programs work.

Thanks

knudfl 05-08-2012 07:50 AM

# 34
Quote:

Have you ever installed any program for debugging in NS2 ?
No.

Google .. debugging ns2 ..
Debugging Tips, ns2 * http://www.isi.edu/nsnam/ns/ns-debugging.html
* http://nsnam.isi.edu/nsnam/index.php/Debugging_ns-2
* http://tagus.inesc-id.pt/~pestrela/n...debugging.html
* http://tagus.inesc-id.pt/~pestrela/ns2/
etc. etc.

LQ * http://www.linuxquestions.org/questi...gfault-814105/

.

visego 05-12-2012 04:02 AM

Hi again,

I have done a lot of experiments with DRAND and it works perfectly.

And I installed ZMAC correctly but when I want use this protocol following the instruction in http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm don't work correctly.

My order is this:

ns simZMAC.tcl -numsources 3 -zmacMode 1 -interval 10 -sinknode 83 -valuefile salida.tr -maxX 300 -maxY 300 -nn 84 -ack 0 -to 3 -tno 6 -timeSyncErrorFlag 0 -timeSyncErrorValue 100

And the error is the next:


Setting slot size to 0.001124
num_nodes is set 84
values-file lookup failed

(_o20 cmd line 1)
invoked from within
"_o20 cmd values-file salida.tr"
invoked from within
"catch "$self cmd $args" ret"
(procedure "_o20" line 2)
(SplitObject unknown line 2)
invoked from within
"$mac_($i) values-file $valuefile"
("for" body line 6)
invoked from within
"for {set i 0} {$i < $numNodes } {incr i} {
set node_($i) [$ns_ node $i]
$node_($i) random-motion 0 ;# disable random motion
$god_ new_node $nod..."
(file "multiHopTopoGen.tcl" line 1)
invoked from within
"source.orig multiHopTopoGen.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
(procedure "source" line 12)
invoked from within
"source "multiHopTopoGen.tcl""
(file "simZMAC.tcl" line 99)

I hope that you can help me again,

Thanks in advance

Vicente,

knudfl 05-14-2012 06:24 AM

# 36

Testing with the "ns-2.26-ZMAC" :

cd ns-allinone-2.26/ns-2.26/zmacTcl/
./ns-zmac simZMAC.tcl -numsources 3 -zmacMode 1 -interval 10 -sinknode 83 -valuefile salida.tr -maxX 300 -maxY 300 -nn 84 -ack 0 -to 3 -tno 6 -timeSyncErrorFlag 0 -timeSyncErrorValue 100

The reply is
Code:

Setting slot size to 0.001124
num_nodes is set 84

.. and two trace files are created : out.tr , salida.tr

.

arica 05-15-2012 01:49 AM

#36..u run the protocol by...ns and #37 u run it by./ns-zmac....what is the difference???

knudfl 05-21-2012 04:32 PM

# 38

The binary "ns-zmac" is a backup copy of the 'ns' from the "ns-2.26-ZMAC" build.

guo 07-16-2012 08:21 PM

Quote:

Originally Posted by knudfl (Post 4672327)
#25, #27.

http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm :
>>> Before using Z-MAC, some setup is required. For a given topology,
Z-MAC requires each node to know its TDMA slot. This is achieved using DRAND.

Looks like it could be an advantage to have two (more?) installs of ns-2.26.
( Make a backup of the binary 'ns' as 'ns-orig', if you are going to reuse the ns-2.26.)
NS-2.26 is first used with DRAND. If you then afterwords patch the same
install with ZMAC, you will not be able to go back and do more DRAND work.

A) The DRAND ns-2.26.
http://www4.ncsu.edu/~rhee/export/zm...rand/drand.htm
tar xvf ns-allinone-2.26.tar.gz && patch -p0 < ns-2.26-gcc410.patch
cd ns-allinone-2.26/ns-2.26/ && tar xvf drandNS2.tar.gz
Then copy the new files ns-packet.tcl packet.h mac-802_11.cc cmu-trace.cc
to their destinations.
And the new Makefile.in : cp -a drand-Makefile.in.txt Makefile.in
cd ../ && export CC=gcc34 CXX=g++34 && ./install
And the "DRAND ns" binary is created.
Suggest : Make a backup : cd ns-2.26/ && cp ns ns-drand


B) The ZMAC ns-2.26
http://www4.ncsu.edu/~rhee/export/zm.../zmac/zmac.htm
tar xvf ns-allinone-2.26.tar.gz && patch -p0 < ns-2.26-gcc410.patch
cd ns-allinone-2.26/ns-2.26/ && tar xvf zmac.tar.gz
cp zmac/* mac/
http://www4.ncsu.edu/~rhee/export/zm...mobilenode.tcl
>>> cp -a ns-mobilenode.tcl tcl/lib/
And the new Makefile.in : cp -a zmac-Makefile.in.txt Makefile.in
Delete the Makefile, and run 'make clean', if this is an ns-2.26 reuse.
cd ../ && export CC=gcc34 CXX=g++34 && ./install
Result : The "ZMAC ns" binary.
A backup : cd ns-2.26/ && cp ns ns-zmac

...

Please tell me what's the purpose of the attachment

knudfl 07-17-2012 02:39 AM

# 40

The attached files are zmac-Makefile.in.txt, drand-Makefile.in.txt.
A Makefile.in is used by configure to create "Makefile".
That's also what ./install is doing : 1) Running ./configure
in the applications, 2) creating Makefile's, 3) running 'make'.

The purpose of attaching "Makefile.in" : Then you don't have to write it yourself.

.

guo 07-17-2012 06:04 AM

Quote:

Originally Posted by knudfl (Post 4730268)
# 40

The attached files are zmac-Makefile.in.txt, drand-Makefile.in.txt.
A Makefile.in is used by configure to create "Makefile".
That's also what ./install is doing : 1) Running ./configure
in the applications, 2) creating Makefile's, 3) running 'make'.

The purpose of attaching "Makefile.in" : Then you don't have to write it yourself.

.

I am not so clever to understand it .and I can see makefile.in in ns-allinone-2.26/ns-2.26 and I think there is only one makefile in ns2.26 .please help me and I am puzzled by the zmac addition process ,by the way I installed ns2.26 in windowsxp+cygwin.It is very kind of you ,thank you .

knudfl 07-17-2012 03:59 PM

# 42 : Please read your own post # 40.

'cp -a ' : Means that the Makefile.in is replaced

guo 07-22-2012 01:31 AM

Quote:

Originally Posted by knudfl (Post 4730980)
# 42 : Please read your own post # 40.

'cp -a ' : Means that the Makefile.in is replaced

Thank you very much, knudfl. I have installed zmac and Drand in ns2.26 successfully, but I don’t know what should I do next? To analysis out.tr or salida.tr? I have simulated s-mac ,and I used AWK language to analysis the out.tr and plotted all kinds of curves,but the out.tr of zmac is different and I do not know what should I do next, please give me a instruction, best wishes to you.

knudfl 07-22-2012 04:04 AM

# 44
Quote:

but the out.tr of zmac is different
Different from what ? ?

guo 07-22-2012 07:51 AM

1 Attachment(s)
Quote:

Originally Posted by knudfl (Post 4735013)
# 44


Different from what ? ?

You see it is the out.tr of smac in the attachment, and it is the typical trace file, so I can use AWK language to analysis it easily.


The out.tr which caused by ns simZMAC.tcl is big up to 648.1Mb,what't worse I can not open it in my XP system.

guo 07-22-2012 07:53 PM

Quote:

Originally Posted by knudfl (Post 4677922)
# 36

Testing with the "ns-2.26-ZMAC" :

cd ns-allinone-2.26/ns-2.26/zmacTcl/
./ns-zmac simZMAC.tcl -numsources 3 -zmacMode 1 -interval 10 -sinknode 83 -valuefile salida.tr -maxX 300 -maxY 300 -nn 84 -ack 0 -to 3 -tno 6 -timeSyncErrorFlag 0 -timeSyncErrorValue 100

The reply is
Code:

Setting slot size to 0.001124
num_nodes is set 84

.. and two trace files are created : out.tr , salida.tr

.

please tell me what should I do after out.tr and salida.tr?Thank you .

knudfl 07-27-2012 05:08 AM

# 46
Quote:

The out.tr which caused by ns simZMAC.tcl is big up to 648.1Mb
./ns-zmac simZMAC.tcl -numsources 3 -zmacMode 1 -interval 10 -sinknode 83 -valuefile salida.tr -maxX 300 -maxY 300 -nn 84 -ack 0 -to 3 -tno 6 -timeSyncErrorFlag 0 -timeSyncErrorValue 100

Scientific Linux SL6, first time with the above command:
( 15 May 2012, see post #46 in the other zmac tagged thread.)
I got out.tr 1.3 MB, salida.tr 111 bytes.

CentOS 6, today : out.tr 6.7 MB, salida.tr 37 bytes.

Ubuntu 10.10, today : out.tr 6.4 MB, salida.tr 38 bytes.

.

knudfl 07-27-2012 02:10 PM

# 47

Probably read the documentation about trace files (Google .. ns2 trace file ..)
http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats
http://zbinwu.blogspot.dk/2010/10/an...race-file.html
http://getch.wordpress.com/2010/11/2...s2-trace-file/
http://www.ns2ultimate.com/post/2496...s2-trace-trace
http://stackoverflow.com/questions/8...ns2-trace-file

http://www.winlab.rutgers.edu/~zhibi.../ns_trace.html
http://nsvisualtraceanalyzer.wordpress.com/
? http://www.angelfire.com/al4/esorkor/

.

guo 07-27-2012 07:53 PM

Quote:

Originally Posted by knudfl (Post 4739245)
# 46

./ns-zmac simZMAC.tcl -numsources 3 -zmacMode 1 -interval 10 -sinknode 83 -valuefile salida.tr -maxX 300 -maxY 300 -nn 84 -ack 0 -to 3 -tno 6 -timeSyncErrorFlag 0 -timeSyncErrorValue 100

Scientific Linux SL6, first time with the above command:
( 15 May 2012, see post #46 in the other zmac tagged thread.)
I got out.tr 1.3 MB, salida.tr 111 bytes.

CentOS 6, today : out.tr 6.7 MB, salida.tr 37 bytes.

Ubuntu 10.10, today : out.tr 6.4 MB, salida.tr 38 bytes.

.

the salida.tr and out.tr of my simulation in ubuntu10.04 are 3.8Kb and 5.8Mb respectively.


All times are GMT -5. The time now is 06:41 AM.