GIDForums  

Go Back   GIDForums > Computer Forums > Computer Software Forum - Linux
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 12-Jul-2008, 08:34
colinlocal colinlocal is offline
New Member
 
Join Date: Jul 2008
Posts: 5
colinlocal will become famous soon enough

Error installing NS2.26 on Debian


Hi All,
I am also trying to install NS2.26 and encountering some problems.
Some Info
Latest version of Debian.
Used instructions from Mathew Miller
http://www.matthewjmiller.net/howtos/ns-2-26-install-in-debian/
Compiling using gcc 2.95

I get an error during the compilation of NS2.26 stating
checking XOpenDisplay in -lX11... (cached) no
can't find X library
Ns configuration failed!

I have installed the below
apt-get install libstdc++2.10-glibc2.2
apt-get install libx11-dev
apt-get install libxt-dev

Has anybody any idea what I am missing on my installation.

Many thanks

Colin
  #2  
Old 12-Jul-2008, 11:05
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,217
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Error installing NS2.26 on Debian


Quote:
Originally Posted by colinlocal
Hi All,
I am also trying to install NS2.26 and encountering some problems....

I don't have Debian, but I have Ubuntu, which is based on, and closely related to, Debian. After installing Ubuntu and installing the libX11-dev and libxt-dev packages the ns installation (using the current version if ns all-in-one) went to completion with no problems.

I can't believe that you would have to down-rev gcc to the old, buggy 2.95 (I have had more problems with versions of 2.95 on embedded Linux projects then with any other GNU release of anything, anywhere, any time). I mean, I believe it if someone said he/she had to do it for the older version of ns, but hope that's not really necessary. I'm guessing that it wasn't the ns base code that gave the problems but compatibility problems between older X11 libraries and newer libgc libraries.

Why don't you download the latest version of the NS allinone (version 2.33 from http://www.isi.edu/nsnam/ns/ns-build.html#allinone), and then just untar it and cd into ns-allinone-2.33 and enter the following on the command line:

Code:
./install >install.log 2>& 1

This creates a file named install.log that will have a record of what went wrong and where. You can watch the install process "live" by opening another command window and navigating to the ns installaton directory and entering the following:

Code:
tail -f install.log

Ctrl-C exits the "tail" process.


If for some reason you are absolutely required to install some other version, then do the same command line stuff that I showed above. If the installation fails, then paste stuff from the install.log. Paste the lines before the first X11 warning or error messages into your post.

Regards,

Dave

Footnote: Since I don't have access to any Debian systems (I have access to one Ubuntu 8.04 platform but most of the ones for which I have administration privileges are Centos 5.2), you will be debugging the installation, not me.

It's always OK to ask about what you don't understand, but since I won't be able to reproduce your exact problems, it may take a few iterations. My point is that you should look at the messages in install.log, and try to understand and take corrective action. If you want to get help in timely fashion, It is extremely important that you post exact error/warning messages rather than paraphrasing. Just paste them into your post.

First of all, try it with the default version of gcc that was installed with your system, not gcc-2.95 (Tell us what version it is by entering "gcc --version" on a command line.)
  #3  
Old 12-Jul-2008, 11:38
colinlocal colinlocal is offline
New Member
 
Join Date: Jul 2008
Posts: 5
colinlocal will become famous soon enough

Re: Error installing NS2.26 on Debian


Hi,

Thanks for looking at this. Unfortuntately I need to use version 2.26 as there are a few modules that apparently only run on this version. I have also been told that I need to compile it with gcc 2.95, and have libX11-dev and xlibs-dev installed on the system


The error occurs during the install of NS2.26, after the successful compilation of previous parts. No compilation of NS2.26 occurs as it is checking the environment for the correct bits ( I think!).

I used

