LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ns make error in fedora 17 (https://www.linuxquestions.org/questions/linux-newbie-8/ns-make-error-in-fedora-17-a-948298/)

fabe856 06-03-2012 08:46 AM

ns make error in fedora 17
 
Hi,
i used following commands to install ns2.31 in fedora 17:
# yum install \ libX11-devel libXext-devel libXau-devel libXmu-devel gcc-c++
#cd ns-allinone-2.31
When i give
./install
it runs for sometime and then gives following error:
make: *** [linkstate/ls.o] Error 1
Ns make failed!


Then i used
cd ns-2.31
make install
and it gave following error
[root@localhost ns-2.31]# make install
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: cannot stat `ns': No such file or directory
make: *** [install-ns] Error 1

Please suggest what to do

Regards
Fabe

knudfl 06-03-2012 10:09 AM

# yum install compat-gcc-34-c++

Better start from scratch.
Or 'make clean' in all applications, and delete all the 'Makefile's.

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


.

fabe856 06-03-2012 11:41 AM

Thanks,
Before your reply I had changed the line number 137 in ns-2.31/linkstate/ls.h


void eraseAll() { erase(baseMap::begin(), baseMap::end()); }

to this line

void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }
as per instructions of the link http://www.nsnam.com/
and then

./install.

It worked. After adding Paths, I gave ./validate command but it showed following:

validate overall report: some tests failed:
./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-manual-routing ./test-all-session ./test-all-links
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
Notice that some tests in webcache will fail on freebsd when -O is turned on.
This is due to some event reordering, which will disappear when -g is turned on.


Now I have two queries:
1. Whether ns is installed properly
2. If yes, then how to validate above failed tests

Regards
Fabe

knudfl 06-03-2012 12:00 PM

Quote:

I had changed the line number 137 in ns-2.31/linkstate/ls.h
... as per instructions of the link http://www.nsnam.com/
The instructions are for ns-2.35 .

Quote:

After adding Paths ...
Those settings are not really required on Linux.
And : Impossible to use when you have more than one version of ns-allinone-2.xx.

I will come back with an answer for the validate result.
For best result : The OS must be 32bits. ( 'uname -m' : i686 ).

.

fabe856 06-03-2012 12:18 PM

Thanks
Quote:

Originally Posted by knudfl (Post 4694514)
The instructions are for ns-2.35 .

It was showing the reference of same line and file in the terminal as well when i first tried ./install. That is why I changed the line and tried again ./install.

Quote:

Originally Posted by knudfl (Post 4694514)
For best result : The OS must be 32bits. ( 'uname -m' : i686 ).

I tried it and it is showing the same
[root@localhost a]# uname -m
i686


nam also not working
ns: finish: couldn't execute "nam": no such file or directory
while executing
"exec nam out.nam &"
(procedure "finish" line 7)
invoked from within
"finish"

knudfl 06-03-2012 03:07 PM

Nam : Please use a binary 'nam'.

https://docs.google.com/open?id=0B7S...k4NGI5NzliM2Ux
nam-1.14.i586.tar.gz : Unpack, and copy 'nam' to /usr/local/bin/

knudfl 06-03-2012 05:38 PM

Validate : I got the same moderate result with gcc/g++ ver. 3.4.
Installed a new ns-allinone-2.31 from scratch with gcc / g++ version 4.1.2 :
Same result again.

The later Ubuntu / Debian are actually better with old ns2.
This is ns-allinone-2.31, Ubuntu 10.10, gcc/g++ ver. 4.1.2 :
( gcc41-compat / g++41-compat )
Code:

validate overall report: all tests passed
.

fabe856 06-03-2012 08:43 PM

Quote:

Originally Posted by knudfl (Post 4694636)
validate overall report: all tests passed

Not able to understand. Please elaborate

knudfl 06-04-2012 03:24 AM

#8 : ""validate overall report: all tests passed""
.. is the finishing text, when all tests pass. ( Ubuntu 10.10 ).

Quite a difference from the results we got in Fedora 17 :
Code:

validate overall report: some tests failed:
./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-manual-routing ./test-all-session ./test-all-links


majd_cs 08-14-2012 03:37 PM

I do this
 
Quote:

Originally Posted by knudfl (Post 4694473)
# yum install compat-gcc-34-c++

Better start from scratch.
Or 'make clean' in all applications, and delete all the 'Makefile's.




.

but when do this line
$ cd ns-allinone-2.31/ && export CC=gcc34 CXX=g++34 && ./install
i have this msg
./install: Permission denied

knudfl 08-14-2012 03:55 PM

Post # 10.
Quote:

./install: Permission denied
Either the file "install" isn't executable, or has another owner ?

Use this install command : sh install
Or make the file "install" executable : chmod +x install


If you extracted ns-allinone-2.31.tar.gz as root in "/home/majd/",
or if you extracted to a location outside "/home/majd/" :
Then all the files are owned by root. Better delete ns-allinone-2.31/,
.. and unpack the *tar.gz as unprivileged user in "/home/majd/".

.

majd_cs 08-14-2012 04:04 PM

Quote:

Originally Posted by knudfl (Post 4754171)
Post # 10.

Either the file "install" isn't executable, or has another owner ?

Use this install command : sh install
Or make the file "install" executable : chmod +x install


If you extracted ns-allinone-2.31.tar.gz as root in "/home/majd/",
or if you extracted to a location outside "/home/majd/" :
Then all the files are owned by root. Better delete ns-allinone-2.31/,
.. and unpack the *tar.gz as unprivileged user in "/home/majd/".

.

[root@MSH ns-allinone-2.31]# export CC=gcc34 CXX=g++34 && ./installbash: ./install: Permission denied
[root@MSH ns-allinone-2.31]# pwd
/home/majd/ns-allinone-2.31

knudfl 08-15-2012 02:58 AM

# 12

Please use :

export CC=gcc34 CXX=g++34 && sh install

majd_cs 08-15-2012 02:42 PM

done
 
Quote:

Originally Posted by knudfl (Post 4754467)
# 12

Please use :

export CC=gcc34 CXX=g++34 && sh install

but I have this at the end

sgb2ns has been installed successfully.
============================================================
* Build zlib
============================================================
install: line 392: ./configure: Permission denied
Zlib-1.2.3 configuration failed, but it's optional, so continuing ...
=================================================
I type:
sh ./configure
then at the end
i have :
configure: error: Installation of tcl seems incomplete or can't be found automatically.
Please correct the problem by telling configure where tcl is
using the argument --with-tcl=/path/to/package
(perhaps after installing it),
or the package is not required, disable it with --with-tcl=no.

===========
problem #2:
* Build tcl8.4.14
============================================================
install: line 419: ./configure: Permission denied
tcl8.3.2 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.
[root@MSH ns-allinone-2.31]#

majd_cs 08-15-2012 03:02 PM

why i have this error
??????
[root@MSH setdest]# sh ./make-scen.csh
./make-scen.csh: line 18: syntax error near unexpected token `('
./make-scen.csh: line 18: `foreach pt (0)'
--------------------------------------------
the file contain:

#!/bin/csh

###########################################################
# Script for the original version of setdest
###########################################################


unset noclobber

set outdir = scen_out

set maxspeed = 20
set numnodes = 50
set maxx = 1500
set maxy = 300
set simtime = 900

foreach pt (0)
foreach scen ( 1 2 3 4 5 6 7 8 9 10)
echo scen $scen : setdest -v 1 -n $numnodes -p $pt -M $maxspeed -t $simtime \
-x $maxx -y $maxy
time ./setdest -v 1 -n $numnodes -p $pt -M $maxspeed -t $simtime \
-x $maxx -y $maxy \
>$outdir/scen-${maxx}x${maxy}-${numnodes}-${pt}-${maxspeed}-${scen}
echo
end
end


All times are GMT -5. The time now is 03:37 AM.