link problems under darwin5.2

Andreas Tobler toa@pop.agri.ch
Sat Jan 5 01:49:00 GMT 2002


Sorry for the long mail, but hopefully it contains some information.

Tom Tromey wrote:
> 
> >>>>> "Andreas" == Andreas Tobler <toa@pop.agri.ch> writes:
> 
> Andreas> Could it be that the --disable-shared has something to do with?
> 
> I doubt that is the problem.
> 
> Andreas> -rw-r--r--  1 andreast  staff    346 Jan  2 19:18 Attributes.lo
> Andreas> -rw-r--r--  1 andreast  staff  38760 Jan  2 19:18 Attributes.o
> 
> Does `nm' on the .o file show the symbols in question?

>From my point of view I find them:
e.g MAIN_CLASS

000010d0 D __ZN4java4util3jar10Attributes6class$E
00001138 D __ZN4java4util3jar15Attributes$Name16MANIFEST_VERSIONE
0000113c D __ZN4java4util3jar15Attributes$Name10CREATED_BYE
00001140 D __ZN4java4util3jar15Attributes$Name17SIGNATURE_VERSIONE
00001144 D __ZN4java4util3jar15Attributes$Name10CLASS_PATHE
00001148 D __ZN4java4util3jar15Attributes$Name10MAIN_CLASSE

> How exactly is the link being done?

This is a copy and paste from the terminal. Do you need some more information?

in the .libs/libgcj.a I find MAIN_CLASS as well:

         U __ZN4java4util3jar15Attributes$Name10MAIN_CLASSE
         U __ZN4java4util3jar15Attributes$Name16MANIFEST_VERSIONE
         U __ZN4java4util3jar15Attributes$Name6class$E
         U __ZN4java4util3jar15Attributes$Name6class$E

Thanks,

Andreas

BTW, the multiple defined symbols below should not matter, otherwise I
have to compile the whole stuff with -flat_namespace and then the
undefined remain but the multiple are gone.

-------
Making all in include
/bin/sh ./libtool --tag=GCJ --mode=link
/Volumes/xufs/gccsrc/objdir/gcc/gcj
-B/Volumes/xufs/gccsrc/objdir/powerpc-apple-darwin5.2/libjava/
-B/Volumes/xufs/gccsrc/objdir/gcc/
-L/Volumes/xufs/gccsrc/objdir/powerpc-apple-darwin5.2/libjava -g -O2  -o
jv-convert --main=gnu.gcj.convert.Convert -rpath
/Volumes/reserved1/gcctmp/lib -shared-libgcc 
gnu/gcj/convert/BytesToUnicode.lo gnu/gcj/convert/Convert.lo
gnu/gcj/convert/Input_8859_1.lo gnu/gcj/convert/Input_ASCII.lo
gnu/gcj/convert/Input_EUCJIS.lo gnu/gcj/convert/Input_JavaSrc.lo
gnu/gcj/convert/Input_SJIS.lo gnu/gcj/convert/Input_UTF8.lo
gnu/gcj/convert/Input_iconv.lo gnu/gcj/convert/IOConverter.lo
gnu/gcj/convert/Output_8859_1.lo gnu/gcj/convert/Output_ASCII.lo
gnu/gcj/convert/Output_EUCJIS.lo gnu/gcj/convert/Output_JavaSrc.lo
gnu/gcj/convert/Output_SJIS.lo gnu/gcj/convert/Output_UTF8.lo
gnu/gcj/convert/Output_iconv.lo gnu/gcj/convert/UnicodeToBytes.lo
libgcj.la ./../boehm-gc/libgcjgc.la
-L/Volumes/xufs/gccsrc/objdir/powerpc-apple-darwin5.2/libjava/../boehm-gc/.libs
 ./../zlib/libzgcj.la
-L/Volumes/xufs/gccsrc/objdir/powerpc-apple-darwin5.2/libjava/../zlib/.libs
-L/Volumes/xufs/gccsrc/objdir/powerpc-apple-darwin5.2/libjava/.libs 
/Volumes/xufs/gccsrc/objdir/gcc/gcj
-B/Volumes/xufs/gccsrc/objdir/powerpc-apple-darwin5.2/libjava/
-B/Volumes/xufs/gccsrc/objdir/gcc/ -g -O2 -o jv-convert
--main=gnu.gcj.convert.Convert -shared-libgcc
gnu/gcj/convert/BytesToUnicode.o gnu/gcj/convert/Convert.o
gnu/gcj/convert/Input_8859_1.o gnu/gcj/convert/Input_ASCII.o
gnu/gcj/convert/Input_EUCJIS.o gnu/gcj/convert/Input_JavaSrc.o
gnu/gcj/convert/Input_SJIS.o gnu/gcj/convert/Input_UTF8.o
gnu/gcj/convert/Input_iconv.o gnu/gcj/convert/IOConverter.o
gnu/gcj/convert/Output_8859_1.o gnu/gcj/convert/Output_ASCII.o
gnu/gcj/convert/Output_EUCJIS.o gnu/gcj/convert/Output_JavaSrc.o
gnu/gcj/convert/Output_SJIS.o gnu/gcj/convert/Output_UTF8.o
gnu/gcj/convert/Output_iconv.o gnu/gcj/convert/UnicodeToBytes.o 
-L/Volumes/xufs/gccsrc/objdir/powerpc-apple-darwin5.2/libjava
./.libs/libgcj.a
/Volumes/xufs/gccsrc/objdir/powerpc-apple-darwin5.2/boehm-gc/.libs/libgcjgc.a
-L/Volumes/xufs/gccsrc/objdir/powerpc-apple-darwin5.2/libjava/../boehm-gc/.libs
/Volumes/xufs/gccsrc/objdir/powerpc-apple-darwin5.2/zlib/.libs/libzgcj.a
-L/Volumes/xufs/gccsrc/objdir/powerpc-apple-darwin5.2/libjava/../zlib/.libs
./../boehm-gc/.libs/libgcjgc.a ./../zlib/.libs/libzgcj.a -L/Volumes/xufs/gccsrc/objdir/powerpc-apple-darwin5.2/libjava/.libs
/usr/bin/ld: warning multiple definitions of symbol _read
/Volumes/xufs/gccsrc/objdir/powerpc-apple-darwin5.2/boehm-gc/.libs/libgcjgc.a(os_dep.o)
definition of _read in section (__TEXT,__text)
/usr/lib/libm.dylib(read.o) definition of _read
/usr/bin/ld: Undefined symbols:
java::util::jar::Attributes$Name::MAIN_CLASS
java::util::jar::Attributes$Name::class$
_alloca
java::lang::ref::Reference::isEnqueued()
java::lang::ref::Reference::get()
java::lang::ref::Reference::clear()
java::lang::ref::Reference::enqueue()
java::lang::ref::Reference::class$
java::lang::ref::Reference::Reference(java::lang::Object*)
java::lang::ref::Reference::Reference(java::lang::Object*, java::lang::ref::ReferenceQueue*)
java::util::jar::Attributes::class$
java::util::jar::Attributes::Attributes(java::util::jar::Attributes*)
java::util::jar::Attributes::Attributes()
java::util::jar::Attributes$Name::MANIFEST_VERSION



More information about the Java mailing list