This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Is it possible to statically link python into gdb?
- From: Hector Oron <hector dot oron at gmail dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Terry Guo <flameroc at gmail dot com>, Paul_Koning at dell dot com, tim at krieglstein dot org, gdb at sourceware dot org, Antonio Cavallo <a dot cavallo at cavallinux dot eu>
- Date: Wed, 25 Jun 2014 16:57:57 +0200
- Subject: Re: Is it possible to statically link python into gdb?
- Authentication-results: sourceware.org; auth=none
- References: <CAGbRaL5PAaO-NHojLYfSOjZPsPajYGGb0e8FV2qr5g8OEJXqzQ at mail dot gmail dot com> <56168225 dot tkKpPXRO26 at dabox> <214EDCB8-BEE1-4E6D-801E-D57B46AD7424 at dell dot com> <CAGbRaL5VBbF448=wmQ7mZdFirY6jv7dZ3f34uhNt1X-JAa6LxA at mail dot gmail dot com> <20140625143657 dot GI5253 at adacore dot com>
Hello
2014-06-25 16:36 GMT+02:00 Joel Brobecker <brobecker@adacore.com>:
>> I admit that I have to make a compromise here. I am delivering gdb to
>> my customer and my expectation is that they can use my gdb with python
>> support no matter there is python in their system and no matter the
>> version of their installed python. After a lot of attempts, I think I
>> can't reach my expectation. I guess I have to live with my above
>> workaround.
>
> What we do is statically link Python into GDB, and then distribute
> both GDB + Python. As long as the path to Python is inside the
> configured prefix, the path to the Python libraries should be
> "relocatable", allowing users to install the binary package anywhere
> and GDB will always find them.
Wouldn't it be better if python was loaded as external plugin, that
way user/admin can pick up which python version they want to use along
GDB.
In my use case, when distributing GDB some users want it to still be
using python2, some others want to move forward and start moving, i.e.
pretty printers, etc.. to use python3 instead. How could we get both
kind of users happy? Nowadays I am thinking on providing 2 different
builds per each python version, but maybe this should be better loaded
via plugin framework, which I am unsure if that currently exists on
FSF GDB.
Regards,
--
HÃctor OrÃn -.. . -... .. .- -. -.. . ...- . .-.. --- .--. . .-.