Trouble installing libgcj on i686-pc-linux-gnu (RedHat 6.0)

Sandro Hawke sandro@roads.org
Mon May 3 17:36:00 GMT 1999


I installed RedHat 6.0 (glibc-2.1.1) and today's (May 3) CVS snapshots
of egcs and libcgj.  EGCS built okay.  The libgcj died on dtoa.lo, so
I made the fix to mprec.h mentioned a days ago.  Then the build
continued on to natObject.lo, where I got this:

java/lang/natClass.lo: In function `java::lang::Class::forName(java::lang::String *)':
/usr/local/build/libgcj-snapshot-1999-05-03/i686-pc-linux-gnu/libjava/../../../../src/libgcj-snapshot-1999-05-03/libjava/java/lang/natClass.cc:88: multiple definition of `java::lang::Class virtual table'
java/lang/Class.lo(.data+0x7d0):/usr/local/build/libgcj-snapshot-1999-05-03/i686-pc-linux-gnu/libjava/../../../../src/libgcj-snapshot-1999-05-03/libjava/java/lang/Class.java: first defined here
/usr/bin/ld: Warning: size of symbol `java::lang::Class virtual table' changed from 12 to 28 in java/lang/natClass.lo
java/lang/natObject.lo: In function `java::lang::Object::getClass(void)':
/usr/local/build/libgcj-snapshot-1999-05-03/i686-pc-linux-gnu/libjava/../../../../src/libgcj-snapshot-1999-05-03/libjava/java/lang/natObject.cc:51: multiple definition of `java::lang::Object virtual table'
java/lang/Object.lo(.data+0x220):/usr/local/build/libgcj-snapshot-1999-05-03/i686-pc-linux-gnu/libjava/../../../../src/libgcj-snapshot-1999-05-03/libjava/java/lang/Object.java: first defined here
/usr/bin/ld: Warning: size of symbol `java::lang::Object virtual table' changed from 12 to 28 in java/lang/natObject.lo
collect2: ld returned 1 exit status
make[2]: *** [libgcj.la] Error 1
make[2]: Leaving directory `/usr/local/build/libgcj-snapshot-1999-05-03/i686-pc-linux-gnu/libjava'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/build/libgcj-snapshot-1999-05-03/i686-pc-linux-gnu/libjava'
make: *** [all-target-libjava] Error 2


It actually made a libcgj.zip file before dying, so I tried manually
including that on the gcc --classpath instruction, but gcc (really
egcs-2.93.21) doesn't seem to even recognize the --main option:


bash$ gcc --classpath=/usr/local/build/libgcj-snapshot-1999-05-03/i686-pc-linux-gnu/libjava/libgcj.zip --main=HelloWorld HelloWorld.java
jc1: Invalid option `-fmain=HelloWorld'


And without that, we're in even worse shape, I think!

/usr/lib/crt1.o(.text+0x18): undefined reference to `main'
/tmp/ccAtcaaa.o: In function `HelloWorld::HelloWorld(void)':
/tmp/ccAtcaaa.o(.text+0xf): undefined reference to `java::lang::Object::Object(void)'
/tmp/ccAtcaaa.o: In function `HelloWorld::main(JArray<java::lang::String *> *)':
/tmp/ccAtcaaa.o(.text+0x32): undefined reference to `_Jv_InitClass'
/tmp/ccAtcaaa.o(.text+0x40): undefined reference to `_CL_Q34java4lang6System'
/tmp/ccAtcaaa.o(.text+0x45): undefined reference to `_Jv_InitClass'
/tmp/ccAtcaaa.o(.text+0x4e): undefined reference to `java::lang::System::out'
/tmp/ccAtcaaa.o(.text+0x6d): undefined reference to `_CL_Q34java4lang6System'
/tmp/ccAtcaaa.o(.text+0x72): undefined reference to `_Jv_InitClass'
/tmp/ccAtcaaa.o(.text+0x7b): undefined reference to `java::lang::System::out'
/tmp/ccAtcaaa.o: In function `global constructors keyed to HelloWorld::HelloWorld(void)':
/tmp/ccAtcaaa.o(.text+0xaf): undefined reference to `_Jv_RegisterClass'
/tmp/ccAtcaaa.o(.data+0x68): undefined reference to `java::lang::Object::finalize(void)'
/tmp/ccAtcaaa.o(.data+0x6c): undefined reference to `java::lang::Object::hashCode(void)'
/tmp/ccAtcaaa.o(.data+0x70): undefined reference to `java::lang::Object::equals(java::lang::Object *)'
/tmp/ccAtcaaa.o(.data+0x74): undefined reference to `java::lang::Object::toString(void)'
/tmp/ccAtcaaa.o(.data+0x78): undefined reference to `java::lang::Object::clone(void)'
/tmp/ccAtcaaa.o(.data+0xc0): undefined reference to `java::lang::Class virtual table'
/tmp/ccAtcaaa.o(.data+0xd4): undefined reference to `_CL_Q34java4lang6Object'
collect2: ld returned 1 exit status


Anyway, I'd appreciate any help, either in getting this working or in
telling me to just forget about it and check back in a few more
months.

	-- sandro



More information about the Java mailing list