libgcj.a link probs during build

Michael Koch konqueror@gmx.de
Sat Mar 5 15:47:00 GMT 2005


On Sat, Mar 05, 2005 at 03:38:53PM +0000, Nick Burrett wrote:
> Hi,
>> I'm working on a port of Java to an operating system based on the ARM/ELF target with a GNU binutils backend toolset. My target only supports static 
> libraries.
>> The version of GCC that I'm working from is 4.0.0 20050220.
>> During the build process, libgcj.a is sucessfully built, but when linking jv-convert, I find many unresolved symbols. Here's one example:
>> ./.libs/libgcj.a(jni.o)(.text+0xff0c): In function `_Jv_Method* _Jv_JNI_GetAnyMethodID<false>(_Jv_JNIEnv*, java::lang::Class*, char const*, char const*)':
> jni.cc: undefined reference to `java::lang::StringBuffer::StringBuffer(java::lang::String*)'
> ./.libs/libgcj.a(jni.o)(.text+0xffe4):jni.cc: undefined reference to `java::lang::StringBuffer::class$'
> ./.libs/libgcj.a(jni.o)(.text+0x10198): In function `_Jv_Method* _Jv_JNI_GetAnyMethodID<true>(_Jv_JNIEnv*, java::lang::Class*, char const*, char const*)':
> jni.cc: undefined reference to `java::lang::StringBuffer::StringBuffer(java::lang::String*)'
>> As far as I can tell, this is happening because there are two object files names StringBuffer.o and the linker is picking up the wrong one, namely that from 
> gnu/gcj/runtime rather than java/lang.
>> [nick@nick libjava]$ find . -name "StringBuffer.o"
> ./java/lang/StringBuffer.o
> ./gnu/gcj/runtime/StringBuffer.o
> [nick@nick libjava]$
>> This is one example of many unresolved symbols, caused by duplicate object file names.
>> Can anybody shed any light on this ?

Can you try a newer snapshot. This should have been fixed by now.
Michael
-- 
Java Trap: http://www.gnu.org/philosophy/java-trap.html


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /