[raring] recent versions break python2.7-dbg: undefined symbol: Py_InitModule4_64

Bug #1091615 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pygobject (Ubuntu)
Fix Released
Undecided
Unassigned
python2.7 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

One of the last python2.7 uploads seems to have broken the -dbg variant:

$ python2.7-dbg -c 'import gi'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 27, in <module>
    from ._gi import _API, Repository
ImportError: /usr/lib/python2.7/dist-packages/gi/_gi.so: undefined symbol: Py_InitModule4_64
[54700 refs]

This also happens when rebuilding pygobject. python2.7, python3.3, and python3.3-dbg are all fine.

Related branches

Revision history for this message
Martin Pitt (pitti) wrote :

The symbol seems to be there for the non-debug variant:

$ nm -D /usr/lib/x86_64-linux-gnu/libpython2.7.so |grep Py_InitModule
000000000010cd50 T Py_InitModule4_64

but not for _d:
$ nm -D /usr/lib/x86_64-linux-gnu/libpython2.7_d.so |grep Py_InitModule
000000000018df84 T Py_InitModule4TraceRefs_64

However, that seems to have been the case for quantal as well for that particular library; maybe the symbol was provided by something else in earlier versions?

Revision history for this message
Matthias Klose (doko) wrote :

this is expected. see modsupport.h for the macros defining this symbol.

Changed in python2.7 (Ubuntu):
status: New → Invalid
Revision history for this message
Martin Pitt (pitti) wrote :

OK, so the symbol is expected, but is breaking "import gi" expected as well? What could the "gi" module do wrong that triggers this with the new python2.7?

Revision history for this message
Martin Pitt (pitti) wrote :

Adding a pygobject task then, as something is obviously wrong, but I don't know what.

0 (master) martin@donald:~/upstream/pygobject
$ git grep Py_InitModule
gi/_glib/pyglib-python-compat.h: PyObject *module = Py_InitModule(fullpkgname, functions); \
gi/_glib/pyglib-python-compat.h: module = Py_InitModule(modname, symbol##_functions);

This just uses the usual Py_InitModule (http://docs.python.org/2/c-api/allocation.html), nothing else.

Revision history for this message
Matthias Klose (doko) wrote :

yes, the import fails, when you don't have python-gi-dbg installed.

after installing python-gi-dbg, I get:

$ python2.7-dbg -c 'import gi'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 27, in <module>
    from ._gi import _API, Repository
ImportError: /usr/lib/python2.7/dist-packages/gi/_gi_d.so: undefined symbol: Py_InitModule4_64
[18485 refs]

so it looks like the extension is built using the normal version, not the debug version of the interpreter.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python2.7 - 2.7.3-12ubuntu5

---------------
python2.7 (2.7.3-12ubuntu5) raring; urgency=low

  * Don't include the _tkinter extension in libpython2.7-dbg.
 -- Matthias Klose <email address hidden> Thu, 20 Dec 2012 14:54:08 +0100

Changed in python2.7 (Ubuntu):
status: Invalid → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pygobject - 3.7.3-0ubuntu2

---------------
pygobject (3.7.3-0ubuntu2) raring; urgency=low

  * Rebuild.
  * Re-enable the tests for 2.7-dbg. Closes: #1091615.
 -- Matthias Klose <email address hidden> Thu, 20 Dec 2012 19:13:41 +0100

Changed in pygobject (Ubuntu):
status: New → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks Matthias! I just uploaded a rebuild / reenabling tests, and then saw that you already did that:

pygobject (3.7.3-0ubuntu2) raring; urgency=low

  * Rebuild.
  * Re-enable the tests for 2.7-dbg. Closes: #1091615.
 -- Matthias Klose <email address hidden> Thu, 20 Dec 2012 19:13:41 +0100

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.