This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB with python support: which version of Python?
- From: Paul Smith <psmith at gnu dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb at sourceware dot org
- Date: Fri, 31 May 2013 01:48:51 -0400
- Subject: Re: GDB with python support: which version of Python?
- References: <1369951459 dot 3295 dot 229 dot camel at pdsdesk> <20130531044006 dot GB4395 at adacore dot com>
- Reply-to: psmith at gnu dot org
On Fri, 2013-05-31 at 08:40 +0400, Joel Brobecker wrote:
> > I'm trying to build a portable version of GDB, with Python support, that
> > I can use on many different (GNU/Linux) systems. It's frustrating
> > because Python versions are all over the place: every distro you use, it
> > seems like, has a different not-completely-compatible version.
>
> Forcing static libraries might work on GNU/Linux systems, but
> we've found it to be unworkable in general.
Interesting; what kinds of problems did you have?
> Here is what we do at AdaCore: we build and install GDB inside
> GDB's prefix,
I assume you mean build and install _Python_ inside GDB's prefix?
> and use that to configure GDB. You can then ship
> the entire GDB install, including Python. As long as the Python
> path is inside the GDB prefix, GDB should be locating the Python
> install fine (unless the user has the PYTHONHOME environment
> variable set, in which case I believe it overrides GDB's default
> behavior).
But don't you have to set LD_LIBRARY_PATH or something to find the
libpython.so, if you link dynamically? I guess this could be done with
a gdb wrapper script of some kind. Or, is the installation not
relocatable (it must always be installed in the same place)? Our
installation needs to be relocatable.
This is an interesting idea, though, I'll look into it.