This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Re: Disable -lmcheck when Python has threads (Re: [BUG] gdb crash when "python import gtk")
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Khoo Yit Phang <khooyp at cs dot umd dot edu>
- Cc: Hui Zhu <teawater at gmail dot com>, gdb-patches at sourceware dot org
- Date: Thu, 30 Aug 2012 20:21:22 +0200
- Subject: Re: [patch] Re: Disable -lmcheck when Python has threads (Re: [BUG] gdb crash when "python import gtk")
- References: <CANFwon0wEXd+40H85veHyRTg+itYyL2jjgsCMYByxk5K0MTLHA@mail.gmail.com> <20120719073959.GA10044@host2.jankratochvil.net> <A681786A-58A1-41E6-8410-8EBD8330E6BE@cs.umd.edu> <20120830164317.GA27381@host2.jankratochvil.net> <310D6419-544D-4D08-BB8B-21BC87C8241A@cs.umd.edu>
On Thu, 30 Aug 2012 20:05:01 +0200, Khoo Yit Phang wrote:
> 1) I reverted python-config.py and used a different method to test for
> threads ("python -m threading");
Unfortunately it does not work for me with python-2.7, only with python-3.3,
tested on Fedora 18 x86_64:
$ python3 -m threading;echo $?
0
$ python3 -m threadin;echo $?
/usr/bin/python3: No module named threadin
1
but:
$ python2 -m threading;echo $?
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib64/python2.7/threading.py", line 985, in <module>
_test()
File "/usr/lib64/python2.7/threading.py", line 969, in _test
Q = BoundedQueue(QL)
File "/usr/lib64/python2.7/threading.py", line 912, in __init__
self.queue = deque()
NameError: global name 'deque' is not defined
255
python3-3.3.0-0.3.b2.fc18.x86_64
python-2.7.3-13.fc18.x86_64
GDB moveover currently is not compatible with python3.x at all.
I do not know much Python but I would guess thread-less Pythons are rare,
aren't they? There would be also a possibility to assume Python is threaded,
if one already links with Python.
Otherwise I am fine with the patch.
Thanks,
Jan