GCJ: undefined reference

Charles-Antoine Gauthier charles.gauthier at nrc.ca
Thu Feb 24 14:25:22 UTC 2000


I am finally back to the office. I am catching up on my email, and only
got to this message this morning.

Kaffe and gcj/libgcj do not mix. The class libraries in libgcj only work
with gcj.

We have a partial port of libgcj to RTEMS. The garbage collector is not
done yet. It is the next item on our list of things to do.

If you want a patch file for libgcj, let me know, and I will send it to
you.

Oscar Martinez de la Torre wrote:
> 
> Hello!
> 
>         I'm studying gcj for ERC32 processor using RTEMS and I've installed
> this RPMs.
> 
> venus:~$ rpm -q -a
> sparc-rtems-binutils-990901-1
> sparc-rtems-gcc-gcc2.95.2newlib1.8.2-1
> sparc-rtems-gdb-4.18-1
> sparc-rtems-gcj-gcc2.95.2newlib1.8.2-1
> sparc-rtems-objc-gcc2.95.2newlib1.8.2-1
> 
>         But I can NOT see any libgcj.
> 
> venus:~$ rpm -q -l sparc-rtems-gcj-gcc2.95.2newlib1.8.2-1
> /opt/rtems/bin
> /opt/rtems/bin/gcjh
> /opt/rtems/bin/jcf-dump
> /opt/rtems/bin/jv-scan
> /opt/rtems/bin/sparc-rtems-gcj
> /opt/rtems/lib
> /opt/rtems/lib/gcc-lib
> /opt/rtems/lib/gcc-lib/sparc-rtems
> /opt/rtems/lib/gcc-lib/sparc-rtems/2.95.2
> /opt/rtems/lib/gcc-lib/sparc-rtems/2.95.2/jc1
> /opt/rtems/lib/gcc-lib/sparc-rtems/2.95.2/jvgenmain
> /opt/rtems/lib/gcc-lib/sparc-rtems/2.95.2/soft
> 
>         Also it complained about libgcj.specs, so:
> touch /opt/rtems/sparc-rtems/lib/libgcj.spec
> 
>         Must I compile and install libgcj library?
>         Or is it yet in a RPMs?
> 
>         After
> unzip Klasses.jar  (from Kaffe-1.0.5)
> zip -0 -v -r Klasses.class java kaffe
> export CLASSPATH=./Klasses.class
> 
>         So
> 
> venus:~/GCJ$ ls
> HelloWorldApp.class  HelloWorldApp.java  Klasses.class  Klasses.jar
> java/  kaffe/
> 
>         I tried
> 
> venus:~/GCJ$ sparc-rtems-gcj -v -o Hello.exe HelloWorldApp.class
> 
>         And I got this (also with HelloWorldApp.java)
> 
> Reading specs from /opt/rtems/lib/gcc-lib/sparc-rtems/2.95.2/specs
> Reading specs from /opt/rtems/sparc-rtems/lib/libgcj.spec
> gcc driver version 2.95.2 19991024 (release) executing gcc version
> egcs-2.91.66
>  /opt/rtems/lib/gcc-lib/sparc-rtems/2.95.2/jc1 HelloWorldApp.class
> -quiet -g1 -version -o /tmp/cc58aXtl.s
> GNU Java version 2.95.2 19991024 (release) (sparc-rtems) compiled by GNU
> C version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release).
>  /opt/rtems/sparc-rtems/bin/as -o /tmp/ccGKDPbW.o /tmp/cc58aXtl.s
>  /opt/rtems/lib/gcc-lib/sparc-rtems/2.95.2/collect2 -dc -dp -N -T
> /opt/rtems/sparc-rtems/lib/linkcmds -e start -o Hello.exe
> /opt/rtems/sparc-rtems/lib/crt0.o
> -L/opt/rtems/lib/gcc-lib/sparc-rtems/2.95.2 -L/opt/rtems/sparc-rtems/lib
> /tmp/ccGKDPbW.o -lgcc --start-group -lerc32 -lgcc --end-group -lgcc
> /opt/rtems/sparc-rtems/bin/ld: warning: cannot find entry symbol start;
> defaulting to 02000000
> /tmp/ccGKDPbW.o: In function
> `HelloWorldApp::main(JArray<java::lang::String *> *)':
> /home/omt/GCJ/HelloWorldApp.class(.text+0x10): undefined reference to
> `_Jv_InitClass'
> /home/omt/GCJ/HelloWorldApp.class(.text+0x18): undefined reference to
> `_CL_Q34java4lang6System'
> /home/omt/GCJ/HelloWorldApp.class(.text+0x1c): undefined reference to
> `_CL_Q34java4lang6System'
> /home/omt/GCJ/HelloWorldApp.class(.text+0x20): undefined reference to
> `_Jv_InitClass'
> /home/omt/GCJ/HelloWorldApp.class(.text+0x28): undefined reference to
> `java::lang::System::out'
> /home/omt/GCJ/HelloWorldApp.class(.text+0x2c): undefined reference to
> `java::lang::System::out'
> /tmp/ccGKDPbW.o: In function `HelloWorldApp::HelloWorldApp(void)':
> /home/omt/GCJ/HelloWorldApp.class(.text+0x78): undefined reference to
> `java::lang::Object::Object(void)'
> /tmp/ccGKDPbW.o: In function `global constructors keyed to
> HelloWorldApp::main(JArray<java::lang::String *> *)':
> /home/omt/GCJ/HelloWorldApp.class(.text+0x9c): undefined reference to
> `_Jv_RegisterClass'
> /tmp/ccGKDPbW.o: In function
> `HelloWorldApp::main(JArray<java::lang::String *> *)':
> /home/omt/GCJ/HelloWorldApp.class(.data+0x28): undefined reference to
> `java::lang::Object::clone(void)'
> /home/omt/GCJ/HelloWorldApp.class(.data+0x2c): undefined reference to
> `java::lang::Object::equals(java::lang::Object *)'
> /home/omt/GCJ/HelloWorldApp.class(.data+0x30): undefined reference to
> `java::lang::Object::finalize(void)'
> /home/omt/GCJ/HelloWorldApp.class(.data+0x34): undefined reference to
> `java::lang::Object::hashCode(void)'
> /home/omt/GCJ/HelloWorldApp.class(.data+0x38): undefined reference to
> `java::lang::Object::toString(void)'
> /home/omt/GCJ/HelloWorldApp.class(.data+0x4c): undefined reference to
> `java::lang::Class virtual table'
> /home/omt/GCJ/HelloWorldApp.class(.data+0x60): undefined reference to
> `_CL_Q34java4lang6Object'
> collect2: ld returned 1 exit status
> 
> Thanks,
>                                                                 Oscar
> 
> --
> Óscar Martínez de la Torre -  Office Phone: +31-(0)71.565.5844
> Telecommunication Engineer at Universidad Politécnica de Madrid
> European Space Agency ESTEC/TOS/EMS Erasmus Building Office Nb212
> Keplerlaan,1 - NL 2201 AZ - Noordwijk ZH - The Netherlands
> Mail: omt at wm.estec.esa.nl - Personal Mail: omt at etsit.upm.es

-- 
Charles-Antoine Gauthier
Research Officer
Software Engineering Group
Institute for Information Technology
National Research Council of Canada
Ottawa, ON, Canada
K1A 0R6



More information about the users mailing list