undefined reference to `__gxx_personality_v0'
Delvin Defoe
delvin.defoe@gmail.com
Wed Apr 11 18:10:00 GMT 2007
I corrected the problem by telling the compiler that one of the
included files files is part of the Java library and not the c++
library.
including <jvm.h> in that file did the trick.
Thanks for your feedback.
Delvin
On 4/11/07, David Daney <ddaney@avtrex.com> wrote:
> Delvin Defoe wrote:
> > After implementing implementing my garbage collector in gcc I tried to
> > compile gcc and received the following errors -- undefined reference
> > to `__gxx_personality_v0'.
> >
> > The logs follow.
> >
> > /home/ddefoe/ddc-build/gcc/gcj -B/home/ddefoe/ddc-build/i686
> > -pc-linux-gnu/libjava/ -B/home/ddefoe/ddc-build/gcc/ -ffloat-store
> > -fomit-frame-pointer -g -O0 -o .libs/jv-convert --main=
> > gnu.gcj.convert.Convert -shared-libgcc
> > -L/home/ddefoe/ddc-build/i686-pc-linux-gnu/libjava
> > -L/home/ddefoe/ddc-build/i686-pc-linux-gnu/libjava/.libs
> > ./.libs/libgcj.so
> > -L/home/ddefoe/ddc-build/i686-pc-linux-gnu/libstdc++-v3/src
> > -L/home/ddefoe/ddc-build/i686-pc-linux-gnu/libstdc++-v3/src/.libs
> > -lpthread -ldl -L/home/ddefoe/ddc-build/./gcc -lgcc_s -lc -lgcc_s
> > -Wl,--rpath -Wl,/home/ddefoe/ddc-prefix/lib
> > ./.libs/libgcj.so: undefined reference to `__gxx_personality_v0'
> > collect2: ld returned 1 exit status
> > make[3]: *** [jv-convert] Error 1
> > make[3]: Leaving directory
> > `/home/ddefoe/ddc-build/i686-pc-linux-gnu/libjava'
> > make[2]: *** [all-recursive] Error 1
> > make[2]: Leaving directory
> > `/home/ddefoe/ddc-build/i686-pc-linux-gnu/libjava'
> > make[1]: *** [all-target-libjava] Error 2
> > make[1]: Leaving directory `/home/ddefoe/ddc-build'
> > make: *** [all] Error 2
> >
> > Any ideas why gcc is giving that undefined reference error? Any
> > suggestions on how to fix this?
> >
> __gxx_personality_v0 is defined in libsupc++.a, but it is unclear why
> you need it. That should only be needed if you compile C++ code that is
> not extern "java".
>> If you modified any of the files that make up libgcj, you should examine
> the resulting .o files with nm and see which is requiring
> __gxx_personality_v0, and then fix it.
>> David Daney
>
--
***********************************************************
Delvin Defoe
Doctoral Candidate
Department of Computer Science
Washington University in Saint Louis
314.935.4502
http://www.cs.wustl.edu/~dcd2/
***********************************************************
More information about the Java
mailing list