The Waf build system is used to build ns-3. Waf is a Python-based
build system (http://www.freehackers.org/~tnagy/waf.html)
Note: We've added a wiki page with more complete build instructions
than the quick ones you find below:
http://www.nsnam.org/wiki/Installation
=== Installing Waf ===
The top-level ns-3 directory should contain a current waf script, so
there is no need to have WAF installed in the system. We are using
some extensions to WAF, which can be found in the 'waf-tools'
directory. The upstream location for these WAF extensions is:
https://code.launchpad.net/~gjc/waf/cmd
=== Building with Waf ===
To build ns-3 with waf type the commands from the top-level directory:
1. ./waf configure [options]
2. ./waf
To see valid configure options, type ./waf --help. The most important
option is -d <debug level>. Valid debug levels (which are listed in
waf --help) are: "debug" or "optimized", with debug being default. It is
also possible to change the flags used for compilation with (e.g.):
CXXFLAGS="-O3" ./waf configure. By default, ns-3 is built as debug code,
with examples and tests disabled, and with python bindings enabled.
[ Note: Unlike some other build tools, to change the build target,
the option must be supplied during the configure stage rather than
the build stage (i.e., "./waf -d optimized" will not work; instead, do
"./waf -d optimized configure; ./waf" ]
The resulting executables and libraries are placed in build/.
Other waf usages include:
---------------------------------------------------------------------
OpenSBC
วันศุกร์ที่ 28 กุมภาพันธ์ พ.ศ. 2557
วันเสาร์ที่ 16 พฤศจิกายน พ.ศ. 2556
Install lte : ns2 simulator
Ubuntu 10.04.3 :
sudo apt-get install g++-4.1
------------------------------------------------------------------
tar -xzvf ns-allinone-2.33.tar.gz
------------------------------------------------------------------
cd ns-allinone-2.33/tk8.4.18/
wget ftp://ftp.swin.edu.au/gentoo-portage/dev-lang/tk/files/tk-8.4-lastevent.patch
------------------------------------------------------------------
The program 'patch' is currently not installed. You can install it by typing:
sudo apt-get install patch
------------------------------------------------------------------
&& patch -p0 < tk-8.4-lastevent.patch
&& cd ../ && export CC=gcc-4.1 CXX=g++-4.1
######################################
sudo apt-get install autoconf automake libxmu-dev
######################################
&& ./install
########################################
sudo gedit ~/.bashrc
------------------------------------------------------------------
Add these lines to your bashrc file. Replace “your directory” with the installation directory of your ns2 program.
############# NS2 ##########################################
#environment values for NS2/NAM
# LD_LIBRARY_PATH
OTCL_LIB=/home/ns2/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/ns2/ns-allinone-2.33/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/ns2/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/ns2/ns-allinone-2.33/bin:/home/ns2/ns-allinone-2.33/tcl8.4.18/unix:/home/ns2/ns-allinone-2.33/tk8.4.18/unix
NS=/home/ns2/ns-allinone-2.33/ns-2.33/
NAM=/home/ns2/ns-allinone-2.33/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM
#########################################################
------------------------------------------------------
source ~/.bashrc
########################################
&& cd ns-2.33/ && mv ns ns233
&& make clean
&& mv Makefile Makefile.org
---------------------------------------------------------------------------------
sudo apt-get install subversion
--------------------------------------------------------------------------------
&& svn checkout http://lte-model.googlecode.com/svn/trunk/ lte-model-read-only && mkdir project && cd lte-model-read-only/
&& sh checkin
&& cd ../project/
&& ln -s ../lte-model-read-only/*.h .
-------------------------------------------------------------------------
.... Where the period ( . ) means the current directory.
-------------------------------------------------------------------------
&& ln -s ../lte-model-read-only/dlqueue.cc && cd ../
Edit the new Makefile in ns-allinone-2.33/ns-2.33/ , lines 41, 67, 82 to actual location. ( I.e all : /root/ns-allinone.... to : <your-path>/ns-allinone.... ).( 8 times edit.) ... And lines 36 - 37 to : CC = gcc-4.1 CPP = g++-4.1
... And now you can run make in ns-allinone-2.33/ns-2.33/
, and hopfully get a workable 'ns' ( ns works OK here.) ( Better make a backup : cp ns ns-LTE ). .
-------------------------------------------------------------------------
After that, use this command to list installed gcc in your Ubuntu:
ls /usr/bin/gcc*
and use this command to check which is default:
gcc -v
-------------------------------------------------------------------------
sudo gedit /etc/apt/sources.list
deb http://mirrors.us.kernel.org/ubuntu/ lucid main universe
sudo apt-get update
-------------------------------------------------------------------------
sudo apt-get install openssh-server
sudo apt-get install g++-4.1
------------------------------------------------------------------
tar -xzvf ns-allinone-2.33.tar.gz
------------------------------------------------------------------
cd ns-allinone-2.33/tk8.4.18/
wget ftp://ftp.swin.edu.au/gentoo-portage/dev-lang/tk/files/tk-8.4-lastevent.patch
------------------------------------------------------------------
The program 'patch' is currently not installed. You can install it by typing:
sudo apt-get install patch
------------------------------------------------------------------
&& patch -p0 < tk-8.4-lastevent.patch
&& cd ../ && export CC=gcc-4.1 CXX=g++-4.1
######################################
sudo apt-get install autoconf automake libxmu-dev
######################################
&& ./install
########################################
sudo gedit ~/.bashrc
------------------------------------------------------------------
Add these lines to your bashrc file. Replace “your directory” with the installation directory of your ns2 program.
############# NS2 ##########################################
#environment values for NS2/NAM
# LD_LIBRARY_PATH
OTCL_LIB=/home/ns2/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/ns2/ns-allinone-2.33/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=/home/ns2/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/ns2/ns-allinone-2.33/bin:/home/ns2/ns-allinone-2.33/tcl8.4.18/unix:/home/ns2/ns-allinone-2.33/tk8.4.18/unix
NS=/home/ns2/ns-allinone-2.33/ns-2.33/
NAM=/home/ns2/ns-allinone-2.33/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM
#########################################################
------------------------------------------------------
source ~/.bashrc
########################################
&& cd ns-2.33/ && mv ns ns233
&& make clean
&& mv Makefile Makefile.org
---------------------------------------------------------------------------------
sudo apt-get install subversion
--------------------------------------------------------------------------------
&& svn checkout http://lte-model.googlecode.com/svn/trunk/ lte-model-read-only && mkdir project && cd lte-model-read-only/
&& sh checkin
&& cd ../project/
&& ln -s ../lte-model-read-only/*.h .
-------------------------------------------------------------------------
.... Where the period ( . ) means the current directory.
-------------------------------------------------------------------------
&& ln -s ../lte-model-read-only/dlqueue.cc && cd ../
Edit the new Makefile in ns-allinone-2.33/ns-2.33/ , lines 41, 67, 82 to actual location. ( I.e all : /root/ns-allinone.... to : <your-path>/ns-allinone.... ).( 8 times edit.) ... And lines 36 - 37 to : CC = gcc-4.1 CPP = g++-4.1
... And now you can run make in ns-allinone-2.33/ns-2.33/
, and hopfully get a workable 'ns' ( ns works OK here.) ( Better make a backup : cp ns ns-LTE ). .
-------------------------------------------------------------------------
After that, use this command to list installed gcc in your Ubuntu:
ls /usr/bin/gcc*
and use this command to check which is default:
gcc -v
-------------------------------------------------------------------------
sudo gedit /etc/apt/sources.list
deb http://mirrors.us.kernel.org/ubuntu/ lucid main universe
sudo apt-get update
-------------------------------------------------------------------------
sudo apt-get install openssh-server
วันศุกร์ที่ 15 พฤศจิกายน พ.ศ. 2556
ASCII codes table - Format of standard characters
|
|
|
| ||||||||||||||||||||||||||||||||||||
|
|
|
|
INFO: http://ascii.cl/
สมัครสมาชิก:
บทความ (Atom)