LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-22-2017, 11:53 AM   #16
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641

Post #15, @ammal : Welcome to LQ.

Otcl and Tclcl : You will have to pretend you are compiling with an i686 OS:
Patch the file 'install' : ns226-install-64.patch .
... But if your OS is a contemporary Ubuntu version, the otcl build may fail:
»» undefined reference to symbol 'dlclose@@GLIBC_2.2.5' ««.
I.e. the latest libc6 versions no longer includes the old objects.

If you have an older Ubuntu version (Or any oldish OS) :
cd ns-allinone-2.26/
patch -p0 < ns226-install-64.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
export CC=gcc34 CXX=g++34 && ./install
Not 'export CC=gcc34 CXX=g++34/ && ./install'

Please specify your Ubuntu version, if further issues.
And please tell why you want ns-2.26 .
( Many of the old additional protocols have been ported to a later ns2 version.)


-

Last edited by knudfl; 04-22-2017 at 11:56 AM.
 
Old 04-22-2017, 01:40 PM   #17
ammal
LQ Newbie
 
Registered: Apr 2017
Posts: 7

Rep: Reputation: Disabled
Thank you for the help!

I followed the steps you suggested, but the build was, again, not successful. The error this time changed to:


============================================================
* Build OTcl-1.0a8
============================================================
No .configure file found in current directory
Continuing with default options...
checking build system type... i686-pc-none
checking host system type... i686-pc-none
checking target system type... i686-pc-none
checking for gcc... gcc34
checking for C compiler default output... configure: error: C compiler cannot create executables
otcl-1.0a8 configuration failed! Exiting ...
Please check http://www.isi.edu/nsnam/ns/ns-problems.html
for common problems and bug fixes.

-------------------------------------------------------------------------------------------------------------

I am using the ubuntu version 16.04(LTS) and, I guess, that might be the cause of failure? as you mentioned about the contemporary version.

why ns-2.26?
Actually, I am working on my academic project in which I need to create a wireless network scenario which uses ZigBee routing protocol (tree). I was looking for suggestions over the internet and found this page which says that it is supported by ns-2.26 and 2.27. So, I wanted to try it out on ns 2.26.

As per my understanding, Newer ns2 versions provide mac layer IEEE802.15.4 (wpan) implementation but not the (ZBR/ZTR) routing protocol.
Please correct me if I am wrong and kindly suggest what can be done here.

Thanks,
 
Old 04-22-2017, 02:18 PM   #18
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Assume Ubuntu 16.04 - amd64.

? Which {gcc34, g++34} packages did you install ?


About wpan :
WPAN was introduced in ns-2.28:
All ns-2.28 ..ns-2.36 have wpan as default 802.15.4 protocol =~Zigbee.

-

Last edited by knudfl; 04-22-2017 at 02:21 PM.
 
Old 04-22-2017, 03:43 PM   #19
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #17.
Quote:
configure: error: C compiler cannot create executables
? May be you didn't install the ns2 prerequisites ?

sudo apt install g++ autoconf libtool libxmu-dev

The g++ install also installs the packages required for all other gcc / g++ versions.

-
 
Old 04-22-2017, 10:48 PM   #20
ammal
LQ Newbie
 
Registered: Apr 2017
Posts: 7

Rep: Reputation: Disabled
Thanks kundfl!

Yes, your assumption is correct. I have got "Ubuntu 16.04 - amd64" installed on my system.

Which gcc packages I installed?
Earlier I installed the packages you have provided in reply#12, but when it did not work, then I installed latest versions thinking that the installation may got corrupted or something....

Quote:
sudo apt install g++ autoconf libtool libxmu-dev
resulted into this :

Quote:
autoconf is already the newest version (2.69-9).
g++ is already the newest version (4:5.3.1-1ubuntu1).
libtool is already the newest version (2.4.6-0.1).
libxmu-dev is already the newest version (2:1.1.2-2).
0 upgraded, 0 newly installed, 0 to remove and 420 not upgraded.
About the ns2 prerequisites, Actually, I already have ns 2.35 working well and I could not find any instructions specific to 2.26, so I assumed that I got it covered... bad assumption?

For Wpan, I think I should now invest my time in newer version of ns2 to accomplish my work but I just wanted to run that ZBR implementation which is now missing in newer ns2 versions but they say is possible in ns2.(26&27). I have the installation files of wpan for ns2.26&27.

Please let me know if there are any suggestions for me on this.

Thanks! again.

Last edited by ammal; 04-22-2017 at 10:58 PM.
 
Old 04-23-2017, 04:55 AM   #21
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #20.

Compilers listed in #11 (not #12) are i386 = 32bits.

