How can I build only single script using waf?

448 views
Skip to first unread message

Валентин Юрьевич

unread,
Nov 27, 2011, 2:29:07 PM11/27/11
to ns-3-users
Hi there, I have some question: how can I build only one script?
According to the ns-3-tutorial I use command ./waf and program start
building scripts from ~500 to ~1600, it takes over 40 minutes to build
only one script!((. What is to be done? May be it's normall?!
Thanks!

This is some part of tutorial:

4.2.9 Building Your Script
We have made it trivial to build your simple scripts. All you have to
do is to drop your script into the scratch directory
and it will automatically be built if you run Waf. Let’s try it. Copy
examples/tutorial/first.cc into the
scratch directory after changing back into the top level directory.
cd ../..
cp examples/tutorial/first.cc scratch/myfirst.cc

Now build your first example script using waf:

./waf

You should see messages reporting that your myfirst example was built
successfully.

Waf: Entering directory ‘/home/craigdo/repos/ns-3-allinone/ns-3-dev/
build’
[614/708] cxx: scratch/myfirst.cc -> build/debug/scratch/myfirst_3.o
[706/708] cxx_link: build/debug/scratch/myfirst_3.o -> build/debug/
scratch/myfirst
Waf: Leaving directory ‘/home/craigdo/repos/ns-3-allinone/ns-3-dev/
build’
’build’ finished successfully (2.357s)

You can now run the example (note that if you build your program in
the scratch directory you must run it out of the
scratch directory):

./waf --run scratch/myfirst

Ritwik Ghosh

unread,
Nov 27, 2011, 3:00:08 PM11/27/11
to ns-3-...@googlegroups.com
Hi Валентин Юрьевич,

I had the same problem! Its seems that the waf utility has problems. The solution would be to use ns-3.11 ... 


--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.




--
RitWikG

Валентин Юрьевич

unread,
Nov 30, 2011, 11:43:37 AM11/30/11
to ns-3-users
Thanks, but I have some problem during building 3.11((
What OS and pre-installation packages do you use?
I use Ubuntu 11.04 and python, g++ packages...

On 28 ноя, 00:00, Ritwik Ghosh <ritwikghosh...@gmail.com> wrote:
> Hi Валентин Юрьевич,
>
> I had the same problem! Its seems that the waf utility has problems. The
> solution would be to use ns-3.11 ...
>
> On Mon, Nov 28, 2011 at 12:59 AM, Валентин Юрьевич

> <spbvalent...@gmail.com>wrote:

Ritwik Ghosh

unread,
Dec 1, 2011, 1:29:00 PM12/1/11
to ns-3-...@googlegroups.com
Hi Валентин Юрьевич,

you will have to tell me what exact problem you are having. have you done "sudo apt-get install python-dev" ?

Zhongqiu Lee

unread,
Dec 29, 2011, 6:35:58 AM12/29/11
to ns-3-users
I had the same problem!
i used the debian sysytem ,and the configure of ns-3 as follow

./waf -d optimized --enable-examples --enable-tests configure
Checking for program gcc or cc : /usr/bin/gcc
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for gcc : ok
Checking for program g++ or c++ : /usr/bin/g++
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program pkg-config : /usr/bin/pkg-config
Checking for -Wl,--soname=foo support : yes
Checking for type uint128_t : not found
Checking for type __uint128_t : not found
Checking for high precision time implementation : cairo 128-bit
integer
Checking for header stdint.h : yes
Checking for header inttypes.h : yes
Checking for header sys/inttypes.h : not found
Checking for header sys/types.h : yes
Checking for header sys/stat.h : yes
Checking for header dirent.h : yes
Checking for header stdlib.h : yes
Checking for header signal.h : yes
Checking for header pthread.h : yes
Checking for header stdint.h : yes
Checking for header inttypes.h : yes
Checking for header sys/inttypes.h : not found
Checking for library rt : yes
Checking for header netpacket/packet.h : yes
Checking for header linux/if_tun.h : yes
Checking for pkg-config flags for GTK_CONFIG_STORE : ok
Checking for pkg-config flags for LIBXML2 : ok
Checking for NSC location : ok ../nsc-0.5.2
(guessed)
Checking for library dl : yes
Checking for NSC supported architecture i686 : ok
Checking for header sys/socket.h : yes
Checking for header netinet/in.h : yes
Checking for click location : not found
boost headers : Version 1_42 (/
usr/include)
library boost_signals : ok
library boost_filesystem : ok
Checking for OpenFlow location : not found
Checking for library sqlite3 : yes
Checking for program python : /usr/bin/python
Checking for Python version >= 2.3 : ok 2.6.6
Checking for library python2.6 : yes
Checking for program python2.6-config : /usr/bin/
python2.6-config
Checking for header Python.h : yes
Checking for -fvisibility=hidden support : yes
Checking for pybindgen location : ok ../
pybindgen-0.15.0.795 (guessed)
Checking for Python module pybindgen : ok
Checking for pybindgen version : ok 0.15.0.795
Checking for types uint64_t and unsigned long equivalency : no
Checking for types uint64_t and unsigned long long equivalency : yes
Checking for the apidefs that can be used for Python bindings : gcc-
ILP32
Checking for internal GCC cxxabi :
complete
Checking for Python module pygccxml : not
found
Checking for program mpic++ : not
found
Checking for program sudo : /usr/
bin/sudo
Checking for program valgrind : /usr/
bin/valgrind
Checking for pkg-config flags for GSL : ok
Checking for -Wno-error=deprecated-declarations support : yes
Checking for -Wno-error=deprecated-declarations support : yes
Checking for -fstrict-aliasing support : yes
Checking for -fstrict-aliasing support : yes
Checking for -Wstrict-aliasing support : yes
Checking for -Wstrict-aliasing support : yes
Checking for program doxygen : /usr/
bin/doxygen
---- Summary of optional NS-3 features:
Static build : not enabled (option --enable-static
not selected)
Threading Primitives : enabled
Real Time Simulator : enabled
Emulated Net Device : enabled
Tap Bridge : enabled
GtkConfigStore : enabled
XmlIo : enabled
Network Simulation Cradle : enabled
NS-3 Click Integration : not enabled (nsclick not enabled (see
option --with-nsclick))
NS-3 OpenFlow Integration : not enabled (OpenFlow not enabled (see
option --with-openflow))
SQlite stats data output : enabled
Python Bindings : enabled
Python API Scanning Support : not enabled (Missing 'pygccxml' Python
module)
MPI Support : not enabled (option --enable-mpi not
selected)
Use sudo to set suid bit : not enabled (option --enable-sudo not
selected)
Build tests : enabled
Build examples : enabled
GNU Scientific Library (GSL) : enabled
'configure' finished successfully (13.160s)

On Nov 28, 3:29 am, Валентин Юрьевич <spbvalent...@gmail.com> wrote:
> Hi there, I have some question: how can I build only one script?
> According to the ns-3-tutorial I use command ./wafand program start
> building scripts from ~500 to ~1600, it takes over 40 minutes to build
> only one script!((. What is to be done? May be it's normall?!
> Thanks!
>
> This is some part of tutorial:
>
> 4.2.9 Building Your Script
> We have made it trivial to build your simple scripts. All you have to
> do is to drop your script into the scratch directory
> and it will automatically be built if you runWaf. Let’s try it. Copy
> examples/tutorial/first.cc into the
> scratch directory after changing back into the top level directory.
> cd ../..
> cp examples/tutorial/first.cc scratch/myfirst.cc
>
> Now build your first example script usingwaf:
>
> ./waf
>
> You should see messages reporting that your myfirst example was built
> successfully.
>
> Waf: Entering directory ‘/home/craigdo/repos/ns-3-allinone/ns-3-dev/
> build’
> [614/708] cxx: scratch/myfirst.cc -> build/debug/scratch/myfirst_3.o
> [706/708] cxx_link: build/debug/scratch/myfirst_3.o -> build/debug/
> scratch/myfirstWaf: Leaving directory ‘/home/craigdo/repos/ns-3-allinone/ns-3-dev/
Reply all
Reply to author
Forward
0 new messages