Trouble with pybindgen (pybindgen missing => no python bindings)

3,450 views
Skip to first unread message

Henning Reich

unread,
Apr 14, 2014, 12:30:21 PM4/14/14
to ns-3-...@googlegroups.com
Hi,

I have some trouble to build ns-3 with visualizer
I can't eneable it because pybindgen are missing. 

I just follow the turorial (ns-3-tutorial.pdf) and build the first time with 
python2 ./build.py  --enable-examples --enable-tests

Now i switch into the ns-3.19 folder and run:
python2./waf configure

And that says me:
[henning@x201t-arch ns-3.19]$ python2 ./waf configure
Setting top to                           : /home/henning/workspace/ns-allinone-3.19/ns-3.19 
Setting out to                           : /home/henning/workspace/ns-allinone-3.19/ns-3.19/build 
Checking for 'gcc' (c compiler)          : /usr/bin/gcc 
Checking for cc version                  : 4.8.2 
Checking for 'g++' (c++ compiler)        : /usr/bin/g++ 
Checking for compilation flag -Wl,--soname=foo... support : ok 
Checking for program python                               : /usr/bin/python 
python executable '/usr/bin/python' differs from system '/usr/bin/python2'
Checking for python version                               : (3, 4, 0, 'final', 0) 
Checking for library python3.4 in LIBDIR                  : not found 
Checking for library python3.4 in python_LIBPL            : not found 
Checking for library python3.4 in $prefix/libs            : not found 
Checking for library python3.4m in LIBDIR                 : yes 
Checking for program /usr/bin/python-config,python3.4-config,python-config-3.4,python3.4m-config : /usr/bin/python-config 
Checking for header Python.h                                                                     : yes 
Checking for compilation flag -fvisibility=hidden... support                                     : ok 
Checking for compilation flag -Wno-array-bounds... support                                       : ok 
Checking for pybindgen location                                                                  : ../pybindgen-0.16.0.834 (guessed) 
Python module pybindgen                                                                          : not found 
pybindgen missing => no python bindings
Checking boost includes                                                                          : not found 
Checking boost includes                                                                          : not found 
Checking for click location                                                                      : not found 
Checking for program pkg-config                                                                  : /usr/bin/pkg-config 
[...]
Checking for type uint128_t                                                                      : not found 
Checking for type __uint128_t                                                                    : yes 
[...]
Checking for header sys/inttypes.h                                                               : not found 
[...] 
Checking for header sys/inttypes.h                                                               : not found 
[...]
Checking for NSC location                                                                        : not found 
[...]
Checking for program sudo                                                                        : /usr/bin/sudo 
Checking for program valgrind                                                                    : not found 
[...]
Checking for program doxygen                                                                     : not found 
---- Summary of optional NS-3 features:
Python Bindings               : not enabled (PyBindGen missing)
BRITE Integration             : not enabled (BRITE not enabled (see option --with-brite))
NS-3 Click Integration        : not enabled (nsclick not enabled (see option --with-nsclick))
GtkConfigStore                : enabled
XmlIo                         : enabled
Threading Primitives          : enabled
Real Time Simulator           : enabled
Emulated Net Device           : enabled
File descriptor NetDevice     : enabled
Tap FdNetDevice               : enabled
Emulation FdNetDevice         : enabled
PlanetLab FdNetDevice         : not enabled (PlanetLab operating system not detected (see option --force-planetlab))
Network Simulation Cradle     : not enabled (NSC not found (see option --with-nsc))
MPI Support                   : not enabled (option --enable-mpi not selected)
NS-3 OpenFlow Integration     : not enabled (Required boost libraries not found)
SQlite stats data output      : enabled
Tap Bridge                    : enabled
PyViz visualizer              : not enabled (Python Bindings are needed but not enabled)
Use sudo to set suid bit      : not enabled (option --enable-sudo not selected)
Build tests                   : not enabled (defaults to disabled)
Build examples                : not enabled (defaults to disabled)
GNU Scientific Library (GSL)  : enabled
'configure' finished successfully (3.772s)


