LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-09-2012, 10:52 AM   #1
juniorlx
LQ Newbie
 
Registered: Mar 2012
Posts: 6

Rep: Reputation: Disabled
install ns2.29.3 + MIH module in Ubuntu 11.04


I have got thiss error in installing ns2.29.3 in Ubuntu 11.04

tk8.4.11 installation succeeded.
============================================================
* Build OTcl-1.11
============================================================
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 ANSI C... 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 egrep... 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 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.11... 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 X11 header files
checking for X11 library archive
checking for XOpenDisplay in -lX11... yes
checking for XShmAttach in -lXext... yes
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking system version (for dynamic loading)... Linux-2.6.38-8-generic
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
rm -f libotcl.so otcl.o so_locations
gcc -c -g -O2 -DNDEBUG -DUSE_SHM -fpic -I. -I/home/juniorlx/Evaristo/ns-allinone-2.29/include -I/home/juniorlx/Evaristo/ns-allinone-2.29/include -I/home/juniorlx/Evaristo/ns-allinone-2.29/include -I/include otcl.c
ld -shared -o libotcl.so otcl.o
otcl.o: In function `OTclDispatch':
/home/juniorlx/Evaristo/ns-allinone-2.29/otcl-1.11/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/juniorlx/Evaristo/ns-allinone-2.29/otcl-1.11/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: Bad value
make: ** [libotcl.so] Erro 1
otcl-1.11 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems[/COLOR]

Could anyone help me?
I really appreciate any suggestion because I'ḿ begginer in Linux & ns
 
Old 10-09-2012, 12:04 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.
Quote:
checking for g++... g++
g++ is version 4.5.2 : Version 4.1.2 must be used for ns-allinone-2.29.
(You can have as many versions of gcc/g++ as you want, installed at the same time.)

Please see this other MIH thread about installing / using gcc41-compat, g++41-compat:
http://www.linuxquestions.org/questi...571/page2.html
→ → Links in post # 17.


.

Last edited by knudfl; 10-09-2012 at 12:06 PM.
 
Old 10-09-2012, 02:12 PM   #3
juniorlx
LQ Newbie
 
Registered: Mar 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks for reply Knudfl !!

1)Should I put the 2 files (gcc41 ...and g++41...) in a specific directory to run the command " sudo dpkg -i gcc41-compat-4.1.2_i386.deb g++41-compat-4.1.2_i386.deb "
and after reboot the system?

2) After that I should use

cd ns-allinone-2.29/ && export CC=gcc-4.1 CXX=g++-4.1 && install

and

cd ns-allinone-2.29/ && export CC=gcc41 CXX=g++41 && install

Sorry but my linux skills are very limited...
 
Old 10-09-2012, 02:23 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 3

Doesn't matter which directory in /home/<name> you are using.
E.g. "Downloads/" will do fine.

The install line is :
cd ns-allinone-2.29/ && export CC=gcc41 CXX=g++41 && install
 
Old 10-09-2012, 02:47 PM   #5
juniorlx
LQ Newbie
 
Registered: Mar 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Again this error appers:

R=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DTCL_SHLIB_EXT=\".so\" -DUSE_TCLALLOC=0 ./../generic/tclAlloc.c
No arquivo incluído de /usr/include/bits/errno.h:25,
de /usr/include/errno.h:36,
de ./../generic/../unix/tclUnixPort.h:39,
de ./../generic/tclPort.h:27,
de ./../generic/tclAlloc.c:29:
/usr/include/linux/errno.h:4:23: erro: asm/errno.h: Arquivo ou diretório não encontrado
No arquivo incluído de /usr/include/sys/socket.h:40,
de ./../generic/../unix/tclUnixPort.h:139,
de ./../generic/tclPort.h:27,
de ./../generic/tclAlloc.c:29:
/usr/include/bits/socket.h:381:24: erro: asm/socket.h: Arquivo ou diretório não encontrado
make: ** [tclAlloc.o] Erro 1
tcl8.4.11 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com

Is there other Linux distribution that works with less issues with in ns2.29 + MIH , Knudfl?
 
Old 10-10-2012, 04:37 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 5
Quote:
erro: asm/errno.h: Arquivo ou diretório não encontrado
Please check that the link 'asm' is present ( /usr/include/asm ) :

ls -l /usr/include/ | grep asm
→ → asm -> i386-linux-gnu/asm/

May or may not be present. Depends on your updates.
A release version of 11.04 is different from an updated 11.04
( Creating the link : cd /usr/include/ && sudo ln -s i386-linux-gnu/asm/ ).

And make sure that the files are installed : sudo apt-get install linux-libc-dev


The best ns2 result is created on the unsupported Ubuntu 10.10
( with g++41 for ns-2.29.)

This thread is also about MIH :
http://www.linuxquestions.org/questi...ml#post4801454
.. There is a brand new MIH package mentioned in post # 20.

.

Last edited by knudfl; 10-10-2012 at 04:40 AM.
 
Old 11-09-2012, 12:46 PM   #7
juniorlx
LQ Newbie
 
Registered: Mar 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Trace file working bad when use MIH module from NIST

I´ve installed in Ubuntu 10.10 the MIH module from NIST to study about vertical handover.

The problem is, after that, the trace files are not equals to the trace files without the MIH module.
We can see that in trace file of simple-wireless.tcl for example.

Someone can help me? It´s very urgent for me.

Thanks to all!
 
Old 11-09-2012, 01:09 PM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
.. after that, the trace files are not equals to the trace files without the MIH
If you forgot to make a backup of the original 'ns',
then install another ns-allinone-2.29.3 with no MIH, and :
cd ns-allinone-2.29/ns-2.29/
cp ns ns-orig
sudo cp ns-orig /usr/local/bin/

You can do that to the MIH patched ns too :
cp ns ns-mih
sudo cp ns-mih /usr/local/bin/

... Then it's easy to choose. And : That's the only way to select
a particular ns, when you have more than one.
( I have 28 different ns-* in /usr/local/bin/ ).

Note : One of the two " ns-* " can be copied to /usr/local/bin/ as ns.
Note 2: The most tcl files accept a renamed ns.

.
 
Old 11-09-2012, 01:42 PM   #9
juniorlx
LQ Newbie
 
Registered: Mar 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks to reply, Knudfl !!!

My problem is not to have more than 1 version of ns installed.

The problem in pratice is, for example, when I run a .tcl file in ns without MIH it returns a trace file with 72000 lines. The file .nam shows the all nodes and the traffic with no problem.

When I run the same .tcl file in ns+MIH module it returns a trace file with 3000 lines only. And the file .nam doesn´t shows the traffic (there´s no flow here!).

Other file that happens the same is scenario1.tcl (ns-allinone-2.29/ns-2.29/tcl/hsntg/802_21/scenario1.tcl).
The trace file that scenario1.tcl returns has throughput equals to ZERO.

And there is no file called "ns-orig" in my folder /ns-allinone-2.29/ns-2.29/.
I don´t reach to copy it to the folder /usr/local/bin/ !
 
Old 11-09-2012, 03:19 PM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 9

Do not expect a patched 'ns' to work with default tcl files.
Either you will experience a difference like the above.
Or most often, a patched 'ns' doesn't work at all with anything
but the dedicated tcl files.

That's why the suggestion is to build an unpatched 'ns'.
The naming doesn't matter, e.g. ns-orig or ns229 are equally good.
#8 : "cp ns ns-orig" means that you create a copy of an unpatched ns,
by name ns-orig.

.
 
Old 11-10-2012, 06:11 AM   #11
juniorlx
LQ Newbie
 
Registered: Mar 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Ok, I understand now.
I´ll do it.

Thank you very much for your help, friend!!!
 
Old 03-15-2013, 12:52 AM   #12
chandanratnani
LQ Newbie
 
Registered: Jan 2013
Posts: 10

Rep: Reputation: Disabled
installing ns2.29.3 in ubuntu10.04

hello
@ knudfl

I am installing ns2.29.3 in ubuntu10.04.
I am getting error in tk file as below..
please help me

============================================================
* Build Tk8.4.11
============================================================
make: *** No rule to make target `/home/spce/ns-allinone-2.29.3/ns-allinone-2.29/tk8.4.11/unix/Makefile.in', needed by `Makefile'. Stop.
loading cache ./config.cache
checking for Tcl configuration... (cached) found /home/spce/ns-allinone-2.29.3/ns-allinone-2.29/tcl8.4.11/unix/tclConfig.sh
checking for existence of /home/spce/ns-allinone-2.29.3/ns-allinone-2.29/tcl8.4.11/unix/tclConfig.sh... file not found
configure: error: /home/spce/ns-allinone-2.29.3/ns-allinone-2.29/tcl8.4.11/unix/tclConfig.sh is for Tcl .
Tk 8.4.11 needs Tcl 8.4.
Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.4.
tk8.3.2 configuration failed! Exiting ...
Tk is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.
root@ubuntu:~/ns-allinone-2.29.3#

