PyBindGen version not correct and newer version could not be retrieved

2,251 views
Skip to first unread message

Pavel Boyko

unread,
Feb 26, 2010, 7:14:53 AM2/26/10
to ns-3-...@googlegroups.com
Hi,

I'm feeling myself stupid trying to enable Python bindings in the ns-3-dev.

Initial state:
ns-3-dev$ ./waf configure
[...]
Checking for Python module pybindgen : not found
pybindgen missing => no python bindings
[...]

I know (theoretically) that python bindings are generated by hand
made tool pybindgen. So, I go to its website
http://code.google.com/p/pybindgen/ and push download button. Unpack
it, see good old waf, ./waf configure; sudo ./waf install; everything
looks ok. Now I have:
ns-3-dev$ ./waf configure
[...]
Checking for pybindgen version : not found
pybindgen (found 0.14.0), (need 0.13.0.745)
[...]

Oops, it looks that I have downloaded too fresh pybindgen. Ok,
uninstall it (sudo ./waf uninstall) and take a closer look at
downloads section at http://code.google.com/p/pybindgen/downloads/list
. pybindgen-0.13.0.zip looks reasonable choice. Download, unpack,
./waf; sudo ./waf install. Now I have:
ns-3-dev$ ./waf configure
[...]
Checking for pybindgen version : not found
pybindgen (found 0.13.0), (need 0.13.0.745)
[...]

Wow, this one is too old!

My question is: how to install (and maintain) just right version of
pybindgen for ns-3-dev?

Regards,
Pavel

Gustavo Carneiro

unread,
Feb 26, 2010, 7:17:24 AM2/26/10
to ns-3-...@googlegroups.com
1. Clone the 'ns-3-allinone' repository;
2. Run the 'download.py' script.


 Regards,
 Pavel

--
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.




--
Gustavo J. A. M. Carneiro
INESC Porto, UTM, WiN, http://win.inescporto.pt/gjc
"The universe is always one step beyond logic." -- Frank Herbert

Arnau Sanchez

unread,
Feb 26, 2010, 7:27:33 AM2/26/10
to ns-3-...@googlegroups.com
On 26/02/10 13:14, Pavel Boyko wrote:

> ns-3-dev$ ./waf configure
> [...]
> Checking for pybindgen version : not found
> pybindgen (found 0.13.0), (need 0.13.0.745)
> [...]

I'd follow Gustavo's advice and simply run download.py. But if you still want to
do it by hand, try:

1) update pybindgen to asked revision (though 0.13.0 probably works):

$ bzr pull -rrevno:745 -d ../pybindgen https://launchpad.net/pybindgen

2) edit ../pybindgen/pybindgen/version.py and write:

__version__ = (0, 13, 0, 745)

Pavel Boyko

unread,
Feb 26, 2010, 9:27:39 AM2/26/10
to ns-3-...@googlegroups.com
Hi, Gustavo,

> 1. Clone the 'ns-3-allinone' repository;
> 2. Run the 'download.py' script.

Thank you for quick reply. This recipe indeed helps to download an
exact pybindgen version, but now I have next problem trying to build
ns-3-pyviz-dev -- it wants another revision:

Checking for pybindgen version : not found

pybindgen (found 0.13.0.745), (need 0.13.0.736)

Should I now install both?

Pavel

Pavel Boyko

unread,
Feb 26, 2010, 9:29:32 AM2/26/10
to ns-3-...@googlegroups.com
Hi, Arnau,

Thank you for reply. Unfortunately I have a problem trying to use it:

ns-3-allinone/pybindgen$ bzr pull -rrevno:736 -d ../pybindgen
https://launchpad.net/pybindgen
No revisions to pull.

Regards,
Pavel

Gustavo Carneiro

unread,
Feb 26, 2010, 9:33:19 AM2/26/10
to ns-3-...@googlegroups.com
On Fri, Feb 26, 2010 at 2:27 PM, Pavel Boyko <pavel...@gmail.com> wrote:
 Hi, Gustavo,

> 1. Clone the 'ns-3-allinone' repository;
> 2. Run the 'download.py' script.

 Thank you for quick reply. This recipe indeed helps to download an
exact pybindgen version, but now I have next problem trying to build
ns-3-pyviz-dev -- it wants another revision:

Go to bindings/python/wscript and change the required version to 745 ;-)
 

Checking for pybindgen version                          : not found
pybindgen (found 0.13.0.745), (need 0.13.0.736)

 Should I now install both?

 Pavel

--
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.

Lalith Suresh

unread,
Feb 26, 2010, 9:33:06 AM2/26/10
to ns-3-...@googlegroups.com
Hi Pavel,


After pulling the right pybindgen version, if you have multiple versions of pybindgen, you can use:

$: ./waf --with-pybindgen=<path-to-your-preferred-pybindgen-tree>

... to build correctly.
 

 Should I now install both?

 Pavel

