My dynamically-linked executable no longer works with gcc 3.3 branch

Scott Gilbertson scottg@mantatest.com
Tue Feb 4 17:12:00 GMT 2003


I've moved to the 3.3 branch (my stuff was working on 3.2.1).  My
static-linked binary runs OK, but the dynamic-linked one fails like so:
  ./mts5000.dbg.bin: /lib/libgcc_s.so.1: version `GCC_3.3' not found
(required by /usr/lib/libgcj.so.4)
Any idea what's going on?

"ldd -r mts5000.dbg.bin" tells me:
symbol _Unwind_FindEnclosingFunction, version GCC_3.3 not defined in file
libgcc_s.so.1 with link time reference (/usr/lib/libgcj.so.4)

nm tells me that the symbol is defined in libgcc_s:
# nm -l -S -A --defined-only /usr/lib/libgcc_s.so.1 | grep FindEnclosing
/usr/lib/libgcc_s.so.1:00002950 00000035 T _Unwind_FindEnclosingFunction
/home/scott/gcc/branch33/obj/gcc/../../gcc/gcc/unwind-dw2.c:207

_Unwind_FindEnclosingFunction is used in
libjava/gnu/gcj/runtime/natStackTrace.cc, and nowhere else that I can see:
  gnu::gcj::runtime::MethodRef *
  gnu::gcj::runtime::StackTrace::getCompiledMethodRef (gnu::gcj::RawData
*addr)
  {
    void *p = _Unwind_FindEnclosingFunction (addr);
    return gnu::gcj::runtime::StackTrace
      ::methodAtAddress ((gnu::gcj::RawData *)p);
  }

I am configured this way:
  ../gcc/configure
    --prefix=/usr
    --mandir=/usr/share/man
    --infodir=/usr/share/info
    --enable-shared
    --enable-threads=posix
    --disable-checking
    --host=i386-redhat-linux
    --enable-java-awt=xlib,gtk
    --enable-libgcj
    --enable-languages=c,c++,java
    --with-system-zlib
    --enable-__cxa_atexit

I compile with:
 gcj -c -o mts5000.dbg_o mts5000.jar --classpath=.
 gcj -O2 -c -o VersionInfo.o VersionInfo.java
 gcj -O2 -c -o Main.o Main.java
 gcj --main=Main
  -o mts5000.dbg.bin Main.o VersionInfo.o
  -g -L/usr/X11R6/lib -Dawt.toolkit=gnu.awt.xlib.XToolkit
  -u _CD_gnu_awt_xlib_XToolkit
  (a bunch more "-u" things)
  mts5000.dbg_o -l-gnu-awt-xlib




More information about the Java mailing list