Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Steffen Dettmer <steffen.dettmer@googlemail.com>
To: gdb@sourceware.org
Subject: how to build gdb-7.1 --with-python?
Date: Fri, 25 Jun 2010 15:40:00 -0000	[thread overview]
Message-ID: <AANLkTimAl-3mAWHltmwEoXB4b2GS3WCWGvLGQIKKGCW3@mail.gmail.com> (raw)

Hi,

I would like to play with gdb's Python support.

Usually I don't have problems with installing GNU software, but
here I encountered issues suggesting me that I'm doing something
weird or have something broken, missed or missunderstood.

I googled, but did not find installation instructions. gdb/README
just states `--with-python', so I though it would be easy, as
soon as I upgraded my Python. So from python.org I grabbed 2.5
and installed it (default configure options). I noticed that
"make test" hung (0% CPU) in some thread test. Hoped not to need
it and installed anyway.

Went back to gdb builddir and used:

  ../configure --with-python --target=arm-elf --disable-werror
     --disable-expat --with-expat=no

Worked. Ran make. Failed after a while with:

  checking for python2.5... no
  checking for python2.4... no
  configure: error: python is missing or unusable
  make[1]: *** [configure-gdb] Error 1
  make[1]: Leaving directory `/usr/local/build/gdb-7.1/build-python'

after another while I found gdb/config.log (it's a bit hidden I
think) telling -lpython2.5 could not be found.

I googled and found the recommendation to symlink it by myself. I
think this is doubtful, but I had no better idea, so I did:

  host:/usr/local/lib # ln -s /usr/local/lib/python2.5/config/libpython2.5.a .

re-ran make. Now I got resolved symbols from libdl (dl_open and
friends) and even from libpthread (sem_init, pthread_create...).
I tried:

  ../configure --with-python --target=arm-elf --disable-werror \
     --disable-expat --with-expat=no \
     LIBS="-ldl -lpthread"

but since it seems not to be a recursive configure but some
sub-configure indepdently triggered by make, the parameters
(LIBS) seem not to be passed through; in gdb/config.log the shown
"Invocation command line" does not include the LIBS parameter.

Anyway, I think LIBS="-lpthread" cannot be right, should be
automatic.
Or do I have to build some single-threaded python?
Maybe also disabling libdl? Or is this essential?

Is my assumption to use "a standard python" correct or should a
specifically configured one be used? Maybe not even installed
system-wide?

Any hints or pointers appreciated.

oki,

Steffen


             reply	other threads:[~2010-06-25 15:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25 15:40 Steffen Dettmer [this message]
2010-06-25 17:13 ` Tom Tromey
2010-06-28 11:04   ` Steffen Dettmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimAl-3mAWHltmwEoXB4b2GS3WCWGvLGQIKKGCW3@mail.gmail.com \
    --to=steffen.dettmer@googlemail.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox