This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Installing python for gdb
>> It's not looking for the app, it's looking for the libraries. You
>> might need a --with-python=/usr/local or something like that?
Michael> Didn't seem to work. FYI ls /usr/local/lib | grep python
It is the right thing but something is screwy.
Michael> libpython2.6.a
Static linking may be a problem.
Michael> configure:9200: gcc -o conftest -g -DVMWARE_PIE7 -DVMWARE_VMKGDB -I/usr/local/include conftest.c -lncurses -lz -lm -L/usr/local/lib -lpython2.6 >&5
This command line looks right, but...
Michael> /usr/local/lib/libpython2.6.a(dynload_shlib.o)(.text+0x15e): In function `_PyImport_GetDynLoadFunc':
Michael> Python/dynload_shlib.c:130: undefined reference to `dlopen'
... you can errors.
Michael> /usr/local/lib/libpython2.6.a(thread.o)(.text+0x6c): In function `PyThread_start_new_thread':
Michael> Python/thread_pthread.h:181: undefined reference to `pthread_create'
... and more errors.
Michael> collect2: ld returned 1 exit status
Michael> configure:9200: $? = 1
And linking fails, so configure sensibly gives up.
You need at least -ldl and -lpthread in there, maybe more stuff.
Maybe this works out of the box for others due to libpython.so being
linked against the libraries it requires -- this doesn't happen for
static linking.
As I recall, we didn't use the pkg-config stuff here because it is
sometimes broken in python, or something like that. So I guess you will
have to add configury or set LDFLAGS or something along those lines.
Tom