Ida Pro Linux: IdaPython with MySQLdb support

Ida Pro Linux

Here i am again. I succesfully compiled IdaPython 0.8.0 for Ida Pro 5.0 . I used 4.9 sdk version (yes, finally Ida SDK is compatible between versions, thanks Ilfak), but when i tried to use MySQLdb module (import MySQLdb) in a script inside Ida, i got the following error:

ImportError: /usr/lib/python2.4/site-packages/ undefined symbol: _Py_NoneStruct

But this error only happen with IdaPython plugin. If a try to import MySQLdb with the Python shell, it get no error. After a long time, i found that i had to add site-packages directory (where was installed) to IdaPython makefile:

PYTHONEXT=/usr/lib/python2.4/lib-dynload/* /usr/lib/python2.4/site-packages/*.so

Now i can import MySQLdb inside Ida Pro

Leave a reply

You must be logged in to post a comment.