From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23683 invoked by alias); 1 Jul 2011 20:56:30 -0000 Received: (qmail 23673 invoked by uid 22791); 1 Jul 2011 20:56:29 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausxipps301.us.dell.com (HELO ausxipps301.us.dell.com) (143.166.148.223) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Jul 2011 20:56:02 +0000 X-Loopcount0: from 10.152.240.141 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Undefined symbol while executing Python From: Paul Koning In-Reply-To: <674EAAD3-EF0C-451B-BC73-5D39F33E6780@dell.com> Date: Fri, 01 Jul 2011 20:56:00 -0000 Content-Transfer-Encoding: quoted-printable Message-Id: <00001CBF-4AB1-41C4-988A-4D817CA8ED73@dell.com> References: <674EAAD3-EF0C-451B-BC73-5D39F33E6780@dell.com> To: gdb@sourceware.org X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00003.txt.bz2 On Jul 1, 2011, at 3:37 PM, Paul Koning wrote: > My Red Hat system has installed on it Pythong 2.4.3 and gdb 7.0.1. Both = of these process the Python command "import itertools" without complaint. >=20 > On that system I built gdb 7.2 (with some local mods, but not in the Pyth= on pieces). That one blows up when I try that command: >=20 > GNU gdb (GDB) 7.2 > Copyright (C) 2010 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "--host=3Di686-pc-linux-gnu --target=3Dmips64e= l-pss-netbsdelf". > For bug reporting instructions, please see: > . > (gdb) python import itertools > Traceback (most recent call last): > File "", line 1, in ? > ImportError: /usr/lib/python2.4/lib-dynload/itertoolsmodule.so: undefined= symbol: PyObject_SelfIter > Error while executing Python code. > (gdb) quit >=20 > Any ideas what's wrong or how to fix this? More... The symbol is defined in libpython2.4.so. The native 7.0.1 gdb ha= s that library in its required libraries list. The cross 7.2 gdb I built d= oes not. That makes sense, it alllows that gdb to be executed on another m= achine that might not have the same python installed.=20=20 So this suggests that libpython2.4 should have been loaded at this point an= d hasn't been, either that or the symbol name resolution isn't working righ= t. paul