[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [ns] Re:
in fact most sparcs have the same problem. you have to change the config
file ..... i am attaching my changed ./install file ...
i have just added the enable gcc option
debo
On Thu, 8 Jun 2000, Haobo Yu wrote:
> I'd suspect that your c++ is not g++. You may try a c++ -v to see what
> it is, or edit configure and delete c++ from that CC macro search list.
>
> - Haobo
>
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]]On Behalf Of Martin Koyabe
> > Sent: Thursday, June 08, 2000 9:21 AM
> > To: [email protected]
> > Cc: [email protected]
> > Subject: [ns] Re:
> >
> >
> > L,
> >
> > What was the suggested solution to the problem below. I am also
> > having the same
> > problem here installing Otcl on HP-UNIX platform
> >
> > [..]
> > http://www-mash.cs.berkeley.edu/dist/archive/ns-users/9906/0152.html
> >
> >
> > -- Martin
> >
> >
> >
> >
>
#! /bin/sh
#
# Copyright (C) 2000 by USC/ISI
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation, advertising
# materials, and other materials related to such distribution and use
# acknowledge that the software was developed by the University of
# Southern California, Information Sciences Institute. The name of the
# University may not be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
#
# Maintainer: Nader Salehi <[email protected]>
# Version Date: 1999/03/16 16:10:50 PST
#
#
die() {
echo "$@" 1>&2
test ! -z "$blame" && echo "$blame" 1>&2
exit 1
}
warn() {
echo "$@"
}
# Get current path
CUR_PATH=`pwd`
# create tcl8.0.4 and tk8.0.4 installation directory
if [ ! -d tclbox ]
then
mkdir tclbox
fi
if [ ! -d tkbox ]
then
mkdir tkbox
fi
# install and install Tcl8.0.4
cd ./tcl8.0.4/unix
blame='Tcl is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.'
./configure --enable-gcc=yes --prefix="$CUR_PATH/tclbox" || die "tcl8.0.4 configuration failed! Exiting ..."
if make
then
make install || die "tcl8.0.4 installation failed! Exiting ..."
else
echo "tcl8.0.4 make failed! Exiting ..."
echo "For problems with Tcl/Tk see http://www.scriptics.com"
exit
fi
cd ../../
# compile and install tk
cd ./tk8.0.4/unix
blame='Tk is not part of the ns project. Please see www.Scriptics.com
to see if they have a fix for your platform.'
./configure --enable-gcc=yes --prefix="$CUR_PATH/tkbox" || die "tk8.0.4 configuration failed! Exiting ..."
if make
then
make install || die "tk8.0.4 installation failed! Exiting ..."
else
echo "tk8.0.4 make failed! Exiting ..."
echo "For problems with Tcl/Tk see http://www.scriptics.com"
exit
fi
cd ../../
# do some copy for otcl
cp ./tcl8.0.4/generic/*.h ./tclbox/include/ || die "cp failed"
cp ./tk8.0.4/generic/*.h ./tkbox/include/ || die "cp failed"
# compile and install otcl
cd ./otcl-1.0a5
blame='Please check http://www-mash.cs.berkeley.edu/ns/ns-problems.html
for common problems and bug fixes.'
./configure --enable-gcc=yes --with-tcl=../tclbox --with-tk=../tkbox || die "otcl-1.0a4 configuration failed! Exiting ..."
if make
then
echo "otcl-1.0a5 has been installed successfully."
else
echo "otcl-1.0a5 make failed! Exiting ..."
echo "See http://www-mash.CS.Berkeley.EDU/ns/ns-problems.html for problems"
exit
fi
cd ../
# compile and install tclcl-1.0b9
cd ./tclcl-1.0b9
./configure --enable-gcc=yes --with-otcl=../otcl-1.0a5 --with-tcl=../tclbox --with-tk=../tkbox --with-tcl-ver=8.0.4 --with-tk-ver=8.0.4 || die "tclcl-1.0b9 configuration failed! Exiting ..."
if make
then
echo "tclcl-1.0b9 has been installed successfully."
else
echo "tclcl-1.0b9 make failed! Exiting ..."
echo "See http://www-mash.CS.Berkeley.EDU/ns/ns-problems.html for problems"
exit
fi
cd ../
#compile and install xgraph
cd ./xgraph-12.1
./configure --prefix=../ --enable-gcc=yes
if make
then
echo "xgraph has been installed successfully. "
else
echo "Can not create xgraph; But xgraph is an optional package, continuing..."
fi
cd ../
#compile and install cweb and sgblib
cd ./cweb
if [ ! -f ./Makefile ]
then
echo "ns-allinone unable to install cweb for you. Please install it manually. cweb is used by sgb to create sgblibrary needed by scenario-generator. But this will not affect the use of ns as such, so continue.."
else
echo "Making cweb"
touch *.c
make all || warn "cweb failed to make, but it's optional"
# xxx: other stuff will fail...
chmod 755 cweave
chmod 755 ctangle
cd ..
#echo "cd .."
if [ ! -d bin ]
then
mkdir bin
fi
cd bin
ln -s $CUR_PATH/cweb/cweave cweave
ln -s $CUR_PATH/cweb/ctangle ctangle
fi
cd ..
PATH=$CUR_PATH/bin:$PATH
export PATH
#echo $PATH
cd ./sgb
if [ ! -f ./Makefile ]
then
echo "Unable to create sgb library. This library is used by gt-itm and so for scenario generators. If you already have sgblib (possible if you are on solaris,sunos or freebsd platforms) you may still be able to run gt-itm. so continuing.."
else
echo "Making sgb"
if make tests
then
if [ -f lib*.a ]
then
if [ -f ../gt-itm/lib/libgb.a ]
then
rm ../gt-itm/lib/libgb.a
cp lib*.a ../gt-itm/lib/libgb.a
fi
fi
else
echo "Unable to create sgb library, but it's optional, so continuing..."
fi
fi
cd ..
# compile and install gt-itm & sgb2ns
## don't need to do this any longer
##./tclbox/bin/tclsh8.0.4 ./bin/gtitm.tcl
if [ -f ./gt-itm/lib/libgb.a ]
then
if [ ! -f ./gt-itm/src/Makefile ]
then
echo "ns-alline is unable to install gt-itm sgb2ns for you, please install"
echo "them manually. You can't run scenario generator without gt-itm"
echo "and sgb2ns. But it will not affect you use ns, so continue ..."
else
cd ./gt-itm/src
if make
then
echo "gt-itm has been installed successfully."
fi
cd ../sgb2ns
if make
then
echo "sgb2ns has been installed successfully."
fi
cd ../../
fi
else
echo "sgb lib not found. gt-itm & sgb2ns could not be installed. Continuing.."
fi
#compile and install ns
PATH=$CUR_PATH/tclbox/bin:$CUR_PATH/tkbox/bin:$PATH
export PATH
#echo $PATH
# John's hack
test -f ./otcl-1.0a5/libotcl.a && rm ./otcl-1.0a5/libotcl.so
cd ./ns-2.1b6
./configure --enable-gcc=yes --with-otcl=../otcl-1.0a5 --with-tclcl=../tclcl-1.0b9 --with-tcl=../tclbox --with-tk=../tkbox --disable-static || die "Ns configuration failed! Exiting ..."
if make
then
echo " Ns has been installed successfully."
else
echo "Ns make failed!"
echo "See http://www-mash.CS.Berkeley.EDU/ns/ns-problems.html for problems"
exit
fi
cd ../
#compile and install zlib
cd ./zlib-1.1.3
if ./configure --exec-prefix=../ --prefix=../ --enable-gcc=yes
then
if make
then
echo "Zlib has been installed successfully."
else
warn "Zlib make failed, but it's optional Continue ..."
fi
else
warn "Zlib-1.1.3 configuration failed, but it's optional, so continuing ..."
fi
cd ../
#compile and install nam
cd ./nam-1.0a8
./configure --enable-gcc=yes --with-otcl=../otcl-1.0a5 --with-tclcl=../tclcl-1.0b9 --with-tcl=../tclbox --with-tk=../tkbox --with-tcldebug=no --disable-static || die "Nam configuration failed! Exiting ..."
if make
then
echo "Nam has been installed successfully."
else
echo "Nam make failed! Continue ..."
echo "See http://www-mash.CS.Berkeley.EDU/ns/ns-problems.html for problems"
fi
cd ../
# install nam, ns, xgraph into bin
if [ ! -d bin ]
then
mkdir bin
fi
cd bin
ln -s $CUR_PATH/ns-2.1b6/ns ns
if test -x $CUR_PATH/nam-1.0a8/nam
then
ln -s $CUR_PATH/nam-1.0a8/nam nam
else
echo "Please compile your nam separately."
fi
if test -x $CUR_PATH/xgraph-12.1/xgraph
then
ln -s $CUR_PATH/xgraph-12.1/xgraph xgraph
else
echo "Please compile your xgraph separately."
fi
if test -x $CUR_PATH/gt-itm/bin/sgb2ns
then
ln -s $CUR_PATH/gt-itm/bin/sgb2ns sgb2ns
ln -s $CUR_PATH/gt-itm/bin/sgb2hierns sgb2hierns
ln -s $CUR_PATH/gt-itm/bin/sgb2comns sgb2comns
ln -s $CUR_PATH/gt-itm/bin/itm itm
ln -s $CUR_PATH/gt-itm/bin/sgb2alt sgb2alt
ln -s $CUR_PATH/gt-itm/bin/edriver edriver
else
echo "Please compile your gt-itm & sgb2ns separately."
fi
echo "Ns-allinone package has been installed successfully."
echo "Here are the installation places:"
echo "ns: $CUR_PATH/ns-2.1b6/ns"
echo "otcl: $CUR_PATH/otcl-1.0a5"
echo "tclcl: $CUR_PATH/tclcl-1.0b9"
echo "tcl8.0.4: $CUR_PATH/tclbox"
echo "tk8.0.4: $CUR_PATH/tkbox"
if [ -x $CUR_PATH/nam-1.0a8/nam ]
then
echo "nam: $CUR_PATH/nam-1.0a8/nam"
fi
if [ -x $CUR_PATH/xgraph-12.1/xgraph ]
then
echo "xgraph: $CUR_PATH/xgraph-12.1"
fi
if [ -x $CUR_PATH/gt-itm/bin/sgb2ns ]
then
echo "gt-itm: $CUR_PATH/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns"
fi
echo ""
echo "You can delete $CUR_PATH/tcl8.0.4 and $CUR_PATH/tk8.0.4 if "
echo "you want save your disk space"
echo "-----------------------------------------------------"
echo "Please put $CUR_PATH/bin into your PATH environment."
echo "On some systems you many need to put $CUR_PATH/otcl-1.0a5 into your LD_LIBRARY_PATH environment!"
echo ""
echo "You can run the ns validation suite with"
echo "cd ns-2.1b6; ./validate"
exit 0