Thread: mbarcode
View Single Post
Posts: 1 | Thanked: 3 times | Joined on Jan 2011
#715
Thanks for mbarcode! I am writing a small Python plugin to manage my grocery list.

I ran into a problem however. When, in my plugin, I try to import some other python modules I get undefined references errors when the wrapper evals the code. For example, if I import datetime, I get undefined reference for _Py_ZeroStruct.

I did some digging and it seems to be related to this bug:
http://bugs.python.org/issue4434. It has to do with modules that use Python's dynamic loader not listing the dynamic loader as dependency. According to that ticket, it has been "fixed" in later versions of Python.

I used the workaround listed in the ticket in your python wrapper (dlopen of libpython2.5.so.1) and it resolves my issue. You may want to include this in wrapper, at least until the python version on the N900 increases to a new version (if ever).

I've included a patch for your convenience if you want to use it.

Thanks again!
Attached Files
File Type: txt dynloader_patch.txt (654 Bytes, 106 views)
 

The Following 3 Users Say Thank You to carpie For This Useful Post: