This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

how to build gdb-7.1 --with-python?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]