--
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.




--
Thanks and regards,
Lalith Suresh
Department of Computer Engineering
Malaviya National Institute of Technology, Jaipur
+91-9982190365 , www.lalith.in

Pavel Boyko

unread,
Feb 26, 2010, 9:47:51 AM2/26/10
to ns-3-...@googlegroups.com
> Go to bindings/python/wscript and change the required version to 745 ;-)

Ok.

Pavel Boyko

unread,
Feb 26, 2010, 10:03:32 AM2/26/10
to ns-3-...@googlegroups.com
Hi, Gustavo,

it happens that now after all manipulations with pybindgen revision
I can build ns-3-pyviz-dev with 54 of 54 tests passed. But when I try
to run wiki example it fails:

ns-3-pyviz-dev$ ./waf --pyrun examples/flowmon/wifi-olsr-flowmon.py
Waf: Entering directory `/home/pavlo/wk/ns-3-pyviz-dev/build'
Waf: Leaving directory `/home/pavlo/wk/ns-3-pyviz-dev/build'
'build' finished successfully (0.708s)
Traceback (most recent call last):
File "examples/flowmon/wifi-olsr-flowmon.py", line 20, in <module>
import ns3
File "/home/pavlo/wk/ns-3-pyviz-dev/build/debug/bindings/python/ns3/__init__.py",
line 2, in <module>
from _ns3 import *
ImportError: /home/pavlo/wk/ns-3-pyviz-dev/build/debug/bindings/python/ns3/_ns3.so:
undefined symbol:
_ZNK3ns39PbbPacket18SerializePacketTlvERNS_6Buffer8IteratorE
Command ['/usr/bin/python', 'examples/flowmon/wifi-olsr-flowmon.py']
exited with code 1

Filtered undefined symbol name is :

$ c++filt _ZNK3ns39PbbPacket18SerializePacketTlvERNS_6Buffer8IteratorE
ns3::PbbPacket::SerializePacketTlv(ns3::Buffer::Iterator&) const

Does this mean that I forgot to do something?

Regards,
Pavel

Gustavo Carneiro

unread,
Feb 26, 2010, 10:26:15 AM2/26/10
to ns-3-...@googlegroups.com
It could happen that ns3::PbbPacket::SerializePacketTlv is declared in a header file but not actually implemented.

Anyway, the simplest solution is just to grep for that definition in bindings/python/apidefs and remove it.
 

 Regards,

 Pavel

--
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.

Gustavo Carneiro

unread,
Feb 26, 2010, 10:51:38 AM2/26/10
to ns-3-...@googlegroups.com


On Fri, Feb 26, 2010 at 3:43 PM, Pavel Boyko <pavel...@gmail.com> wrote:
 Gustavo,

 I'm sorry for annoying you, but here is the next problem with starting pyviz:


> Anyway, the simplest solution is just to grep for that definition in
> bindings/python/apidefs and remove it.

 This helps and now wiki example works, but without visualization
with message: "No visualization support (No module named
gnomedesktop)."  After I install pyhon-gnomedesktop it fails with "No
visualization support (could not import gnomevfs)" and I can't find
proper python module this time.

install the package: python-gnome2
 
Does pyviz really depend on gnome?

Well, pyviz uses the module gnomedesktop just for convenience, to load some standard gnome icons to put in the toolbar.  It appears that gnomedesktop internally uses gnomevfs, which explains the error.

  I suppose I would be possible to get away with not using gnomedesktop or gnomevfs, but it  does not bother me and I like to code faster, so I use all the libraries that I can get my hands on ;-)
 
Can
I use it at all running KDE?

Yes, these are just libraries, you can run it in KDE, I'm pretty sure.
 

 Regards,
 Pavel

--
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.

Pavel Boyko

unread,
Feb 26, 2010, 11:22:41 AM2/26/10
to ns-3-...@googlegroups.com
Gustavo,

After installing python-gnome2 and python-rsvg it finally works!
Gustavo, please update "sudo apt-get install ..." line on wiki.

Thank you,
Pavel

p.s. MAC addresses on the attached screenshot are printed as Address,
that's why 05-06- prefixes.

pyviz.png

Pavel Boyko

unread,
Feb 26, 2010, 10:43:12 AM2/26/10
to ns-3-...@googlegroups.com
Gustavo,

I'm sorry for annoying you, but here is the next problem with starting pyviz:

> Anyway, the simplest solution is just to grep for that definition in
> bindings/python/apidefs and remove it.

This helps and now wiki example works, but without visualization


with message: "No visualization support (No module named
gnomedesktop)." After I install pyhon-gnomedesktop it fails with "No
visualization support (could not import gnomevfs)" and I can't find

proper python module this time. Does pyviz really depend on gnome? Can


I use it at all running KDE?

Regards,
Pavel

Reply all
Reply to author
Forward
0 new messages