You are not logged in.

#1 2009-12-23 00:12:56

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

python, dependency for gdb??

Excuse me, but why do I have to install python along with gdb?
And can I install it without python?

Thanks

Offline

#2 2009-12-23 00:24:06

roy_hu
Member
Registered: 2009-10-29
Posts: 85

Re: python, dependency for gdb??

Offline

#3 2009-12-23 05:18:18

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: python, dependency for gdb??

And no you can not run it without python...

> readelf -d /usr/bin/gdb
...
 0x00000001 (NEEDED)                     Shared library: [libpython2.6.so.1.0]

Offline

#4 2009-12-23 09:52:06

SoleSoul
Member
From: Israel
Registered: 2009-06-29
Posts: 319

Re: python, dependency for gdb??

Thank you for the clear answer.

However, if I may ask, in my head gdb is a C++ debugger which completes the toolset along with gcc. It looks very weird to me that a C++ debugger (I know it can debug other things) requires an interpreter for another language.
I don't have python installed because I think it's weird to have python, ruby, java, haskell, mono, and whatever one  program needs, all installed together. That's what I had before until I simply chose program which don't need these.

So the questions are: what is the reasoning of making it a must, I mean, can't it be an optional dependency? and can I build it without python support? even just for trying. Is there a PKGBUILD to make things easier?

Thanks

Offline

#5 2009-12-23 20:20:42

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: python, dependency for gdb??

Python scripting is one of the big new features in the latest gdb.  And it can be really helpful so we want to include it in the package.  As the binary links to python when built with this scripting support, it can not be an optdepend.

To rebuild it yourself without python support, just remove python from the depends array.

Offline

#6 2009-12-24 01:26:45

jcolinzheng
Member
From: Cambridge, MA
Registered: 2008-08-06
Posts: 50
Website

Re: python, dependency for gdb??

When you don't trust Arch packagers' taste of what functions (ie compile flags) to include, it's a good idea to look at Debian

http://packages.debian.org/squeeze/gdb

In this case even Debian has python dependency.

Offline

#7 2009-12-24 09:25:02

Salamander1978
Member
From: Aachen, DE
Registered: 2007-10-24
Posts: 30

Re: python, dependency for gdb??

SoleSoul wrote:

Thank you for the clear answer.

However, if I may ask, in my head gdb is a C++ debugger which completes the toolset along with gcc. It looks very weird to me that a C++ debugger (I know it can debug other things) requires an interpreter for another language.
...

AFAIK the C++ coding gdb devs have been the driving force behind the python scripting in gdb, since they wanted to use python to do pretty printing of C++ STL containers (the good old gdb scripting language is not powerful enough for this).  It works fantastic.  The python code for this will be part of gcc-4.5. 
Here is the ~/.gdbinit I use
{{{
python
import sys
sys.path.insert(0, '/home/maik/abs/gcc/gcc-snapshot/src/gcc-4.5-20091126/libstdc++-v3/python')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
}}}

Btw., the gcc-4.5 python pretty printer work fine with gcc-4.4.

Best,
-- Maik

Offline

Board footer

Powered by FluxBB