This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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]

Re: linking a .so with libgcj.a ?



Can you start our app in GDB and give us a backtrace ?

so I built the python extension with debugging information as a shared library statically linking it with libgcj.a and started python in gdb, loaded the extension, watched it crash with a segfault into gdb and got this stack trace:


(gdb) r
Starting program: /usr/local/bin/python warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 28803)]
Python 2.4 (#1, Dec 3 2004, 19:26:26) [GCC 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import PyLucene

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 28803)] 0xb7994cfd in ?? () (gdb) bt #0 0xb7994cfd in ?? () #1 0x081e28ec in ?? () (gdb)

I've used gdb before to debug bugs in the PyLucene extension without much trouble.

When I link the python extension with libgcj.so, it works, gdb is happier:

(gdb) r
Starting program: /usr/local/bin/python warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 28859)]
Python 2.4 (#1, Dec 3 2004, 19:26:26) [GCC 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import PyLucene
[New Thread 32769 (LWP 28862)]
[New Thread 16386 (LWP 28863)]
<ctrl-c>
Program received signal SIGINT, Interrupt.
[Switching to Thread 16386 (LWP 28863)]
0xb7f94af3 in __pthread_sigsuspend () from /lib/libpthread.so.0
(gdb) (gdb) bt
#0 0xb7f94af3 in __pthread_sigsuspend () from /lib/libpthread.so.0
#1 0xb7f9461b in __pthread_wait_for_restart_signal ()
from /lib/libpthread.so.0
#2 0xb7f91018 in pthread_cond_wait@GLIBC_2.0 () from /lib/libpthread.so.0
#3 0xb749e8df in ?? ()
#4 0x081aa784 in ?? ()
#5 0x081aa7b4 in ?? ()
#6 0xb7e8e3d0 in __after_morecore_hook () from /lib/libc.so.6


As for the gcc-3.3.4 header when starting python, I only use gcc 3.4.3 to compile and link the extension. Otherwise I stick with the default compiler to build everything else.

Andi..


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