NS-3-DEV Pyviz problem "--vis"

741 views
Skip to first unread message

akin soysal

unread,
May 10, 2017, 4:07:59 AM5/10/17
to ns-3-users
Hello,

I downloaded the latest dev branch by ./download.py, then I built with build.py and I am having this problem when trying to run "--vis":

$ ./waf --run "scratch/1ap1x1sta1x1" --vis
Waf: Entering directory `/home/akinsoysal/ns-3-dev/ns-3-allinone/ns-3-dev/build'
Waf: Leaving directory `/home/akinsoysal/ns-3-dev/ns-3-allinone/ns-3-dev/build'
Build commands will be stored in build/compile_commands.json
'build' finished successfully (2.429s)
simulation started
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/akinsoysal/ns-3-dev/ns-3-allinone/ns-3-dev/src/visualizer/visualizer/__init__.py", line 2, in <module>
    from core import start, register_plugin, set_bounds, add_initialization_hook
  File "/home/akinsoysal/ns-3-dev/ns-3-allinone/ns-3-dev/src/visualizer/visualizer/core.py", line 57, in <module>
    import ipython_view
  File "/home/akinsoysal/ns-3-dev/ns-3-allinone/ns-3-dev/src/visualizer/visualizer/ipython_view.py", line 87
    """
      ^
IndentationError: expected an indented block

from ./waf configure I Pyviz visualiser is enabled though:

# Build NS-3
Entering directory `./ns-3-dev'
 =>  /usr/bin/python waf configure --with-pybindgen ../pybindgen
Setting top to                           : /home/akinsoysal/ns-3-dev/ns-3-allinone/ns-3-dev
Setting out to                           : /home/akinsoysal/ns-3-dev/ns-3-allinone/ns-3-dev/build
Checking for 'gcc' (C compiler)          : /usr/bin/gcc
Checking for cc version                  : 5.4.0
Checking for 'g++' (C++ compiler)        : /usr/bin/g++
Checking for compilation flag -Wl,--soname=foo support : ok
Checking for program 'python'                          : /usr/bin/python
Checking for python version                            : (2, 7, 12, 'final', 0)
python-config                                          : /usr/bin/python-config
Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes
Testing pyembed configuration                                      : yes
Asking python-config for pyext '--cflags --libs --ldflags' flags   : yes
Testing pyext configuration                                        : yes
Checking for compilation flag -fvisibility=hidden support          : ok
Checking for compilation flag -Wno-array-bounds support            : ok
Checking for pybindgen location                                    : ../pybindgen (given)
Checking for python module 'pybindgen'                             : 0.17.0.post58+gcf00cc0
Checking for pybindgen version                                     : 0.17.0.post58+gcf00cc0
Checking for code snippet                                          : yes
Checking for types uint64_t and unsigned long equivalence          : no
Checking for code snippet                                          : no
Checking for types uint64_t and unsigned long long equivalence     : yes
Checking for the apidefs that can be used for Python bindings      : gcc-LP64
Checking for internal GCC cxxabi                                   : complete
Checking for python module 'pygccxml'                              : not found
Checking boost includes                                            : 1_58
Checking boost libs                                                : ok
Checking for boost linkage                                         : ok
Checking for click location                                        : not found
Checking for program 'pkg-config'                                  : /usr/bin/pkg-config
Checking for 'gtk+-2.0' >= 2.12                                    : yes
Checking for 'libxml-2.0' >= 2.7                                   : yes
Checking for type uint128_t                                        : not found
Checking for type __uint128_t                                      : yes
Checking high precision implementation                             : 128-bit integer (default)
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 sys/ioctl.h                                    : yes
Checking for header net/if.h                                       : yes
Checking for header net/ethernet.h                                 : yes
Checking for header linux/if_tun.h                                 : yes
Checking for header netpacket/packet.h                             : yes
Checking for NSC location                                          : not found
Checking for OpenFlow location                                     : not found
Checking for 'sqlite3'                                             : not found
Checking for header linux/if_tun.h                                 : yes
Checking for python module 'gtk'                                   : ok
Checking for python module 'goocanvas'                             : 0.14.1
Checking for python module 'pygraphviz'                            : 1.3.1
Checking boost includes                                            : 1_58
Checking for program 'sudo'                                        : /usr/bin/sudo
Checking for program 'valgrind'                                    : /usr/bin/valgrind
Checking for 'gsl'                                                 : not found
python-config                                                      : not found
Checking for compilation flag -Wno-error=deprecated-d... support   : ok
Checking for compilation flag -Wno-error=deprecated-d... support   : ok
Checking for compilation flag -fstrict-aliasing support            : ok
Checking for compilation flag -fstrict-aliasing support            : ok
Checking for compilation flag -Wstrict-aliasing support            : ok
Checking for compilation flag -Wstrict-aliasing support            : ok
Checking for program 'doxygen'                                     : /usr/bin/doxygen
---- Summary of optional NS-3 features:
Build profile                 : debug
Build directory               :
BRITE Integration             : not enabled (BRITE not enabled (see option --with-brite))
DES Metrics event collection  : not enabled (defaults to disabled)
Emulation FdNetDevice         : enabled
Examples                      : not enabled (defaults to disabled)
File descriptor NetDevice     : enabled
GNU Scientific Library (GSL)  : not enabled (GSL not found)
Gcrypt library                : not enabled (libgcrypt not found: you can use libgcrypt-config to find its location.)
GtkConfigStore                : enabled
MPI Support                   : not enabled (option --enable-mpi not selected)
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))
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
PlanetLab FdNetDevice         : not enabled (PlanetLab operating system not detected (see option --force-planetlab))
PyViz visualizer              : enabled
Python API Scanning Support   : not enabled (Missing 'pygccxml' Python module)
Python Bindings               : enabled
Real Time Simulator           : enabled
SQlite stats data output      : not enabled (library 'sqlite3' not found)
Tap Bridge                    : enabled
Tap FdNetDevice               : enabled
Tests                         : not enabled (defaults to disabled)
Threading Primitives          : enabled
Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
XmlIo                         : enabled


Thanks,
Akın

Tom Henderson

unread,
May 10, 2017, 10:08:17 AM5/10/17
to ns-3-...@googlegroups.com
There were indentation problems introduced in a recent changeset. I
have fixed them just now; please pull the updated ns-3-dev and try again.

- Tom

akin soysal

unread,
May 11, 2017, 2:19:43 AM5/11/17
to ns-3-users
Works now. Thanks Tom!

Akın

Zahra Hosseini

unread,
Jun 27, 2017, 10:41:26 AM6/27/17
to ns-3-users
Hi. I have exactly the same problem and veryyyy new to ns3. where can i find these fixes?

Konstantinos

unread,
Jun 27, 2017, 11:02:14 AM6/27/17
to ns-3-users
Hi Zahra,

As Akin mentioned, the problem has been solved in the ns-3-dev repository.
Try using that.

Regards,
K

Zahra Hosseini

unread,
Jun 27, 2017, 11:09:51 AM6/27/17
to ns-3-users
how should I have the fixed repository? download again?
may u please tell me in detail?

Konstantinos

unread,
Jun 27, 2017, 11:27:06 AM6/27/17
to ns-3-users
If you are using the ns-3-dev, you can upgrade your repository using the mercurial commands (hg -pull).
Message has been deleted
Message has been deleted

Zahra Hosseini

unread,
Jun 27, 2017, 11:45:51 AM6/27/17
to ns-3-users
Thank you. I did this:
hg update

but after this when i ./waf error occurs:

Waf: Entering directory `/home/zara/repos/ns-3-allinone/ns-3-dev/build'
[ 981/1978] Compiling build/src/wifi/bindings/ns3module.cc
In file included from ./ns3/callback.h:24:0,
                 from ./ns3/traced-callback.h:25,
                 from ./ns3/traced-value.h:23,
                 from ./ns3/aarf-wifi-manager.h:24,
                 from ./ns3/wifi-module.h:10,
                 from src/wifi/bindings/ns3module.h:78,
                 from src/wifi/bindings/ns3module.cc:1:
./ns3/ptr.h: In instantiation of ‘ns3::Ptr<T>::~Ptr() [with T = ns3::RandomStream]’:
./ns3/dca-txop.h:58:7:   required from here
./ns3/ptr.h:756:7: error: invalid use of incomplete type ‘class ns3::RandomStream’
       m_ptr->Unref ();
       ^
..............
[a lot more]
........
Waf: Leaving directory `/home/zara/repos/ns-3-allinone/ns-3-dev/build'
Build failed
 -> task in 'ns3module_wifi' failed (exit status 1): 
[a lot more]
........

 was I wrong?

Konstantinos

unread,
Jun 27, 2017, 11:51:08 AM6/27/17
to ns-3-users
Did you do pull or push? They are different commands

Zahra Hosseini

unread,
Jun 27, 2017, 11:56:17 AM6/27/17
to ns-3-users
I used "pull" in my system, but In previous comment, I mistakenly wrote push. sorry.
Reply all
Reply to author
Forward
0 new messages