Thanks a lot for the warm welcome
Quote:
Originally Posted by knudfl
Please try this command : ls /usr/bin/g++*
( And / or : which g++-3.3 ).
What are the errors you get, when you compile ns-2.27 ? ?
..
|
I got this after typing the command:
/usr/bin/g++ /usr/bin/g++-3.3 /usr/bin/g++-4.3
(I have no idea what that means, but I'm assuming it means somehow g++3.3_3.3.6 is installed)
And the errors that I get when installing ns2.27 are these:
for i in indep-utils/cmu-scen-gen/setdest indep-utils/webtrace-conv/dec indep-utils/webtrace-conv/epa indep-utils/webtrace-conv/nlanr indep-utils/webtrace-conv/ucb; do ( cd $i; make all; ) done
make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen/setdest'
g++ -c -Dstand_alone -DSTL_NAMESPACE=@STL_NAMESPACE@ -o setdest.o setdest.cc
setdest.cc:71:1: warning: "INFINITY" redefined
In file included from /usr/include/math.h:40,
from setdest.cc:43:
/usr/include/bits/inf.h:27:1: warning: this is the location of the previous definition
In file included from ../../../config.h:54,
from setdest.h:5,
from setdest.cc:57:
../../../autoconf.h:85: error: ‘CPP_NAMESPACE’ is not a namespace-name
../../../autoconf.h:85: error: expected namespace-name before ‘;’ token
In file included from setdest.cc:57:
setdest.h:26: error: extra qualification ‘vector::’ on member ‘operator=’
setdest.h:31: error: extra qualification ‘vector::’ on member ‘operator+=’
setdest.h:36: error: extra qualification ‘vector::’ on member ‘operator==’
setdest.h:39: error: extra qualification ‘vector::’ on member ‘operator!=’
setdest.cc: In member function ‘void Node:

ump()’:
setdest.cc:876: error: cast from ‘Neighbor*’ to ‘int’ loses precision
make[1]: *** [setdest.o] Error 1
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/cmu-scen-gen/setdest'
make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/dec'
g++ -c -DSTL_NAMESPACE=@STL_NAMESPACE@ -I. -I/home/cielo/ns2/ns-allinone-2.27/tclcl-1.15 -I/home/cielo/ns2/ns-allinone-2.27/otcl-1.8 -I/home/cielo/ns2/ns-allinone-2.27/include -I/home/cielo/ns2/ns-allinone-2.27/include -I/usr/include/pcap -o proxytrace.o proxytrace.cc
In file included from proxytrace.cc:3:
../../../autoconf.h:85: error: ‘CPP_NAMESPACE’ is not a namespace-name
../../../autoconf.h:85: error: expected namespace-name before ‘;’ token
make[1]: *** [proxytrace.o] Error 1
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/dec'
make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/epa'
g++ -c -I. -I/home/cielo/ns2/ns-allinone-2.27/tclcl-1.15 -I/home/cielo/ns2/ns-allinone-2.27/otcl-1.8 -I/home/cielo/ns2/ns-allinone-2.27/include -I/home/cielo/ns2/ns-allinone-2.27/include -I/usr/include/pcap -o tr-stat.o tr-stat.cc
tr-stat.cc: In function ‘double lf_analyze(Entry&)’:
tr-stat.cc:154: error: cast from ‘void*’ to ‘int’ loses precision
make[1]: *** [tr-stat.o] Error 1
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/epa'
make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/nlanr'
g++ -c -DSTL_NAMESPACE=@STL_NAMESPACE@ -I. -I../../.. -I/home/cielo/ns2/ns-allinone-2.27/tclcl-1.15 -I/home/cielo/ns2/ns-allinone-2.27/otcl-1.8 -I/home/cielo/ns2/ns-allinone-2.27/include -I/home/cielo/ns2/ns-allinone-2.27/include -I/usr/include/pcap -o tr-stat.o tr-stat.cc
In file included from ../../../config.h:54,
from logparse.h:7,
from tr-stat.cc:24:
../../../autoconf.h:85: error: ‘CPP_NAMESPACE’ is not a namespace-name
../../../autoconf.h:85: error: expected namespace-name before ‘;’ token
tr-stat.cc: In function ‘double lf_analyze(lf_entry&)’:
tr-stat.cc:141: error: cast from ‘void*’ to ‘int’ loses precision
tr-stat.cc:152: error: cast from ‘void*’ to ‘int’ loses precision
make[1]: *** [tr-stat.o] Error 1
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/nlanr'
make[1]: Entering directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/ucb'
g++ -c -I. -I/home/cielo/ns2/ns-allinone-2.27/tclcl-1.15 -I/home/cielo/ns2/ns-allinone-2.27/otcl-1.8 -I/home/cielo/ns2/ns-allinone-2.27/include -I/home/cielo/ns2/ns-allinone-2.27/include -I/usr/include/pcap -o tr-stat.o tr-stat.cc
tr-stat.cc: In function ‘double lf_analyze(lf_entry&)’:
tr-stat.cc:174: error: cast from ‘void*’ to ‘int’ loses precision
tr-stat.cc:187: error: cast from ‘void*’ to ‘int’ loses precision
make[1]: *** [tr-stat.o] Error 1
make[1]: Leaving directory `/home/cielo/ns2/ns-allinone-2.27/ns-2.27/indep-utils/webtrace-conv/ucb'
make: *** [all-recursive] Error 2
Ns make failed!
I think the error is related to the gcc. But I don't know how to fix it. Thanks again for replying.