Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 285722 - dev-python/pygobject: incorrect dep on python (needs USE=threads)
Summary: dev-python/pygobject: incorrect dep on python (needs USE=threads)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-20 16:38 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2011-01-30 13:52 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix threads USE depency (pygobject-2.26.0-r1.ebuild.patch,357 bytes, patch)
2011-01-30 10:10 UTC, Luigi 'Comio' Mantellini
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-09-20 16:38:05 UTC
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
Comment 1 Mart Raudsepp gentoo-dev 2009-09-20 21:44:32 UTC
I vaguely recall pygobject having support for threadless python, it would need a recompile of pygobject though to match python... Can you try?
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-09-21 00:20:28 UTC
(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.
Comment 3 David Carlos Manuelda 2010-02-15 20:59:49 UTC
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].
Comment 4 Paul Tobias 2010-02-22 13:24:18 UTC
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
Comment 5 Brian Harring (RETIRED) gentoo-dev 2010-08-19 09:26:31 UTC
(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...
Comment 6 Pacho Ramos gentoo-dev 2011-01-27 19:05:05 UTC
+  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.
+
Comment 7 Pacho Ramos gentoo-dev 2011-01-28 11:14:54 UTC
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
Comment 8 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-01-28 15:06:06 UTC
(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.)
Comment 9 Pacho Ramos gentoo-dev 2011-01-28 19:38:38 UTC
+  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).
+
Comment 10 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-01-28 19:49:01 UTC
(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.
Comment 11 Luigi 'Comio' Mantellini 2011-01-30 10:10:27 UTC
Created attachment 261077 [details, diff]
Fix threads USE depency

Remove "=" from PYTHON_USE_WITH.

-PYTHON_USE_WITH="threads="
+PYTHON_USE_WITH="threads"
Comment 12 Pacho Ramos gentoo-dev 2011-01-30 13:52:20 UTC
Why? pygobject can work if both (python and pygobject) are compiled without threads support