LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   install NS2.31 (http://www.linuxquestions.org/questions/programming-9/install-ns2-31-a-801695/)

saif_ict 04-13-2010 03:07 AM

install NS2.31
 
Hi,
I'm using fedora12 and when I'm installing ns2.31, the installtion failes and the appears the follwing error msg:

__________________________________________________________________________
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1218: error: invalid type argument of ‘->’ (have ‘int’)
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1220: error: invalid type argument of ‘->’ (have ‘int’)
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1222: error: invalid type argument of ‘->’ (have ‘int’)
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1222: error: invalid type argument of ‘->’ (have ‘int’)
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1222: error: invalid type argument of ‘->’ (have ‘int’)
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1222: error: invalid type argument of ‘->’ (have ‘int’)
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1229: error: invalid type argument of ‘->’ (have ‘int’)
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1231: error: invalid type argument of ‘->’ (have ‘int’)
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c: In function ‘Tk_Get3DBorderFromObj’:
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1264: error: ‘TkWindow’ has no member named ‘dispPtr’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1279: error: ‘TkBorder’ has no member named ‘resourceRefCount’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1280: error: ‘Tk_FakeWin’ has no member named ‘display’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1280: error: ‘Tk_FakeWin’ has no member named ‘screenNum’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1280: error: ‘TkBorder’ has no member named ‘screen’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1281: error: ‘Tk_FakeWin’ has no member named ‘atts’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1281: error: ‘TkBorder’ has no member named ‘colormap’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1301: error: ‘TkDisplay’ has no member named ‘borderTable’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1301: error: ‘TkDisplay’ has no member named ‘borderTable’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1306: error: ‘TkBorder’ has no member named ‘nextPtr’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1307: error: ‘Tk_FakeWin’ has no member named ‘display’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1307: error: ‘Tk_FakeWin’ has no member named ‘screenNum’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1307: error: ‘TkBorder’ has no member named ‘screen’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1308: error: ‘Tk_FakeWin’ has no member named ‘atts’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1308: error: ‘TkBorder’ has no member named ‘colormap’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1311: error: ‘TkBorder’ has no member named ‘objRefCount’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c: In function ‘TkDebugBorder’:
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1391: error: ‘TkWindow’ has no member named ‘dispPtr’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1394: error: ‘TkDisplay’ has no member named ‘borderTable’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1394: error: ‘TkDisplay’ has no member named ‘borderTable’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1400: error: ‘TkBorder’ has no member named ‘nextPtr’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1403: error: ‘TkBorder’ has no member named ‘resourceRefCount’
/home/saif/Desktop/NS2/ns-allinone-2.31/tk8.4.14/unix/../generic/tk3d.c:1405: error: ‘TkBorder’ has no member named ‘objRefCount’
make: *** [tk3d.o] Error 1
tk8.4.14 make failed! Exiting ...
For problems with Tcl/Tk see http://www.scriptics.com
_______________________________________________________________________
thx in advance

Sergei Steshenko 04-13-2010 03:55 AM

The latest version is 'ns-3.7.1' (see http://www.nsnam.org/download.html ).

Why not try it first ?

Anyway, if you follow build instructions and something doesn't build, it's a bug, so file the bug report.

knudfl 04-13-2010 04:11 AM

ns-allinone-2.31 .. .. Fedora 12
 
1 Attachment(s)
Requirements : # yum install \
libX11-devel libXext-devel libXau-devel libXmu-devel gcc-c++

And the tk-8.4-lastevent.patch for nam to work.
Copy the patch to tk-8.4.24/ and apply with :
patch -p0 < tk-8.4-lastevent.patch

cd ns-allinone-2.31/ && ./install
.. and no errors on Fedora 12.


Other info : LQ Search http://www.linuxquestions.org/questions/search.php
>>> 'Tag Name' = ns2 .. and 'Tag Name' = ns231

.....

knudfl 04-13-2010 04:18 AM

Post # 2 @Sergei Steshenko : ns3 is not ns2.

' ns3 ' is a completely different beast.

The latest ns2 is ns-2.34 / ns-allinone-2.34,
but there are a lot of special applications / patches
tied to / tailored for some of the older versions.
Therefore all the questions here at LQ for
ns-2.26 , ns-2.27 , ns-2.31 , etc.
.....

Sergei Steshenko 04-13-2010 04:20 AM

Quote:

Originally Posted by knudfl (Post 3933828)
Post # 2 @Sergei Steshenko : ns3 is not ns2.

' ns3 ' is a completely different beast.

The latest ns2 is ns-2.34 / ns-allinone-2.34,
but there are a lot of special applications / patches
tied to / tailored for some of the older versions.
Therefore all the questions here at LQ for
ns-2.26 , ns-2.27 , ns-2.31 , etc.
.....

Thanks for the clarification.

Still, the OP's problem is a bug in build mechanism.

knudfl 04-13-2010 04:53 AM

# 5: No, there are no bugs, except for the 'tk' one.

(And yes, tcl/tk never did a check for all x11 headers. On a Linux with
separate packages for Xext, Xmu, Xau, make will fail, when 'devel'
packages for those are missing.)

NS-2.3x works for me with no errors every time.
Suggest : try it on Suse, please see post # 2 here
http://www.linuxquestions.org/questi...suse-797965/#2

brittoajay 08-19-2011 12:52 AM

Solution please
 
I would like to install the crcn.zip patch for ns2 for my project. However, the instruction in the website says that it can be useful only for version 2.31, whereas I have installed ns2.34.

My questions are,
1. Should I delete version 2.34 for using version 2.31 or can I have both installed in my ubuntu enabled laptop?
2. Is there any other way to install crcn.zip in version 2.34?

knudfl 08-19-2011 01:18 AM

Post # 7, @brittoajay : Welcome to LQ.
CRCN http://stuweb.ee.mtu.edu/~ljialian/installation.htm

You can have as many versions of ns-allinone-2.xx as you want,
installed at the same time.
Just don't add any of them to your PATH or LD_LIBRARY_PATH :
Adding a PATH*** is not required since ns-2.26. ( Usually.)


Information for installing CRCN, ns-2.31 : LQ Search, Tag = crcn
Example, post # 9 here
http://www.linuxquestions.org/questi...31-a-831390/#9

..

brittoajay 08-19-2011 01:47 AM

Thank you knudfl....

I wish to use only one ns2 version suitable for Cognitive Radio Networks implementation. Hence I thought that it would be best to completely delete the 2.34 and use 2.31.
However as per your suggestion, can you provide me steps to open ns2.31 and ns2.34 separately, when needed? Without providing path to ns2.31, how'll I use it? (I'm very much a newbie for NS2 implementations)

knudfl 08-19-2011 02:35 AM

# 9.

cd ns-allinone-2.34/nam-1.14/ && make install && exit && exit
( One file, the binary 'nam' is copied to /usr/local/bin/ ).
Nam is a separate application, one nam will work for all ns-2.xx.

cd /ns-allinone-2.31/ns-2.31/ && make install
The binary 'ns' (and a man page, ns.1) is copied to /usr/local/.

Nam and ns are statically compiled : With tcl tk otcl tclcl compiled
into the binaries. No path* required. Nam and ns depends on system files
in /lib:/usr/lib/ only, like libc6*, libx11*, etc.

All the text about setting a PATH*, (adding lines to .bashrc)
is just a 12? year old text for ancient requirements. AFAIK.

..

irphan 10-13-2011 06:32 AM

Please help NS-2.31 nam is not working as i need to run SARA algorithum after this
 
abc@ubuntu:~/ns-allinone-2.31/ns-2.31$ nam
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 {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D)}] units
}
bind Li..."

