FS#27527 - [python2-gobject2][gvim] import glib in vim Python interface yields undefined symbol: PyExc_ImportE
Attached to Project:
Arch Linux
Opened by Noé Rubinstein (Phlogistique) - Saturday, 10 December 2011, 23:30 GMT
Last edited by Eric Belanger (Snowman) - Sunday, 15 January 2012, 06:39 GMT
Opened by Noé Rubinstein (Phlogistique) - Saturday, 10 December 2011, 23:30 GMT
Last edited by Eric Belanger (Snowman) - Sunday, 15 January 2012, 06:39 GMT
|
Details
Description:
Trying to import glib or any package importing glib in the vim :python command fails with an undefined symbol error. I think the problem might be within Arch Linux because: * Another Arch Linux user has told me on IRC that he was able to reproduce the problem. * One Debian user and one Gentoo user both told me on IRC were unable to reproduce the problem. * I have been unable to reproduce on Ubuntu 10.10 with python 2.6.6-2ubuntu2, vim 2:7.2.330-1ubuntu4, python-gobject 2.21.5-0ubuntu3, libglib2.0-0 2.26.1-0ubuntu1. Additional info: * glib 1.2.10-9 * python2-gobject2 2.28.6-4 * gvim 7.3.353-2 * python2 2.7.2-4 Steps to reproduce: * Launch vim or gvim. * type the following command :python import glib * The following error appears: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/site-packages/glib/__init__.py", line 22, in <module> from glib._glib import * ImportError: /usr/lib/libpyglib-2.0-python2.so.0: undefined symbol: PyExc_ImportE rror |
This task depends upon
Closed by Eric Belanger (Snowman)
Sunday, 15 January 2012, 06:39 GMT
Reason for closing: Fixed
Additional comments about closing: python3 support was removed in vim-7.3.401-1
Sunday, 15 January 2012, 06:39 GMT
Reason for closing: Fixed
Additional comments about closing: python3 support was removed in vim-7.3.401-1
As a side-note: you can't reproduce this with the vim package as it is for some reason built without Python support whereas gvim is build with Python support.
$ ldd -r /usr/lib/libpyglib-2.0-python2.so.0
linux-vdso.so.1 => (0x00007fff40bff000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f2588341000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007f258813c000)
librt.so.1 => /lib/librt.so.1 (0x00007f2587f33000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f2587c3e000)
libffi.so.5 => /usr/lib/libffi.so.5 (0x00007f2587a36000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f2587818000)
libc.so.6 => /lib/libc.so.6 (0x00007f2587491000)
libpcre.so.0 => /lib/libpcre.so.0 (0x00007f2587236000)
/lib/ld-linux-x86-64.so.2 (0x00007f25887c6000)
undefined symbol: PyExc_ImportError (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: _Py_ZeroStruct (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyExc_ValueError (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: _Py_NotImplementedStruct (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: _Py_TrueStruct (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: _Py_NoneStruct (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyCObject_Type (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyString_AsString (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyGILState_Release (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: _PyObject_CallFunction_SizeT (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyObject_IsTrue (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyErr_GivenExceptionMatches (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyErr_Format (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyFloat_FromDouble (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyErr_Occurred (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyEval_InitThreads (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyErr_SetObject (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyString_FromString (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyInt_FromLong (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyDict_GetItem (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyErr_Restore (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyInt_AsLong (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyCObject_AsVoidPtr (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyGILState_Ensure (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyErr_NormalizeException (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyObject_CallObject (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyErr_Fetch (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyObject_GetAttrString (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyObject_SetAttrString (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyErr_NewException (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyErr_Print (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyImport_ImportModule (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyThread_create_key (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyTuple_GetItem (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyErr_SetString (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyDict_SetItem (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyObject_Repr (/usr/lib/libpyglib-2.0-python2.so.0)
undefined symbol: PyDict_New (/usr/lib/libpyglib-2.0-python2.so.0)
$ python2
Python 2.7.2 (default, Nov 21 2011, 17:24:32)
[GCC 4.6.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from _dbus_bindings import ObjectPath, ByteArray, Signature, Byte
>>> from glib._glib import *
>>>
-makedepends=('gpm' 'python2' 'python' 'ruby' 'libxt' 'desktop-file-utils' 'gtk2' 'lua')
+makedepends=('gpm' 'python2' 'ruby' 'libxt' 'desktop-file-utils' 'gtk2' 'lua')
- --enable-python3interp --enable-rubyinterp --enable-luainterp
+ --disable-python3interp --enable-rubyinterp --enable-luainterp
The Python3 interpreter is also known to cause Python omnicompletion to not work.
- Remove python2 support
- Remove python3 support
- Keep the current state, in which some extensions fail to load
Any opinions?
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: /usr/lib/python2.7/site-packages/sip.so: undefined symbol: PyProperty_Type
Rebuild gvim without Python3 support solves the problem. But probably brings incompatibility with Python3. Are there better solutions?
FS#25529. I didn't know it would conflict with the python2 support. I don't use vim so I don't really care. Probably the best solution would be to only enable either python2 or python3 support. I don't know which one it should be.I personally vote for keeping Python2 support. Python2 has more libraries and is probably more widely used at this point.