[SOLVED] ns2 version-2.34 is too old-wpan-802.15.4
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, recently I downloaded wpan11.tar.gz from zheng's web site https://sites.google.com/site/jzhengresearch/pub/file
I follow his readme file but when I run ./install I see below error also I usu NS2.34 But I see this error
By the I'm using ubuntu 12.04 if it usefull. OK what should I do.Can anybody help me to how fix this error?
Determine ns2 and nam pathes ...done
>> ns2 version: 2.34
>> ns2 directory: /home/reza/ns-allinone-2.34/ns-2.34
>> nam dirctory: /home/reza/ns-allinone-2.34/nam-1.14
Your ns2 (version 2.34) is too old
You need at least version 2.26 to install this packag
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516
Rep:
Welcome to LQ.
`wpan11.tar.gz' has a time stamp = Year 2004.
The files are meant for ns2 versions with no wpan : ns-2.26 .. ns-2.27,
.. and might also update the ns-2.28/wpan/**.
* About your question, at nabble.ns2 : "Can not open request log11" .. http://network-simulator-ns-2.7690.n...l-td28476.html
.. Not easy to guess which changes you made to ns-2.34 :
The simulation $ ns wpan_demo1.tcl : No errors here with an original ns234.
Also : You can add almost any "extra protocol" / patch to ns-2.3x,
and "$ ns wpan_demo1.tcl" will still work with no errors :
→ I made 35 times different "$ ns-<added-protocol>" : 2 or 3 failed,
none with "can not open request log11" !
-
.. Won't help you much even if there was an error list,
or if you could debug your executable 'ns'.
It's much easier to guess how you got there :
Could be "a wrong OS", i.e. a 64bits (x86_64) Ubuntu,
combined with the use of the wrong compiler for ns-2.34.
( Should be gcc/g++ version 4.1.2 ).
All ns2 is for a 32bits (i686) OS.
Most ns-2.2x / 2.3x versions can be used with a 64bits OS.
But always with an inferior validate result.
So which Ubuntu 11.04 (EDIT to 12.04) are you using ?
Please show the output from the command : $ uname -m <Enter>
@knfufl thanks, but in previous I did some changes in NS2 based on these change
+++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++
By the way I previous In run my tcl files with no error But I saw "Can not open request log11" when I want to run wpan_demo1.tcl in ns-allinone-2.34/ns-2.34/tcl/ex/wpan by write
ns wpan_demo1.tcl
+++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++
1. Do you tell me I should unistall my ns2 ? and again install ns2.34 and compile it with g++4.1 and g++4.1 packages?
sudo dpkg -i gcc41-compat-4.1.2_i386.deb g++41-compat-4.1.2_i386.deb
.. Then reboot, and the new compilers can be used.
After that I wrote this #5
Quote:
$ cd ns-allinone-2.34/ && export CC=gcc41 CXX=g++41 && ./install
But I saw an error during installation
".
.
.
.
.
* Build tcl8.4.18
============================================================
configure: WARNING: unrecognized options: --enable-gcc
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... gcc41
checking whether the C compiler works... no
configure: error: in `/home/reza/ns-allinone-2.34/tcl8.4.18/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details
tcl8.4.18 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"
"
+++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++
2. Inorder to complete unistall NS2 on my 12.04 ubuntu is true to write this command :
sudo apt-get purge --auto-remove NS2 ?
[Sorry to ask ...I ask this because I had some problems to unistall non Ubuntu's repository packages in previous. ]
I saw that command termianl from belove link http://www.installion.co.uk/ubuntu/r...uninstall.html
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516
Rep:
# 6 .
Quote:
1. Do you tell me I should unistall my ns2 ?
No. You can have as many ns-allinone-2.xx as you want, installed at the same time.
But : Do not add any *PATH text to .bashrc : Never required.
→
How do you think I made the 35 times post #2 test ?
I didn't uninstall/install 35 times. It's a simple thing :
Keep all the executable ns* in /usr/local/bin/: The default ns install location!
Read "test__wpan_demo1.tcl.txt" to understand that ns can have different names :
ns, ns-orig, ns234, etc. etc. ( I have eighty (80) times ns**). Read post #2.
2."--auto-remove NS2 ?" : Only binary packages.deb can be removed.
Your ns234 is not a package : You say you modified ns-allineone-2.34?
Quote:
checking for gcc... gcc41
checking whether the C compiler works... no
"gcc41 / g++41" wasn't installed :
Please check presence of a tool before you are trying to use it :
A) $ which gcc41
B) $ which g++41
C) $ which g++
Quote:
but in previous I did some changes in NS2 ...
... based on these change
Which changes ? Please tell :
It's interesting to know, in order to track the wpan behavior.
@knudfl thanks a lot dear knudfl for your help. But still there is a point that I do not get it
suppose that I have had NS2.34 and also I added its PATH to my bashrc and Now I want to install NS2.35 based on #7
Quote:
But : Do not add any *PATH text to .bashrc : Never required.
but the problem for is here when I run "NS 1.tcl" this NS refer to 2.34 or 2.35
Please tell my if I am wrong.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516
Rep:
# 8 .
Repeat : Please answer the question from post #8 (and #2) :
Which changes were made to ns-2.34 ?
I.e. the changes causing the "can not open request log11" error.
It's an interesting error, and an explanation will help other ns users to avoid those issues.
""Do never add any *PATH text to .bashrc"" : If you did, delete it.
See post #2, the attached text : Make a copy of your different executable 'ns',
to new names, e.g. 'ns234', 'ns235' or whatever is relevant.
Then copy those new executable to /usr/local/bin/ : A system PATH.
And run simulations with $ ns234 file-name.tcl ,,, $ ns235 other-file.tcl
→ →
Do not run like $ ns 1.tcl
.. You can't be absolutely sure which of the 'ns's is going to be used.
I copied ns-allinone-2.34 to home directory not Desktop
and also I did not put
Quote:
sudo apt-get install xorg-dev g++ xgraph
from part three of the instructions
I add PATHes to ~/.bashrc not ~/.bash_aliases
what changes I have done ?
I just did these changes from this link integration-of-rred
Quote:
The Robust Random Early Detection (RRED) algorithm can be integrated into the NS2 distributions in these steps:
1. Copy the following files into the directory "ns-allinone-2.33\ns-2.33\queue".
red-robust.h
red-robust.cc
2. Add the following lines to the end of ns-default.tcl ("ns-allinone-2.33\ns-2.33\tcl\lib\ns-default.tcl").
# Added by leoking RobustRed config 0
Queue/RED/Robust set hash_bins_ 23
Queue/RED/Robust set hash_levels_ 2
Queue/RED/Robust set score_max_ 10
Queue/RED/Robust set score_min_ -1
Queue/RED/Robust set score_pass_ 0
Queue/RED/Robust set last_drop_time_ 0ms
Queue/RED/Robust set drop_related_period_ 10ms
# Added by leoking RobustRed config 1
3. Insert the following line of code before "$(OBJ_STL)" in the Makefile ("ns-allinone-2.33\ns-2.33\Makefile"):
queue/red-robust.o \
4. Recompile the ns-allinone-2.33 system by using the following commands (you should execute these commands in the ns-2.33 directory "ns-allinone-2.33\ns-2.33"):
make clean
make depend
make
my questions:
From #9 :
Quote:
See post #2, the attached text : Make a copy of your different executable 'ns',to new names, e.g. 'ns234', 'ns235' or whatever is relevant.Then copy those new executable to /usr/local/bin/ : A system PATH.And run simulations with $ ns234 file-name.tcl ,,, $ ns235 other-file.tcl
would you please tell me to copy which file exactly from ns2.34 directory? there is a executable file with name 'ns'.I should rename this one -ns- to for example ns234 and copy this one to /usr/local/bin? please look at ns-234.jpg attached file.
From #9:
Quote:
Do never add any *PATH text to .bashrc"" : If you did, delete it.
OK, then do not expect default simulations like wpan to work.
** For default simulations, build an ns-2.34 with no changes.
And save `ns-allinone-2.34/ns-2.34/ns' as "ns234-orig" :
/usr/local/bin/ns234-orig .
3)
Quote:
I add these PATHs to my bashrc ....
... should I remove which line of this all of them ..
* Delete it all.
The executable ns* is hard coded to know the location of it's libraries :
Meaning that setting library path's for ns makes no sense at all.
* All the " *PATH* text" is just a 1997-1999 ( !15 years old! ) text.
Not required any more. 'nam' → copy nam to /usr/local/bin.
'xgraph' is already in /usr/bin/ . Etc. etc.
3) Read post #2 : All the ns-*** in "test__wpan_demo1.tcl.txt"
are examples of my eighty (80) times ns-<name> in /usr/local/bin/ .
First I deleted all of contents(related to ns2) which I haved added to bashrc.
But still I have some questions
From #5
Quote:
.. and no edits are to be done in ns-allinone-2.34 : Use as is, please.
and From #11
Quote:
** For default simulations, build an ns-2.34 with no changes.
Would you please talk more about no changes: because there is still some
changes which I think I must do based on related links. I divide them to two parts
Fix the error in the linking of otcl by editing line 6304 of otcl-1.13/configure so that it reads
SHLIB_LD="gcc -shared"
instead of
SHLIB_LD="ld -shared"
Then, edit the file ns-2.34/tools/ranvar.cc and change the line 219 from
return GammaRandomVariable::GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
to
return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow (u, 1.0 / alpha_);
Next, change the lines 183 and 185 in file ns-2.34/mobile/nakagami.cc to read
resultPower = ErlangRandomVariable(Pr/m, int_m).value();
and
resultPower = GammaRandomVariable(m, Pr/m).value();
Add a line after line 64 in ns-2.34/mac/mac-802_11Ext.h to read:
#include <stddef.h>
! Please do not use old advices specifically meant for Ubuntu 9.10, 10.04 .
The post is dated `17 January 2010' :
{ gcc-4.3 g++-4.3 } worked with 9.10,,, and for a short time with 10.04 :
Until 10.04 got updated.
1. ""What do I write instead of .."" : No changes means no changes at all !
Only for use with gcc-4.5, which isn't available for all later Ubuntu's.
And besides that, it's also "old advices" : Not necessarily valid any more.
So please do not make any changes at all :
{ gcc41, g++41 } will do the job : All ns226..ns234 / all Ubuntu 10.04 ..13.10 .
Please check presence of a tool before you are trying to use it :
A) $ which gcc41
B) $ which g++41
C) $ which g++
when I type
Code:
which gcc41
/usr/gcc41/bin/gcc41
which g++41
/usr/gcc41/bin/g++41
which gcc
/usr/bin/gcc
which g++
/usr/bin/g++
sudo dpkg -l | grep gcc
ii gcc 4:4.6.3-1ubuntu5 GNU C compiler
ii gcc-4.5 4.5.3-12ubuntu2 The GNU C compiler
ii gcc-4.5-base 4.5.3-12ubuntu2 The GNU Compiler Collection (base package)
ii gcc-4.6 4.6.3-1ubuntu5 GNU C compiler
ii gcc-4.6-base 4.6.3-1ubuntu5 GCC, the GNU Compiler Collection (base package)
ii gcc41-compat 4.1.2 No description
ii libgcc1 1:4.6.3-1ubuntu5 GCC support library
sudo dpkg -l | grep g++
ii g++ 4:4.6.3-1ubuntu5 GNU C++ compiler
ii g++-4.5 4.5.3-12ubuntu2 GNU C++ compiler
ii g++-4.6 4.6.3-1ubuntu5 GNU C++ compiler
ii g++41-compat 4.1.2 No description
{I bold and highlight gcc41-compat and g++41-compat to emphasize }
But I can not install my (new downloded and without any changes) ns2.34 on my ubuntu 32 bit 12.04:
And here is 1.txt :
...sorry for this long ouput I put to them in a attached file with name 1.txt
Quote:
============================================================
* Testing for Darwin (OS X) environment
============================================================
============================================================
* Testing for Cygwin environment
============================================================
Cygwin not detected, proceeding with regular install.
============================================================
* Testing for FreeBSD environment
============================================================
FreeBSD not detected
============================================================
* 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}... yes
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... gcc41
checking whether the C compiler (gcc41 ) works... no
Can not create xgraph; But xgraph is an optional package, continuing...
============================================================
* Build CWeb
============================================================
Making cweb
gcc -g -c -o ctangle.o ctangle.c
gcc -g -DCWEBINPUTS=\"/usr/local/lib/cweb\" -c common.c
gcc -g -o ctangle ctangle.o common.o
gcc -g -c -o cweave.o cweave.c
gcc -g -o cweave cweave.o common.o
============================================================
* Build Stanford GraphBase
============================================================
Making sgb
gcc41 -g -I/usr/local/sgb/include -DDATA_DIRECTORY=\"/usr/local/sgb/data/\" -c gb_io.c
Unable to create sgb library, but it's optional, so continuing...
============================================================
* Build GT-ITM
============================================================
sgb lib not found. gt-itm & sgb2ns could not be installed. Continuing..
============================================================
* Build zlib
============================================================
Building static library libz.a version 1.2.3 with gcc41.
Checking for unistd.h... No.
Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()
Checking for snprintf() in stdio.h... No.
WARNING: snprintf() not found, falling back to sprintf(). zlib
can build but will be open to possible buffer-overflow security
vulnerabilities.
Checking for return value of sprintf()... No.
WARNING: apparently sprintf() does not return a value. zlib
can build but will be open to possible string-format security
vulnerabilities.
Checking for errno.h... No.
Checking for mmap support... No.
gcc41 -O3 -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c -o example.o example.c
Zlib make failed, but it's optional Continue ...
============================================================
* Build tcl8.4.18
============================================================
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... gcc41
checking whether the C compiler works... no
I don't think you have "Ubuntu 11.04". Post #14 says "my ubuntu 32 bit 12.04".
* Ubuntu 12.04 : See post #5.
... (Sorry for the "11.04 text" in post #3.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.