[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Installation of ns-allinone-2.1b3 on Red Hat Linux 5.1




    Many thanks to Jisup Hong and Wee Ching Wi for the suggestion to add the
    -ldl to the LIB in the nam Makefile - and indeed to Ya Xu for the latest 
    ns-allinone-2.1b3.


    Here is a summary of the installation sequence for the ns-allinone-2.1b3 
    that in my own case succeded for the Red Hat Linux 5.1 (on Gateway2000 
    GP6-300 platform), hoping this could perhaps help someone else trying the 
    same installation. 


    Miroslav

*******************************************************************************

    (1) Log in as root, cd to /usr/local, mkdir NS and cd there (though you 
    don't need this NS, really), ftp the ns-allinone-2.1b3.tar.gz, then type:

tar -xvzf ns-allinone-2.1b3.tar.gz

    which will create a subdirectory ns-allinone-2.1b3/ of /usr/local/NS/,
    and cd into it.

    (2) You will find there several subdirectories plus the executable file 
    install. Type:

./install

    which will start the installation process, lasting a few minutes, with a
    report printed to screen.  In my case, the report ended with the following
    informative lines:

        tkcompat.o tkUnixInit.o xwd.o netview.o netmodel.o edge.o packet.o node.o main.o trace.o queue.o drop.o animation.o agent.o feature.o route.o transform.o paint.o state.o monitor.o anetmodel.o random.o rng.o view.o graphview.o netgraph.o lan.o gen/version.o gen/nam_tcl.o  -L../TclCL -ltclcl -L../otcl -lotcl -L../tkbox/lib -ltk8.0 -L../tclbox/lib -ltcl8.0 -L/usr/X11R6/lib -lXext -lX11 -lnsl -lm 
../tclbox/lib/libtcl8.0.a(tclLoadDl.o): In function `TclLoadFile':
tclLoadDl.o(.text+0x19): undefined reference to `dlopen'
tclLoadDl.o(.text+0x29): undefined reference to `dlerror'
tclLoadDl.o(.text+0x4f): undefined reference to `dlsym'
tclLoadDl.o(.text+0x89): undefined reference to `dlsym'
tclLoadDl.o(.text+0xa3): undefined reference to `dlsym'
tclLoadDl.o(.text+0xdf): undefined reference to `dlsym'
collect2: ld returned 1 exit status
make: *** [nam] Error 1
Nam make failed! Continue ...
Please compiling your nam separately!
Please compiling your gt-itm & sgb2ns separately !
Ns-allinone package has been installed successfully !
Here are the installation places:
ns:     /usr/local/NS/ns-allinone-2.1b3/ns-2/ns
otcl:   /usr/local/NS/ns-allinone-2.1b3/otcl
TclCL:  /usr/local/NS/ns-allinone-2.1b3/TclCL
tcl8.0: /usr/local/NS/ns-allinone-2.1b3/tclbox
tk8.0:  /usr/local/NS/ns-allinone-2.1b3/tkbox
xgraph: /usr/local/NS/ns-allinone-2.1b3/xgraph

You can delete /usr/local/NS/ns-allinone-2.1b3/tcl8.0 and /usr/local/NS/
ns-allinone-2.1b3/tk8.0 if 
you want save your disk space
-----------------------------------------------------
Please put /usr/local/NS/ns-allinone-2.1b3/bin into your PATH environment!
Please put /usr/local/NS/ns-allinone-2.1b3/otcl into your LD_LIBRARY_PATH 
environment!

You can run the ns validation suite with
cd ns-2; ./validate


    (3) If you did get the above message, cd into the subdirectory nam-1/ and 
    edit the file Makefile (do NOT run the ./configure executable there! - 
    that Makefile was already created when you run the ./install in the 
    preceding step):

    Starting at line 58 of Makefile, you will find

LIB =  \
	-L../TclCL -ltclcl -L../otcl -lotcl -L../tkbox/lib -ltk8.0 -L../tclbox/lib -ltcl8.0  \
	-L/usr/X11R6/lib -lXext -lX11 \
	 -lnsl -lm \
        
    Simply add here another line with -ldl, exactly as follows:

LIB =  \
	-L../TclCL -ltclcl -L../otcl -lotcl -L../tkbox/lib -ltk8.0 -L../tclbox/lib -ltcl8.0  \
	-L/usr/X11R6/lib -lXext -lX11 \
	 -lnsl -lm \
         -ldl

    Save this & exit the editor.

    (4) While still in the nam-1/ directory, type:

make

    This should complete your installation.


    (Concerning "gt-itm", it is optional, and is meant for the sunOS and
    Solaris, apparently not for Linux...)


    (5) Oh yes, in order to be able to invoke your ns and nam from anywhere,
    first edit the .bash_profile file (both as root and as a user) to have 
    something like
        
PATH=$PATH:/usr/local/NS/ns-allinone-2.1b3/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/NS/ns-allinone-2.1b3/otcl

    then (as root) go into /usr/local/NS/ns-allinone-2.1b3/bin and type
    
ln -sf /usr/local/NS/ns-allinone-2.1b3/nam-1/nam nam


    (6) Finally, you can make all subdirectories of NS and files therein 
    readable to all users by typing as root:

chmod go+r -R /usr/local/NS/*


    (7) In my case, typing 

./validate

    while in /usr/local/NS/ns-allinone-2.1b3/ns-2 as root, produced a 
    lenghty report ending with the summary:

All test outputs agree with reference outputs
validate overall report: some tests failed:
     ./test-all-tcpVariants

    This hasn't troubled me yet...

*******************************************************************************