I installed pybindgen with the system package manager, but maybe in a too recent version (0.17.0-2). 
So I hope, it's for you a simple question.
How can I use the Version, that are included in the "ns-allinone-3.19.tar.bz2" file? And can I ignore the other missing libraries? Or how i will get them? 

Thanks


Tom Henderson

unread,
Apr 14, 2014, 1:29:20 PM4/14/14
to ns-3-...@googlegroups.com
On 04/14/2014 09:30 AM, Henning Reich wrote:
> Hi,
>
> I have some trouble to build ns-3 with visualizer
> I can't eneable it because pybindgen are missing.

Which system are you testing this on? It looks relatively recent
(gcc-4.8.2, python 3). Is python2 available?

It seems like this may be a case of incompatibility with python 3, which
the previous release doesn't support, but which there has been support
added for the forthcoming ns-3.20 release (described below):
http://mailman.isi.edu/pipermail/ns-developers/2014-March/011785.html

- Tom

Henning Reich

unread,
Apr 14, 2014, 2:05:03 PM4/14/14
to ns-3-...@googlegroups.com


Am Montag, 14. April 2014 19:29:20 UTC+2 schrieb Tom Henderson:
Which system are you testing this on?  It looks relatively recent
(gcc-4.8.2, python 3).  Is python2 available?

It's my laptop with Arch Linux. It's both installed, python2.7 and python3.4. 
python is a symlink to python3.4 and python2 a symlink to python2.7. So I use "python2" as a prefix for the python-files and the general build-process works correct. (I think so)

 
added for the forthcoming ns-3.20 release (described below):
http://mailman.isi.edu/pipermail/ns-developers/2014-March/011785.html

- Tom


So, If I download the ns-allinone-dev version, I can use directly python3.4? 

Thanks 

Tom Henderson

unread,
Apr 15, 2014, 9:26:15 AM4/15/14
to ns-3-...@googlegroups.com
On 04/14/2014 11:05 AM, Henning Reich wrote:
>
>
> Am Montag, 14. April 2014 19:29:20 UTC+2 schrieb Tom Henderson:
>
> Which system are you testing this on? It looks relatively recent
> (gcc-4.8.2, python 3). Is python2 available?
>
>
> It's my laptop with Arch Linux. It's both installed, python2.7 and
> python3.4.
> python is a symlink to python3.4 and python2 a symlink to python2.7. So
> I use "python2" as a prefix for the python-files and the general
> build-process works correct. (I think so)


I don't have an Arch or other buildslave that defaults to python3
around, so could you please let me know whether these commands work?

Instead of:
python2 ./build.py --enable-examples --enable-tests

try:
python2 ./build.py --enable-examples --enable-tests --
--with-python=/usr/bin/python2

(the '--' passes additional arguments to waf)

and

Instead of:
python2 ./waf configure

try:
python2 ./waf configure --with-python=/usr/bin/python2


In the next release, the bindings should work without requiring python2,
although generating new ones will require python2.

Thanks,
Tom

Henning Reich

unread,
Apr 15, 2014, 12:23:58 PM4/15/14
to ns-3-...@googlegroups.com


Am Dienstag, 15. April 2014 15:26:15 UTC+2 schrieb Tom Henderson:

I don't have an Arch or other buildslave that defaults to python3
around, so could you please let me know whether these commands work?

Instead of:
python2 ./build.py  --enable-examples --enable-tests

try:
python2 ./build.py  --enable-examples --enable-tests --
--with-python=/usr/bin/python2

(the '--' passes additional arguments to waf)

and

Instead of:
python2 ./waf configure

try:
python2 ./waf configure --with-python=/usr/bin/python2


In the next release, the bindings should work without requiring python2,
although generating new ones will require python2.

Thanks,
Tom

Merci, the complete line that works for me:
python2 ./waf configure --with-python=python2 --with-pybindgen=/[...]/ns-3-allinone/pybindgen/


Reply all
Reply to author
Forward
0 new messages