Last edited by chandanratnani; 03-15-2013 at 01:12 AM.
 
Old 03-15-2013, 02:43 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 12, @chandanratnani.

No "Makefile.in" : Looks suspicious. Better start from scratch :
Unpack a new 'ns-allinone-2.29.3.tar.gz' , and ...
$ cd ns-allinone-2.29/ && export CC=gcc-4.1 CXX=g++-4.1 && ./install


http://ignum.dl.sourceforge.net/proj...-2.29.3.tar.gz
> ns-allinone-2.29.3.tar.gz

-

Last edited by knudfl; 03-16-2013 at 01:54 PM.
 
1 members found this post helpful.
Old 03-15-2013, 05:07 AM   #14
chandanratnani
LQ Newbie
 
Registered: Jan 2013
Posts: 10

Rep: Reputation: Disabled
Thanx knudfl

my previous error is solved.but I execute tcl file..nam is not working..
I dot this error...please help

nam:
[code omitted because of length]
: no event type or button # or keysym
while executing
"bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D / 120) * 4}] units
}"
invoked from within
"if {[string equal [tk windowingsystem] "classic"]
|| [string equal [tk windowingsystem] "aqua"]} {
bind Listbox <MouseWheel> {
%W yview scroll [expr {..."
 
Old 03-15-2013, 05:18 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 14.

The usual : Please use a proof 'nam', preferable version 1.14.

Package, please see post # 4 here ..
http://www.linuxquestions.org/questi...04-a-842109/#4

Unpack, and : cd nam-1.14*/ && sudo cp nam /usr/local/bin/
... And : Better delete the corrupt nam in "nam-1.11/".

-
 
1 members found this post helpful.
  


Reply

Tags
mih, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 ns2 in ubuntu 11.10 miu Linux - Networking 20 10-31-2013 02:50 PM
[NS2] the RSS & link_events code in MIH implemented by NIST RSM_smile Linux - Newbie 0 09-26-2012 08:25 AM
patch for Hierarchical media independent handover (MIH) service in ns2.34 anamnazir Linux - Newbie 5 12-20-2011 05:22 PM
How to install ns2 2.33 in ubuntu 10.04 andolby Linux - Software 1 03-21-2011 10:48 PM

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

All times are GMT -5. The time now is 07:34 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