Welcome to LQ.
Why ? No modifications are required.
( Fedora 6 is an old dead OS. Not supposed to be used.)
The prerequisites for ns2 are : # yum install \
gcc-c++ compat-gcc-34-c++ automake autoconf libtool libX11-devel \
libXext-devel libXau-devel libXmu-devel xorg-x11-proto-devel
This is a test with ns-allinone-2.30 on the Fedora 6 based CentOS5 / SL6, 32bits :
validate overall report: some tests failed:
./test-all-tcpHighspeed ./test-all-red ./test-all-cbq
Nothing to do. That's the expected result.
( And an even poorer result will appear, when it's a 64bits OS.)
The gcc/g++ 3.4.6 compiler may do a slightly better result :
Start from scratch in a new directory, and :
export CC=gcc34 CXX=g++34 && ./install