You have a 64bits OS. Requires 64bits compilers :
compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb compat-gcc-34-c++_3.4.6-20_amd64.deb
... Please uninstall the i386 gcc34/g++34 packages.

gcc34 https://drive.google.com/file/d/0B7S...ew?usp=sharing

g++34 https://drive.google.com/file/d/0B7S...ew?usp=sharing


Please explain why you want to use ns-2.26 for WPAN.


-

Last edited by knudfl; 04-23-2017 at 05:05 AM.
 
Old 04-23-2017, 07:36 AM   #22
ammal
LQ Newbie
 
Registered: Apr 2017
Posts: 7

Rep: Reputation: Disabled
Hi knudfl,

Followed these steps:

1. Uninstalled gcc-34 and g++-34 32 bit versions
2. Installed the gcc 64-bit version using the files you shared.
3. Executed the command
Quote:
export CC=gcc34 CXX=g++34 && ./install
which generated following output(error):
Quote:
/home/ammal/ns-allinone-2.26/lib/libtcl8.3.a(tclUnixPipe.o): In function `TclpCreateTempFile':
tclUnixPipe.c.text+0x3aa): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /home/ammal/ns-allinone-2.26/lib/libtcl8.3.a(tclLoadDl.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: ld returned 1 exit status
Makefile:71: recipe for target 'otclsh' failed
make: *** [otclsh] Error 1
otcl-1.0a8 make failed! Exiting ...
about which you mentioned in reply#16.

------------------------------------------
Why do I want to use 2.26 for w-pan?
My work is related to ZigBee Tree routing(ZTR) protocol. I first want to understand and simulate a network with ZTR as routing protocol in hierarchical Tree topology and then make some modifications/additions to the ZTR and compare the results about some network parameters.

Now, as we know that w-pan is a term generally used for combined phy+mac+nwk+app layer specification for IEEE802.15.* standard.
So, when I looked into w-pan folder in ns-2.35, I could only find files which by name seems to implement mac layer functionalities, but, there is no folder named as ZigBee or ZTR. So, I assumed that ns provides mac and (of-course) phy layer implementation but not the ZigBee routing protocol(nwk layer) implementation. With this assumption, I started to search the internet for ZTR's implementation related suggestions and work in ns2. Subsequently, I found this github page and the installation package of w-pan for ns2.26&27 and this page also mentions about the ZigBee routing protocol (not available in latest versions of ns). That is why I want to install ns2.26, and then install w-pan package in it, and then see how the w-pan of ns2.26, which also seems to include ZigBee routing protocol, is different from other newer versions such as ns2.35.

Though, I am a beginner with ns and my understanding here can be wrong, but I thought that the best way will be to try it myself. But, got caught up in ns2.26 installation. I hope that all this explanation here makes some sense. Your suggestions and comments please.

Thank you!
 
Old 04-23-2017, 08:03 AM   #23
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #22.

The text README says : Platforms supported ns2 version: 2.26 and 2.27 . EDIT see #24

So of course you will have to use a version from the current century. EDIT, see #24
'ns-allinone-2.26' is mostly 1999 code ... or earlier.

From version ns-allinone-2.27 you can use the {tcl tk otcl tclcl} from ns-allinone-2.34.
If the older versions are causing any trouble.
( {tcl tk otcl tclcl} change was done with ns-allinone-{2.27, 2.28} for some projects.)


-

Last edited by knudfl; 04-23-2017 at 08:47 AM.
 
Old 04-23-2017, 08:46 AM   #24
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #22.

The git site https://github.com/jridgewell/ns2 is ns-2.35.
See the file ns2/VERSION.
The file ns2/wpan/README is a leftover file from before wpan was included in ns2.
Is even in ns-2.36rc1/. Never edited.

Seems some TCP code was added : CTCP → jridgewell-NCTCP → jridgewell-NCTCP_ns235.patch
.. The patch shows the difference from a stock ns-2.35/ to jridgewell/ns2/

Link https://drive.google.com/file/d/0B7S...ew?usp=sharing


-

Last edited by knudfl; 04-23-2017 at 03:04 PM.
 
  


Reply

Tags
ns2, ns226, ubuntu 11.04



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to install NS allinone 2.33 in Ubuntu 10 helok Linux - Newbie 16 05-17-2015 09:55 AM
How to install ns-allinone-2.1b9a in Ubuntu 10.10 andolby Linux - Software 1 03-28-2011 07:21 AM
ns-allinone on ubuntu offline kuberninad Linux - Newbie 5 01-25-2010 12:15 AM
install ns-allinone-2.34 on ubuntu 8.04 beringinraya Linux - Newbie 2 07-27-2009 09:30 AM
NS2 2.33 allinone on Ubuntu Liz Mwaniki Linux - Newbie 1 01-26-2009 04:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration