From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19433 invoked by alias); 30 Aug 2012 18:21:46 -0000 Received: (qmail 19422 invoked by uid 22791); 30 Aug 2012 18:21:45 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Aug 2012 18:21:30 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7UILQPg013947 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 30 Aug 2012 14:21:27 -0400 Received: from host2.jankratochvil.net (ovpn-116-33.ams2.redhat.com [10.36.116.33]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7UILMvX027454 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 30 Aug 2012 14:21:25 -0400 Date: Thu, 30 Aug 2012 18:21:00 -0000 From: Jan Kratochvil To: Khoo Yit Phang Cc: Hui Zhu , gdb-patches@sourceware.org Subject: Re: [patch] Re: Disable -lmcheck when Python has threads (Re: [BUG] gdb crash when "python import gtk") Message-ID: <20120830182122.GA31421@host2.jankratochvil.net> References: <20120719073959.GA10044@host2.jankratochvil.net> <20120830164317.GA27381@host2.jankratochvil.net> <310D6419-544D-4D08-BB8B-21BC87C8241A@cs.umd.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <310D6419-544D-4D08-BB8B-21BC87C8241A@cs.umd.edu> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00873.txt.bz2 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 _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