LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 03-15-2011, 04:25 AM   #1
xptional
LQ Newbie
 
Registered: Mar 2011
Location: France
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26

Rep: Reputation: 11
ns2.34 installation help in Ubuntu 10.10


Hi ,

I need your help regarding installation of NS2.34 in Ubuntu 10.10 on my Dell machine LATITUDE E5400. I have Ubunut10.10 32 bit version.

I have already read some threads, but they could not help me, some were for Fedora, some were for Red Hat.

I have already tried to install on my machine by downloading ns and then by
Code:
./install
command but i encountered with some errors, some last line of failed installation are below,

Quote:
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/khan/network_simulator/ns2/ns-allinone-2.34/include -I/home/khan/network_simulator/ns2/ns-allinone-2.34/include -I/home/khan/network_simulator/ns2/ns-allinone-2.34/include -I/include otcl.c
ld -shared -o libotcl.so otcl.o
otcl.o: In function `OTclDispatch':
/home/khan/network_simulator/ns2/ns-allinone-2.34/otcl-1.13/otcl.c:495: undefined reference to `__stack_chk_fail_local'
otcl.o: In function `Otcl_Init':
/home/khan/network_simulator/ns2/ns-allinone-2.34/otcl-1.13/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: Nonrepresentable section on output
make: *** [libotcl.so] Error 1
otcl-1.13 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
could anyone please help me ? I thank you in advance !

Imran
 
Old 03-15-2011, 04:31 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,990

Rep: Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611
Welcome to LQ. .. .. ..

sudo apt-get install g++-4.3 nam

'cd ns-allinone-2.34/ && export CC=gcc-4.3 CXX=g++-4.3 && ./install'


EDIT : gcc-4.2 , g++-4.2 , see post # 3.

..

Last edited by knudfl; 03-16-2011 at 05:09 PM.
 
Old 03-16-2011, 05:06 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,990

Rep: Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611
Just found out today that ns-allinone-2.34 is particular tricky to build
on the 32bits Ubuntu 10.10 : Nothing else than gcc/g++-4.2 worked.

Suggest : sudo gedit /etc/apt/sources.list : And then add these lines
Code:
deb http://76.73.4.58/ubuntu/ hardy-updates main
deb http://76.73.4.58/ubuntu/ hardy universe
deb http://security.ubuntu.com/ubuntu hardy-security main
deb http://security.ubuntu.com/ubuntu hardy-security universe
Install g++-4.2 : sudo apt-get update && sudo apt-get install g++-4.2
 
Old 03-17-2011, 05:40 AM   #4
xptional
LQ Newbie
 
Registered: Mar 2011
Location: France
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26

Original Poster
Rep: Reputation: 11
Now, I am confused and could not know exactly which commands should I run and in which order,

What i have done,

I have already added the suggested lines in sources.list. Then I have run these commands and encoutered some output as failed listed below
Code:
sudo apt-get update && sudo apt-get install g++-4.2
Quote:
Fetched 6,187kB in 10s (607kB/s)
W: Failed to fetch http://ppa.launchpad.net/wouterh/ppa...rce/Sources.gz 404 Not Found

W: Failed to fetch http://ppa.launchpad.net/wouterh/ppa...86/Packages.gz 404 Not Found

E: Some index files failed to download, they have been ignored, or old ones used instead.
after that i run this
Code:
sudo apt-get install nam
after than i run this command
Code:
khan@khan:~/network_simulator/ns2/ns-allinone-2.34$ export CC=gcc-4.2 CXX=g++-4.2 && ./install
and the result is
Quote:
sgb2ns has been installed successfully.
============================================================
* Build zlib
============================================================
Building static library libz.a version 1.2.3 with gcc-4.2.
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.
make: Nothing to be done for `all'.
Zlib has been installed successfully.
============================================================
* Build tcl8.4.18
============================================================
rm -f *.a *.o libtcl* core errs *~ \#* TAGS *.E a.out \
errors tclsh tcltest lib.exp Tcl
cd dltest ; make clean
make[1]: Entering directory `/home/khan/network_simulator/ns2/ns-allinone-2.34/tcl8.4.18/unix/dltest'
rm -f *.o config.cache config.log config.status
rm -f lib.exp ../dltest.marker
rm -f *.so
make[1]: Leaving directory `/home/khan/network_simulator/ns2/ns-allinone-2.34/tcl8.4.18/unix/dltest'
rm -rf Makefile config.status config.cache config.log tclConfig.sh \
SCRPtcl.* prototype *.plist Tcl.framework
cd dltest ; make distclean
make[1]: Entering directory `/home/khan/network_simulator/ns2/ns-allinone-2.34/tcl8.4.18/unix/dltest'
rm -f *.o config.cache config.log config.status
rm -f lib.exp ../dltest.marker
rm -f *.so
rm -f Makefile
make[1]: Leaving directory `/home/khan/network_simulator/ns2/ns-allinone-2.34/tcl8.4.18/unix/dltest'
./install: 431: autoconf: not found
creating cache ./config.cache
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... gcc-4.2
checking whether the C compiler (gcc-4.2 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
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.
I dont think so that ns2.34 is installed ... Could you please help further ? Thanks !
 
Old 03-17-2011, 06:16 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,990

Rep: Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611
# 4 : May be you are missing some of the basic prerequisites :

sudo apt-get install g++ autoconf automake libtool \
libx11-dev libxmu-dev libxmu-headers libxt-dev
 
Old 03-17-2011, 01:27 PM   #6
xptional
LQ Newbie
 
Registered: Mar 2011
Location: France
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26

Original Poster
Rep: Reputation: 11
Dear,
I have run the command you mentioned above, it executed successfully, but after that , i run the command
Code:
khan@khan:~/network_simulator/ns2/ns-allinone-2.34$ export CC=gcc-4.2 CXX=g++-4.2 && ./install
and some last lines of the results are below, no c-compiler and tcl8.4.1 installation etc etc
Quote:
============================================================
* 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... gcc-4.2
checking whether the C compiler works... no
configure: error: in `/home/khan/network_simulator/ns2/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.
 
Old 03-17-2011, 02:22 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,990

Rep: Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611
Quote:
configure: error: C compiler cannot create executables
Well, what can I suggest .... double check and reinstall :

sudo apt-get install libc6-dev linux-libc-dev gcc-4.2 g++


(And I did compile a new ns-allinone-2.34 again on Ubuntu 10.10 32bits: No errors.)

..
 
Old 03-18-2011, 04:23 AM   #8
xptional
LQ Newbie
 
Registered: Mar 2011
Location: France
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26

Original Poster
Rep: Reputation: 11
Quote:
sudo apt-get install libc6-dev linux-libc-dev gcc-4.2 g++
i did this, it terminates successfully,
Quote:
g++ is already the newest version.
libc6-dev is already the newest version.
linux-libc-dev is already the newest version.
The following packages were automatically installed and are no longer required:
linux-headers-2.6.35-22 linux-headers-2.6.35-22-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
cpp-4.2 gcc-4.2-base
Suggested packages:
gcc-4.2-locales gcc-4.2-doc gcc-4.2-multilib libgcc1-dbg libgomp1-dbg
libmudflap0-4.2-dev libmudflap0-dbg
The following NEW packages will be installed:
cpp-4.2 gcc-4.2 gcc-4.2-base
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
after that, i run this command to install
Code:
khan@khan:~/network_simulator/ns2/ns-allinone-2.34$ export CC=gcc-4.2 CXX=g++-4.2 && ./install
but at the end i got some errors, listed below, these are some of last lines of the execution.

Quote:
otcl-1.13 has been installed successfully.
============================================================
* Build Tclcl-1.19
============================================================
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-4.2
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-4.2 accepts -g... yes
checking for gcc-4.2 option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... no
checking whether g++-4.2 accepts -g... no
checking how to run the C preprocessor... gcc-4.2 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/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 standard STL is available... no
checking for ranlib... ranlib
checking for snprintf... yes
checking for ANSI C header files... (cached) yes
checking for strtoq... yes
checking for strtoll... yes
checking size of long... 4
checking for __int64_t... no
checking for long long... yes
checking for int64_t... yes
checking which kind of 64-bit int to use... int64_t
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.18... 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 otcl.h... -I../otcl-1.13
checking for libotcl1.13... -L../otcl-1.13 -lotcl
checking for X11 header files
checking for X11 library archive
checking for XOpenDisplay in -lX11... yes
checking for XShmAttach in -lXext... yes
checking for zlib.h... -I/usr/include
checking for libz1.1.3... -L/usr/lib -lz
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
config.status: creating config.h
creating ./gen
creating ./bin
gcc-4.2 -c -DNO_TK -DNDEBUG -DUSE_SHM -DHAVE_LIBZ1_1_3 -DHAVE_ZLIB_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -I. -I/usr/include -I/home/khan/network_simulator/ns2/ns-allinone-2.34/otcl-1.13 -I/home/khan/network_simulator/ns2/ns-allinone-2.34/include -I/home/khan/network_simulator/ns2/ns-allinone-2.34/include -I/home/khan/network_simulator/ns2/ns-allinone-2.34/include -o tcl2c++.o tcl2c++.c
rm -f tcl2c++
g++-4.2 -o tcl2c++ tcl2c++.o
make: g++-4.2: Command not found
make: *** [tcl2c++] Error 127
tclcl-1.19 make failed! Exiting ...
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
as i have observed, installation progresses as compared to lastday executions...,
as you have run this on your system, i am grateful to you for your cooepration. but here i am still getting some errors in installation, hope this post helps you to guide me again ,
 
Old 03-18-2011, 04:33 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,990

Rep: Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611
# 8
Quote:
make: g++-4.2: Command not found
So how come you didn't install g++-4.2 ? ? ?


Post # 3 is about installing 'g++-4.2' only !

→ sudo apt-get install g++-4.2

( Without g++-4.2 you can't do 'export CC=gcc-4.2 CXX=g++-4.2' ).
 
Old 03-18-2011, 05:19 AM   #10
xptional
LQ Newbie
 
Registered: Mar 2011
Location: France
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by knudfl View Post
# 8

So how come you didn't install g++-4.2 ? ? ?


Post # 3 is about installing 'g++-4.2' only !

→ sudo apt-get install g++-4.2

( Without g++-4.2 you can't do 'export CC=gcc-4.2 CXX=g++-4.2' ).
I did it , and it finishes successfully ..
and then I run the command to install NS2.34 as usual , and it finished also successfuly, at then I got message to put something into PATH etc ,
Quote:
Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.4.18: /home/khan/network_simulator/ns2/ns-allinone-2.34/{bin,include,lib}
tk8.4.18: /home/khan/network_simulator/ns2/ns-allinone-2.34/{bin,include,lib}
otcl: /home/khan/network_simulator/ns2/ns-allinone-2.34/otcl-1.13
tclcl: /home/khan/network_simulator/ns2/ns-allinone-2.34/tclcl-1.19
ns: /home/khan/network_simulator/ns2/ns-allinone-2.34/ns-2.34/ns
nam: /home/khan/network_simulator/ns2/ns-allinone-2.34/nam-1.14/nam
gt-itm: /home/khan/network_simulator/ns2/ns-allinone-2.34/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns

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

Please put /home/khan/network_simulator/ns2/ns-allinone-2.34/bin:/home/khan/network_simulator/ns2/ns-allinone-2.34/tcl8.4.18/unix:/home/khan/network_simulator/ns2/ns-allinone-2.34/tk8.4.18/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.

IMPORTANT NOTICES:

(1) You MUST put /home/khan/network_simulator/ns2/ns-allinone-2.34/otcl-1.13, /home/khan/network_simulator/ns2/ns-allinone-2.34/lib,
into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries
into LD_LIBRARY_PATH.
If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH <paths>
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=<paths>

(2) You MUST put /home/khan/network_simulator/ns2/ns-allinone-2.34/tcl8.4.18/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.


After these steps, you can now run the ns validation suite with
cd ns-2.34; ./validate

For trouble shooting, please first read ns problems page
http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive
for related posts.
Could you also please tell me about this one
Code:
export CC=gcc-4.2 CXX=g++-4.2
, I could not get it what it does .. Thanks again, alot of thanks ..
 
Old 03-18-2011, 06:16 AM   #11
xptional
LQ Newbie
 
Registered: Mar 2011
Location: France
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26

Original Poster
Rep: Reputation: 11
The path settings in the /.bashrc file are like this one,
Quote:
# NS 2.34 PATH settings
#PATH
PATH="/home/khan/network_simulator/ns2/ns-allinone-2.34/bin:/home/khan/network_simulator/ns2/ns-allinone-2.34/tcl8.4.18/unix:/home/khan/network_simulator/ns2/ns-allinone-2.34/tk8.4.18/unix"
export PATH=$PATH

# LD_LIBRARY_PATH
OTCL_LIB=/home/khan/network_simulator/ns2/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/khan/network_simulator/ns2/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:
$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/home/khan/network_simulator/ns2/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/khan/network_simulator/ns2/ns-allinone-2.34/bin:/home/khan/Network_Simulator/ns2/ns-allinone-2.34/tcl8.4.14/unix:/home/khan/network_simulator/ns2/ns-allinone-2.34/tk8.4.14/unix
NS=/home/khan/network_simulator/ns2/ns-allinone-2.34/ns-2.34/
NAM=/home/khan/network_simulator/ns2/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM

when i run my terminal, it shows an error,
Quote:
bash: /home/khan/network_simulator/ns2/ns-allinone-2.34/otcl-1.13:/home/khan/network_simulator/ns2/ns-allinone-2.34/lib:/usr/X11R6/lib:/usr/local/lib: No such file or directory
could you please guide me to set the PATH,?? Thanks !
 
Old 03-18-2011, 07:11 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,990

Rep: Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611
Quote:
The path settings in the /.bashrc file are like this one ....
The text is an old thing. Required for ns-2.26 and earlier.
Quote:
PATH="/home/khan/network_simulator/ns2/ns-allinone-2.34
Please keep ns-allinone-2.34/ in that location.

Making 'ns' and 'nam' available in the PATH : 'cd ns-allinone-2.34/ns-2.34/
&& sudo make install && cd ../nam-1.14/ && sudo make install' :
This will copy ns and nam to /usr/local/bin/ : A system PATH.

ns and nam will depend on libraries in /usr/lib/ only. ( Usually.)
'/usr/lib/' is a system LD_LIBRARY_PATH : No further paths to be added.

..
 
Old 03-18-2011, 10:27 AM   #13
xptional
LQ Newbie
 
Registered: Mar 2011
Location: France
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26

Original Poster
Rep: Reputation: 11
I thank you so so much more .. You help me so so much regarding installation. Its been 3 weeks that I was trying to install but could not do that.
Anyhow for the paths, what i have did,
I have deleted all the paths in
Code:
/.bashrc
file. After that
I did,
Quote:
khan@khan:~/network_simulator/ns2/ns-allinone-2.34/ns-2.34$ sudo make install
[sudo] password for khan:
for d in /usr/local/man/man1; do \
if [ ! -d $d ]; then \
mkdir -p $d ;\
fi;\
done
/usr/bin/install -c -m 755 ns /usr/local/bin
/usr/bin/install -c -m 644 ns.1 /usr/local/man/man1
khan@khan:~/network_simulator/ns2/ns-allinone-2.34/ns-2.34$
and also for nam
Quote:
khan@khan:~/network_simulator/ns2/ns-allinone-2.34/nam-1.14$ sudo make install
/usr/bin/install -c -m 755 nam /usr/local/bin
khan@khan:~/network_simulator/ns2/ns-allinone-2.34/nam-1.14$
and the result is fine
Quote:
khan@khan:~/network_simulator/ns2/ns-allinone-2.34$ ns
%
Quote:
khan@khan:~$ ns
%
Again I thank you so much for your help. I could not describe my happiness that i have got after installation of ns2. May you live long and be helping for others too.
 
Old 09-10-2011, 04:09 AM   #14
maneshmotts
LQ Newbie
 
Registered: Sep 2011
Posts: 16

Rep: Reputation: Disabled
I have tried to install ns 2 on ubunutu 11.04


============================================================
* 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... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) 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... (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 how to run the C preprocessor... (cached) gcc -E
checking for X... (cached) no
checking for float.h... (cached) yes
checking for limits.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking for strcasecmp... (cached) yes
creating ./config.status
creating Makefile
creating autoconf.h
autoconf.h is unchanged
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -c dialog.c
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
gcc-4.2 -g -I/usr/local/sgb/include test_io.c gb_io.o -o test_io
Unable to create sgb library, but it's optional, so continuing...
============================================================
* Build GT-ITM
============================================================
gcc -I../include -L../lib -DFBSD -o ../bin/itm itm.o geog.o ts.o dfs.o -lm -lgb
gcc -I../include -L../lib -DFBSD -o ../bin/sgb2alt sgb2alt.o -lm -lgb
gcc -I../include -L../lib -DFBSD -o ../bin/edriver edriver.o eval.o -lm -lgb
gt-itm has been installed successfully.
gcc -I../include -L../lib -o ../bin/sgb2comns sgb2comns.o -lm -lgb
gcc -I../include -L../lib -o ../bin/sgb2hierns sgb2hierns.o -lm -lgb
gcc -I../include -L../lib -o ../bin/sgb2ns sgb2ns.o -lm -lgb
sgb2ns has been installed successfully.
============================================================
* Build zlib
============================================================
Building static library libz.a version 1.2.3 with gcc-4.2.
Checking for unistd.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()
Checking for vsnprintf() in stdio.h... No.
WARNING: vsnprintf() not found, falling back to vsprintf(). zlib
can build but will be open to possible buffer-overflow security
vulnerabilities.
Checking for return value of vsprintf()... Yes.
Checking for errno.h... No.
Checking for mmap support... Yes.
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -c -o example.o example.c
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -c -o adler32.o adler32.c
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -c -o compress.o compress.c
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -c -o crc32.o crc32.c
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -c -o gzio.o gzio.c
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -c -o uncompr.o uncompr.c
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -c -o deflate.o deflate.c
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -c -o trees.o trees.c
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -c -o zutil.o zutil.c
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -c -o inflate.o inflate.c
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -c -o infback.o infback.c
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -c -o inftrees.o inftrees.c
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -c -o inffast.o inffast.c
ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o
gcc-4.2 -O3 -DNO_vsnprintf -DNO_ERRNO_H -DUSE_MMAP -o example example.o -L. libz.a
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... gcc-4.2
checking whether the C compiler works...

make: *** [example] Error 1
configure: WARNING: unrecognized options: --enable-gcc
configure: error: in `/home/mwk/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.


i need to install tcl can any one help me out
 
Old 09-10-2011, 04:32 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,990

Rep: Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611Reputation: 2611
Post # 14, @ maneshmotts. First : Use code tags. See how it looks in #13.
http://www.linuxquestions.org/questi....php?do=bbcode
Please use 'Edit' > 'Go Advanced' : The # button can be used to edit post #14.

Ubuntu 11.04 , 64bits / amd64 : Not usable for ns-allinone-2.xx.
Ubuntu 11.04 32bits OS can be used with a native "11.04 gcc-3.4.6" compiler.

gcc34-compat-3.4.6_i386.deb :
https://docs.google.com/uc?id=0B7S25...nload&hl=en_US

g++34-compat-3.4.6_i386.deb :
https://docs.google.com/uc?id=0B7S25...nload&hl=en_US

Prerequisites for ns-allinone-2.xx :
sudo apt-get install g++ autoconf automake libtool \
libx11-dev libxmu-dev libxmu-headers libxt-dev


cd ns-allinone-2.34/ && export CC=gcc34 CXX=g++34 && ./install

..

Last edited by knudfl; 09-10-2011 at 04:33 AM.
 
  


Reply

Tags
g++34-compat, ns234, ns234-ubuntu


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
Problems in Installation of NS2.27 on Ubuntu 9.10 Scofield Linux - General 7 03-15-2013 03:47 AM
ns2.29 installation in ubuntu bolmeteus Ubuntu 4 02-08-2011 01:46 PM
i am using ubuntu as os. for NS2 to implement a routing protocol in ns2. sujovasu Programming 1 07-27-2010 01:44 AM
NS2 installation eby83 Linux - Newbie 2 06-11-2007 01:08 AM
ns2 installation pranoti Linux - Software 2 06-11-2007 12:45 AM


All times are GMT -5. The time now is 08:27 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration