GDB/Python configuration question

"Steve Ellcey " <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
This question should probably be asked on the python list but since the only
reason I am building python is to build gdb I thought I would start here and
find out if I am really the only person running into this issue and in the
hopes that someone here has some good connections into that project and could
forward the bug on.

I am building and installing python into a non-standard location on my
x86 linux box (ubuntu 12.04), this seems to all work fine.  It builds and
installs an archive, but not shared, python library (libpython2.7.a).  I add
the bin directory containing python-config.py to my PATH and then I try to
configure and build gdb (configuring with --with-python).

The GDB configure script uses python-config.py to set python_libs and
compiles and links a test program that calls Py_Initialize to see if
the python installation is good.  This test fails for me.

The reason is that "python-config.py --ldflags" is returning:

	-L/local/home/sellcey/gcc/mt/src/install-python/lib/python2.7/config -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic

and if I link with this I get undefined references because libpython2.7 is
listed *after* libutil, libm, and libdl and is an archive library.  If I
move it before (by hand) the link works.

Has anyone else run into this?

Steve Ellcey
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.