Compiled with gcc 2.95.4. The other successfully compiled parts had many warnings - "negative integer implicitly converted to unsigned type"
Code:
============================================================ * Build ns-2.26 ============================================================ loading cache ./config.cache No .configure file found in current directory Continuing with default options... checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking build system type... i686-pc-linux-gnu checking for gcc... (cached) 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... (cached) yes checking whether gcc accepts -g... (cached) yes checking for c++... (cached) c++ checking whether the C++ compiler (c++ ) works... yes checking whether the C++ compiler (c++ ) is a cross-compiler... no checking whether we are using GNU C++... (cached) yes checking whether c++ accepts -g... (cached) yes checking how to run the C preprocessor... /usr/bin/cpp-2.95 checking for ANSI C header files... (cached) yes checking for string.h... (cached) yes checking for main in -lXbsd... (cached) no checking for socket in -lsocket... (cached) no checking for gethostbyname in -lnsl... (cached) yes checking for dcgettext in -lintl... (cached) no checking for getnodebyname in -ldnet_stub... (cached) no checking that c++ can handle -O2... yes checking if STL works without any namespace... yes checking will use STL... yes checking for tcl.h... -I../include checking for libtcl8.3... -L../lib -ltcl8.3 checking for init.tcl... ../lib/tcl8.3 checking for tclsh8.3.2... (cached) ../bin/tclsh8.3 checking for tk.h... -I../include checking for libtk8.3... -L../lib -ltk8.3 checking for tk.tcl... ../lib/tk8.3 checking for otcl.h... -I../otcl-1.0a8 checking for libotcl1.0a8... -L../otcl-1.0a8 -lotcl checking for tclcl.h... -I../tclcl-1.0b13 checking for libtclcl... -L../tclcl-1.0b13 -ltclcl checking for tcl2c++... ../tclcl-1.0b13 checking for X11 header files checking for X11 library archive checking for XOpenDisplay in -lX11... (cached) no can't find X library


Thanks
Colin
  #4  
Old 12-Jul-2008, 14:05
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,217
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Error installing NS2.26 on Debian


Quote:
Originally Posted by colinlocal
The error occurs during the install of NS2.26, after the successful compilation of previous parts.
Getting the previous parts (tk, tcl, tclcl) installed is major step, and that's probably what requires the old gcc (In particular, tclcl was problematic, as I recall). Believe it or not, I think you may be well on your way. (But I could be wrong, of course.)
Quote:
Originally Posted by colinlocal
...The other successfully compiled parts had many warnings - "negative integer implicitly converted to unsigned type"
They "probably" won't be a problem, and they "certainly" won't interfere with other compilation steps.
Quote:
Originally Posted by colinlocal
Code:
============================================================ * Build ns-2.26 ============================================================ . . . checking for X11 header files checking for X11 library archive checking for XOpenDisplay in -lX11... (cached) no can't find X library
.
.
.

The messages were printed from ns-2.26/configure, which was run from the top-level configure program (assuming you are doing the "allinone" thing).

Instead of running everything from the top level from now own, cd into the ns-2.26 directory and run
Code:
./configure >configure.log 2.& 1

If you look in the configure file in ns-2.26, you should see where it is testing for the x11 library; It is probably looking for /usr/lib/libX11.a and/or /usr/lib/libX11.so

The first thing is for you to find out whether they are there:

Code:
ls -l /usr/lib/libX11.a ls -l /usr/lib/libX11.so

If they are there but the configure script didn't find them, then you have to figure out where it is looking. (You may have to do some detective work inside ns-2.26/configure.)

If they are not there, then try the following from a command line:

Code:
whereis libX11

If it shows locations for libX11.a and/or libX11.so, and they are not in /usr/lib, then you will have to tell the configure script where to look

There should be a run-time option to the configure script that lets you do that.

Since I don't the exact installation that you have, there will be more detective work at this point.

Let us know what you see.


Regards,

Dave
  #5  
Old 13-Jul-2008, 08:04
colinlocal colinlocal is offline
New Member
 
Join Date: Jul 2008
Posts: 5
colinlocal will become famous soon enough

Re: Error installing NS2.26 on Debian


Hi,
Thanks for the reply.
The Xlibrary files are in /usr/lib/

I can't figure out where the configure is looking from them, or how to force it to look in /usr/lib

Code:
configure:3318: checking for XOpenDisplay in -lX11

