* Is python dependency detection acceptable?
@ 2014-06-24 2:48 Tony Wang
2014-08-06 2:12 ` Mike Frysinger
0 siblings, 1 reply; 2+ messages in thread
From: Tony Wang @ 2014-06-24 2:48 UTC (permalink / raw)
To: gdb
Hi, there
Recently I'm building gdb with python support, and I noticed that gdb
with python support will heavily depends on the python environment on
the build machine.
So if I give the gdb with python support to other PC, and the python
environment is different from my build machine, the gdb will fail to
launch. Basically, I think python support is not wanted by every user,
but it's a little bit confusing for toolchain maintainer to release
two version of gdb(with and without python). So is it possible to
detect in the gdb, whether the user python environment is ok?(Usually
user will have python, but the library path or version may cause the
gdb fail to launch). If the user do not have the python, then just
disable python function in gdb.
I've noticed a hack patch to do this before, it just test the pyinit
function in a new thread to see if the python environment is ready. Is
such a operation acceptable?
BR,
Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Is python dependency detection acceptable?
2014-06-24 2:48 Is python dependency detection acceptable? Tony Wang
@ 2014-08-06 2:12 ` Mike Frysinger
0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2014-08-06 2:12 UTC (permalink / raw)
To: gdb; +Cc: Tony Wang, yunlian
[-- Attachment #1: Type: text/plain, Size: 1581 bytes --]
On Tue 24 Jun 2014 10:48:05 Tony Wang wrote:
> Recently I'm building gdb with python support, and I noticed that gdb
> with python support will heavily depends on the python environment on
> the build machine.
>
> So if I give the gdb with python support to other PC, and the python
> environment is different from my build machine, the gdb will fail to
> launch. Basically, I think python support is not wanted by every user,
> but it's a little bit confusing for toolchain maintainer to release
> two version of gdb(with and without python). So is it possible to
> detect in the gdb, whether the user python environment is ok?(Usually
> user will have python, but the library path or version may cause the
> gdb fail to launch). If the user do not have the python, then just
> disable python function in gdb.
>
> I've noticed a hack patch to do this before, it just test the pyinit
> function in a new thread to see if the python environment is ready. Is
> such a operation acceptable?
this is how we addressed it in CrOS:
https://chromium.googlesource.com/chromiumos/third_party/gdb/+/b35e9f2915f319ed23e50d66c5d157370e113317%5E%21/
we had to do this for the same reason you describe -- we build gdb in one env
(Gentoo) and deploy it in another (Ubuntu), and the two have different pythons
available. python works fine in the original env and we want to keep it
viable, but we don't want gdb killing itself simply because python isn't
available.
hopefully Yunlian will submit the patch for official consideration at some
point :).
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-06 2:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-24 2:48 Is python dependency detection acceptable? Tony Wang
2014-08-06 2:12 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox