This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Undefined symbol while executing Python
- From: Paul Koning <paul_koning at dell dot com>
- To: gdb at sourceware dot org
- Date: Fri, 1 Jul 2011 16:55:59 -0400
- Subject: Re: Undefined symbol while executing Python
- References: <674EAAD3-EF0C-451B-BC73-5D39F33E6780@dell.com>
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.
>
> On that system I built gdb 7.2 (with some local mods, but not in the Python pieces). That one blows up when I try that command:
>
> GNU gdb (GDB) 7.2
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> 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=i686-pc-linux-gnu --target=mips64el-pss-netbsdelf".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> (gdb) python import itertools
> Traceback (most recent call last):
> File "<string>", line 1, in ?
> ImportError: /usr/lib/python2.4/lib-dynload/itertoolsmodule.so: undefined symbol: PyObject_SelfIter
> Error while executing Python code.
> (gdb) quit
>
> 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 has that library in its required libraries list. The cross 7.2 gdb I built does not. That makes sense, it alllows that gdb to be executed on another machine that might not have the same python installed.
So this suggests that libpython2.4 should have been loaded at this point and hasn't been, either that or the symbol name resolution isn't working right.
paul