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]

GDB/Python configuration question


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
sellcey@mips.com


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