Bad patchwork: libgcj.so: undefined reference to `gcj_describe_type_fn'
Martin Egholm Nielsen
martin@egholm-nielsen.dk
Sat Mar 18 09:21:00 GMT 2006
>> Martin> $ blah-blah-nm-blah-grep
>> Martin> U gcj_describe_type_fn
>> Is this in boehm-gc? It is somewhat odd to have boehm-gc depend on
>> symbols provided by libgcj -- that is backward.
> That is indeed backwards, yes... But it's only temporary debug stuff -
> and hopefully it will work...
>> Martin> and libjava/boehm.o does indeed contain the function (or what):
>> Martin> libjava/ $ powerpc-405-linux-gnu-nm boehm.o | grep gcj_de
>> Martin> 00000960 T _Z20gcj_describe_type_fnPvPc
>>
>> This is the mangled form, whereas the above is not.
>>
>> This is presumably because you are referencing the symbol from C
>> code, but the function definition is in C++. You need an 'extern "C"'
>> to fix this.
> I now added the extern "C" part, and did a lot of make'ing. The
> libgcjgc_convenience.a still seem to contain a "undefined" reference to
> the gcj_describe_type_fn, but nevertheless, I tried compiling my
> application again (don't know why I tried, though), and now it no longer
> complains about it. Don't know if it was the "make all" or the 'extern
> "C"' that did it...
> So, at least my application compiles now, but let's see in the morrow if
> it works on runtime :-)
Well, it does indeed seem to work now, thanks. However, now there's a
new problem, but I'll take that in a new thread!
// Martin
More information about the Java
mailing list