Undefined symbol error when importing pyinotify

Bug #85705 reported by Chris Halse Rogers
6
Affects Status Importance Assigned to Milestone
pyinotify (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Running the AMD64 version of Feisty, importing pyinotify results in the following error:

chris@Burninator:~/Packaging/Misc/apt-zeroconf-0.2.1$ python
Python 2.5 (release25-maint, Feb 16 2007, 18:45:30)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyinotify
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/var/lib/python-support/python2.5/pyinotify/pyinotify.py", line 38, in <module>
    from inotify import inotify_init, inotify_add_watch, inotify_rm_watch
  File "/var/lib/python-support/python2.5/pyinotify/inotify.py", line 49, in <module>
    from _inotify import inotify_init, inotify_add_watch, inotify_rm_watch
ImportError: /var/lib/python-support/python2.5/pyinotify/_inotify.so: undefined symbol: Py_InitModule4
>>>

Revision history for this message
Chris Halse Rogers (raof) wrote :

It turns out that setup.py doesn't segregate the _inotify.so library based upon which version of python it's built against. This debdiff fixes it, by rebuilding the module against the right version of python before installing it.

Revision history for this message
Steve Kowalik (stevenk) wrote :

Your debdiff looks great, applies fine. A test build and install was fine for both python2.4 and python2.5, so I've uploaded it.

In future please subscribe ubuntu-universe-sponsors, so that someone can look at it quicker as opposed to me stumbling over it. :-)

Steve Kowalik (stevenk)
Changed in pyinotify:
status: Unconfirmed → Fix Committed
Revision history for this message
Steve Kowalik (stevenk) wrote :

And has hit Feisty, so closing this bug.

Changed in pyinotify:
status: Fix Committed → Fix Released
Revision history for this message
Jisakiel (jisakiel) wrote :

I'm still hitting this bug both under Gutsy and Hardy versions of the package when importing with python-dbg (2.5) on Amd64. In particular, with the hardy version:

>>> import pyinotify
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/var/lib/python-support/python2.5/pyinotify/pyinotify.py", line 47, in <module>
    from inotify import inotify_init, inotify_add_watch, inotify_rm_watch
  File "/var/lib/python-support/python2.5/pyinotify/inotify.py", line 48, in <module>
    from _inotify import inotify_init, inotify_add_watch, inotify_rm_watch
ImportError: /var/lib/python-support/python2.5/pyinotify/_inotify.so: undefined symbol: Py_InitModule4_64
[102128 refs]

Which is kinda logical, as that library is not linked to anything python-related:

ldd /var/lib/python-support/python2.5/pyinotify/_inotify.so
        linux-vdso.so.1 => (0x00007fffda9fe000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00002b81d03fa000)
        libc.so.6 => /lib/libc.so.6 (0x00002b81d0616000)
        /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)

¿¿Perhaps a python-pyinotify-dbg version is missing?? I've hit quite a roadblock here, as I'm using the module for a university project - which I cannot debug -from pydev- because of this.

apt-cache policy python-pyinotify
python-pyinotify:
  Instalados: 0.7.1-1
  Candidato: 0.7.1-1
  Tabla de versión:
 *** 0.7.1-1 0
        150 http://ftp.crihan.fr hardy/universe Packages
        100 /var/lib/dpkg/status

Revision history for this message
Jisakiel (jisakiel) wrote :

Bug reopened, I'm hitting exactly the same problem, though when doing it from python-dbg

Changed in pyinotify:
status: Fix Released → New
Revision history for this message
Jisakiel (jisakiel) wrote :

Ok, sorry, problem is that it lacks a -dbg version. Leaving bug as it was, and opening a new one as a request.

Changed in pyinotify:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.