Found this one out the hard way, with python[-threads]: >>> import gobject Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.6/site-packages/gtk-2.0/gobject/__init__.py", line 26, in <module> from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \ File "/usr/lib64/python2.6/site-packages/gtk-2.0/glib/__init__.py", line 22, in <module> from glib._glib import * ImportError: /usr/lib/libpyglib-2.0-python.so.0: undefined symbol: PyGILState_Release >>> With python[threads]: >>> import gobject >>> Users hit this in the field too: http://www.nabble.com/python2.4-%3Epython2.5-%3Eimport-gtk-error-td18940161.html
I vaguely recall pygobject having support for threadless python, it would need a recompile of pygobject though to match python... Can you try?
(In reply to comment #1) > I vaguely recall pygobject having support for threadless python, it would need > a recompile of pygobject though to match python... Can you try? > I recompiled pygobject a couple times trying to figure out what was wrong. So, nope, it doesn't work.
I just can confirm by using wicd-client. Same issue. Running revdep-rebuild does not detect this symbol missing though, and manually recompiling either. This is because I tried to use python with -threads. It worked well when I had python[+threads].
My symptoms: $ meld /usr/lib/libpyglib-2.0-python.so.0: undefined symbol: PyGILState_Release Meld requires pygtk 2.8.0 or higher. And after this command the error is gone and meld runs without problems: USE="threads" emerge -1 python:2.6
(In reply to comment #3) > I just can confirm by using wicd-client. Same issue. > Running revdep-rebuild does not detect this symbol missing though, and manually > recompiling either. > This is because I tried to use python with -threads. It worked well when I had > python[+threads]. I strongly doubt revdep-rebuild knows enough about dlopen targets to handle this one anyways...
+ 27 Jan 2011; Pacho Ramos <pacho@gentoo.org> pygobject-2.26.0-r1.ebuild: + dev-python/pygobject always needs python with threads support as reported by + Jeremy Olexa (bug #285722) and confirmed by me until upstream fixes its bug + #640748. +
Just solved by upstream, and patch works fine Now, I need to know how to mimic: foo[bar=] EAPI2 behavior with python.eclass :-( http://devmanual.gentoo.org/ebuild-writing/eapi/index.html Could anybody from python team help me? Thanks
(In reply to comment #7) > Now, I need to know how to mimic: > foo[bar=] EAPI2 behavior with python.eclass :-( The following syntax accidentally works: PYTHON_USE_WITH="threads=" (Some more complicated cases will be handled by PYTHON_DEPEND in EAPI >=4.)
+ 28 Jan 2011; Pacho Ramos <pacho@gentoo.org> pygobject-2.26.0-r1.ebuild, + +files/pygobject-2.26.0-disabled-threads.patch: + Fix building without threads and dependency on python (thanks a lot to + Arfrever Frehtes Taifersar Arahesis for his help). +
(In reply to comment #9) revision 1.6 date: 2011-01-28 20:45:20 +0100; author: arfrever; state: Exp; lines: +2 -2; commitid: 28c44d431cd04567; Use +threads since dev-lang/python also has +threads.
Created attachment 261077 [details, diff] Fix threads USE depency Remove "=" from PYTHON_USE_WITH. -PYTHON_USE_WITH="threads=" +PYTHON_USE_WITH="threads"
Why? pygobject can work if both (python and pygobject) are compiled without threads support