Line 3318 from configure
Code:
ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`

Other surrounding code from the configure file
Code:
echo "checking for X11 library archive" if test "$x_libraries" = NONE ; then echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 echo "configure:3318: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lX11 $LIBS" cat > conftest.$ac_ext <<EOF

Many thanks
Colin
  #6  
Old 13-Jul-2008, 13:24
colinlocal colinlocal is offline
New Member
 
Join Date: Jul 2008
Posts: 5
colinlocal will become famous soon enough

Re: Error installing NS2.26 on Debian


Hi,
I have solved this problem! And NS2.26 has installed! But now it fails on installing NAM (the visualizer).

The solution was from some other instructions that I was using. Mentioning that Debian is similar to ubuntu, I checked some install instructions for ubuntu and found that "Ubuntu uses x.org and not XFree.org", so I need to create some symbolic links.

Code:
ln -s /usr/lib/libX11.so.6.2.0 ln -s /usr/lib/libX11.so.6 ln -s /usr/lib/libX11.a ln -s /usr/lib/libX11.so

This solved the problem.

The problem with NAM is

Code:
rm -f xwd.o; /usr/bin/gcc-2.95 -o xwd.o -c -DTCL_TK -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A8 -DHAVE_OTCL_H -DHAVE_LIBTK8_3 -DHAVE_TK_H -DHAVE_LIBTCL8_3 -DHAVE_TCL_H -I. -I/usr/local/dload2/ns-allinone-2.26/tclcl-1.0b13 -I/usr/local/dload2/ns-allinone-2.26/otcl-1.0a8 -I/usr/local/dload2/ns-allinone-2.26/include -I/usr/local/dload2/ns-allinone-2.26/include xwd.c xwd.c:87: X11/Xmu/WinUtil.h: No such file or directory make: *** [xwd.o] Error 1 Nam make failed! Continue ...

Do you think that this is also related to x.org being used instead of XFree.org?

Many thanks
Colin
  #7  
Old 13-Jul-2008, 17:27
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,217
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Error installing NS2.26 on Debian


Quote:
Originally Posted by colinlocal
I have solved this problem!
I'm glad, because I was just about to say that I was almost out of "remote control" ideas.I mean, poking around on my own system, sometimes I try a million things (maybe more) before I stumble across one that works. It's kind of hard to go through all of that with someone with a different operating system who is installing a different software version.

Congratulations!

Quote:
Originally Posted by colinlocal
...But now it fails on installing NAM...

The problem with NAM is ... X11/Xmu/WinUtil.h: No such file or directory
make: *** [xwd.o] Error 1
Nam make failed! Continue .

I am not at a place where I can access Ubuntu, but I know that in Centos (RedHat) distributions, there is a "libXmu" package available that creates and populates the Xmu directory and Xmu library functions. Try to find it with your apt package manager. If you havd the GUI apt package manager, just search for "Xmu". (Or go back to some Ubuntu forum and search there.) I'm thinking that you need both "libXmu" and "libXmu-devel."

Now, if you already have /usr/include/X11/Xmu/WinUtil.h, then you may have to do something similar to what you learned about the ns installation (I don't understand exactly where you made links, but it's not important for me; only for you. I couldn't offer more advice on that anyhow.)

Regards,

Dave
  #8  
Old 16-Jul-2008, 04:37
colinlocal colinlocal is offline
New Member
 
Join Date: Jul 2008
Posts: 5
colinlocal will become famous soon enough

Re: Error installing NS2.26 on Debian


Thanks Dave,

Installing this works! NS and NAM are now working like a dream.

In short, for all those students show need to install NS2.26 as they have written loads of code for it, or use a module that only works with this (MNS), this will work.

Install Debian 4.0r3

Carry out instructions from
http://www.matthewjmiller.net/howtos/ns-2-26-install-in-debian/

In addition
Create symbolic links in /usr/X11R6/lib
ln -s /usr/lib/libX11.so.6.2.0
ln -s /usr/lib/libX11.so.6
ln -s /usr/lib/libX11.a
ln -s /usr/lib/libX11.so

in /usr/bin create a symbolic link
ln -s g++-2.95 c++

Additional apt-get for NAM
apt-get install libxmu-dev

Many thanks for the help.

Colin
  #9  
Old 16-Jul-2008, 08:54
davekw7x davekw7x is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Left Coast, USA
Posts: 5,217
davekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to beholddavekw7x is a splendid one to behold

Re: Error installing NS2.26 on Debian


Quote:
Originally Posted by colinlocal
...this will work
.
.
.
thanks...
Well, what goes around comes around. See References.

You can be sure that people will be helped by your sharing. I'll bet that at least some of them will, in turn, go on to help others. They may even help you some day. (Me too.)

And so it goes...


Regards,

Dave

References:

"What goes up must come down
Spinnin' wheel got to go 'round."
---Blood, Sweat and Tears

Or, for the younger crowd:

"What goes around, goes around, goes around
Comes all the way back around."
---Justin Timberlake

Also see Karma
 
 

Recent GIDBlogProblems with the Navy (Chiefs) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
run script command on ns2.26 newbie06 Computer Software Forum - Linux 65 19-Aug-2009 08:50
validation test failed in ns2.26 knoppix newbie06 Computer Software Forum - Linux 7 07-Jan-2007 20:45
Cannot install on Debian TeXJunky FLTK Forum 1 15-Nov-2005 14:17
Gimp-data package update error in Debian crystalattice Computer Software Forum - Linux 1 15-Jul-2004 19:07
Trust Spyc@m 500 on Debian Allowee Computer Software Forum - Linux 5 28-Jan-2004 12:54

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 17:44.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.