knudfl 10-13-2011 07:30 AM

Post # 11, @ irphan : Welcome to LQ.

Please do not double post : Not allowed !

Nam : Use a binary nam like nam-1.14.i586.tar.gz : Unpack, and
sudo cp nam /usr/local/bin/
32bits nam https://docs.google.com/uc?id=0B7S25...=CLPiyxo&hl=en
64bits https://docs.google.com/uc?id=0B7S25...CN3jzIcL&hl=en

..

irphan 10-14-2011 01:28 AM

Thanks a lot @ knudfl
 
It worked
now please guide me I need to reproduce the SARA
http://cnm.tagus.inesc-id.pt/softwar...algorithm-sara
I had tried many times with Ns-2.34 and other version but It didn't worked so now I am trying to install it on ns-2.31

I had did this installation in VMWARE so if required I can share my virtual machine as well
Please guide me as i need to implement 2 algorithums out which one is SARA and other could be some FUZZY based
Regards

knudfl 10-14-2011 06:23 AM

# 13 @irphan : SARA is a new subject :
Please start a new thread, and I have an answer ...

http://www.linuxquestions.org/questi...ux-software-2/ > New Thread

I.e. you cannot use another members thread for an off topic question.

..

alikaamil 11-02-2011 02:11 AM

Hi knudfl can you help me, I am installing ns2.31 on fedora 11 I recieved this message "bash: ./install-sh: /bin/sh^M: bad interpreter: No such file or directory"
what I should do?


All times are GMT -5. The time now is 09:36 AM.