M
Matthias Griem
Hello,
i tried to compile a small Programm with gcj - no success :-( (using eclipse it works!!):
gcj --classpath=mail.jar:activation.jar -v --main=lantronix.mail.MailSender MailSender.java -o MailSender
Result:
Using built-in specs.
Reading specs from /usr/lib/gcc/i586-suse-linux/4.2.1/libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
Target: i586-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.2.1 --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --program-suffix=-4.2 --enable-version-specific-runtime-libs --without-system-libunwind --with-cpu=generic --host=i586-suse-linux
Thread model: posix
gcc version 4.2.1 (SUSE Linux)
/usr/lib/gcc/i586-suse-linux/4.2.1/jc1 MailSender.java -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase MailSender.java -mtune=generic -auxbase MailSender -g1 -version -fclasspath=mail.jar:activation.jar -o /tmp/cclqviOf.s
GNU Java version 4.2.1 (SUSE Linux) (i586-suse-linux)
compiled by GNU C version 4.2.1 (SUSE Linux).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129464
Class path starts here:
mail.jar/ (zip)
activation.jar/ (zip)
/usr/share/java/libgcj-4.2.1.jar/ (system) (zip)
/usr/lib/gcc/i586-suse-linux/4.2.1/../../../../i586-suse-linux/bin/as -V -Qy -o /tmp/ccanivAm.o /tmp/cclqviOf.s
GNU assembler version 2.17.50 (i586-suse-linux) using BFD version (GNU Binutils) 2.17.50.20070726-14 (SUSE Linux)
/usr/lib/gcc/i586-suse-linux/4.2.1/jvgenmain lantronix.mail.MailSendermain /tmp/ccXuLquw.i
/usr/lib/gcc/i586-suse-linux/4.2.1/cc1 /tmp/ccXuLquw.i -quiet -dumpbase lantronix.mail.MailSendermain.c -mtune=generic -g1 -version -fdollars-in-identifiers -o /tmp/cclqviOf.s
GNU C version 4.2.1 (SUSE Linux) (i586-suse-linux)
compiled by GNU C version 4.2.1 (SUSE Linux).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129464
Compiler executable checksum: d37fc6ca38af22df55d43dce99bbeccf
/usr/lib/gcc/i586-suse-linux/4.2.1/../../../../i586-suse-linux/bin/as -V -Qy -o /tmp/cchBffHx.o /tmp/cclqviOf.s
GNU assembler version 2.17.50 (i586-suse-linux) using BFD version (GNU Binutils) 2.17.50.20070726-14 (SUSE Linux)
/usr/lib/gcc/i586-suse-linux/4.2.1/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o MailSender /usr/lib/gcc/i586-suse-linux/4.2.1/../../../crt1.o /usr/lib/gcc/i586-suse-linux/4.2.1/../../../crti.o /usr/lib/gcc/i586-suse-linux/4.2.1/crtbegin.o -L/usr/lib/gcc/i586-suse-linux/4.2.1 -L/usr/lib/gcc/i586-suse-linux/4.2.1 -L/usr/lib/gcc/i586-suse-linux/4.2.1/../../../../i586-suse-linux/lib -L/usr/lib/gcc/i586-suse-linux/4.2.1/../../.. /tmp/cchBffHx.o /tmp/ccanivAm.o -lgcc_s -lgcc -lgcj -lm -lpthread -lrt -lz -ldl -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/i586-suse-linux/4.2.1/crtend.o /usr/lib/gcc/i586-suse-linux/4.2.1/../../../crtn.o
/tmp/ccanivAm.o: In function `void lantronix::mail::MailSender::doSend()':
MailSender.java.text+0x108): undefined reference to `javax::mail::Session* javax::mail::Session::getDefaultInstance(java::util:roperties*, javax::mail::Authenticator*)'
MailSender.java.text+0x141): undefined reference to `void javax::mail::Session::setDebug(bool)'
MailSender.java.text+0x148): undefined reference to `javax::mail::internet::MimeMessage::class$'
MailSender.java.text+0x177): undefined reference to `javax::mail::internet::MimeMessage::MimeMessage(javax::mail::Session*)'
MailSender.java.text+0x1a4): undefined reference to `javax::mail::internet::InternetAddress::class$'
MailSender.java.text+0x1d3): undefined reference to `javax::mail::internet::InternetAddress::InternetAddress(java::lang::String*)'
MailSender.java.text+0x220): undefined reference to `javax::mail::internet::InternetAddress::class$'
MailSender.java.text+0x24f): undefined reference to `javax::mail::internet::InternetAddress::InternetAddress(java::lang::String*)'
MailSender.java.text+0x27f): undefined reference to `javax::mail::Message$RecipientType::class$'
MailSender.java.text+0x28d): undefined reference to `javax::mail::Message$RecipientType::TO'
MailSender.java.text+0x303): undefined reference to `javax::mail::internet::InternetAddress::class$'
MailSender.java.text+0x326): undefined reference to `javax::mail::internet::InternetAddress::InternetAddress(java::lang::String*)'
MailSender.java.text+0x34a): undefined reference to `javax::mail::Message$RecipientType::class$'
MailSender.java.text+0x354): undefined reference to `javax::mail::Message$RecipientType::CC'
MailSender.java.text+0x425): undefined reference to `void javax::mail::Transport::send(javax::mail::Message*)'
MailSender.java.text+0x46a): undefined reference to `javax::mail::MessagingException::class$'
/tmp/ccanivAm.o.data+0xc4): undefined reference to `javax::mail::Session::class$'
/tmp/ccanivAm.o.data+0xd4): undefined reference to `javax::mail::Message::class$'
/tmp/ccanivAm.o.rodata+0x40): undefined reference to `javax::mail::MessagingException::class$'
collect2: ld returned 1 exit status
matthias@amax:~/workspace/zumTesten/src/lantronix/mail>
anyone with more experience using gcj ??
thanks for help
Matthias
i tried to compile a small Programm with gcj - no success :-( (using eclipse it works!!):
gcj --classpath=mail.jar:activation.jar -v --main=lantronix.mail.MailSender MailSender.java -o MailSender
Result:
Using built-in specs.
Reading specs from /usr/lib/gcc/i586-suse-linux/4.2.1/libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
Target: i586-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.2.1 --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --program-suffix=-4.2 --enable-version-specific-runtime-libs --without-system-libunwind --with-cpu=generic --host=i586-suse-linux
Thread model: posix
gcc version 4.2.1 (SUSE Linux)
/usr/lib/gcc/i586-suse-linux/4.2.1/jc1 MailSender.java -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase MailSender.java -mtune=generic -auxbase MailSender -g1 -version -fclasspath=mail.jar:activation.jar -o /tmp/cclqviOf.s
GNU Java version 4.2.1 (SUSE Linux) (i586-suse-linux)
compiled by GNU C version 4.2.1 (SUSE Linux).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129464
Class path starts here:
mail.jar/ (zip)
activation.jar/ (zip)
/usr/share/java/libgcj-4.2.1.jar/ (system) (zip)
/usr/lib/gcc/i586-suse-linux/4.2.1/../../../../i586-suse-linux/bin/as -V -Qy -o /tmp/ccanivAm.o /tmp/cclqviOf.s
GNU assembler version 2.17.50 (i586-suse-linux) using BFD version (GNU Binutils) 2.17.50.20070726-14 (SUSE Linux)
/usr/lib/gcc/i586-suse-linux/4.2.1/jvgenmain lantronix.mail.MailSendermain /tmp/ccXuLquw.i
/usr/lib/gcc/i586-suse-linux/4.2.1/cc1 /tmp/ccXuLquw.i -quiet -dumpbase lantronix.mail.MailSendermain.c -mtune=generic -g1 -version -fdollars-in-identifiers -o /tmp/cclqviOf.s
GNU C version 4.2.1 (SUSE Linux) (i586-suse-linux)
compiled by GNU C version 4.2.1 (SUSE Linux).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129464
Compiler executable checksum: d37fc6ca38af22df55d43dce99bbeccf
/usr/lib/gcc/i586-suse-linux/4.2.1/../../../../i586-suse-linux/bin/as -V -Qy -o /tmp/cchBffHx.o /tmp/cclqviOf.s
GNU assembler version 2.17.50 (i586-suse-linux) using BFD version (GNU Binutils) 2.17.50.20070726-14 (SUSE Linux)
/usr/lib/gcc/i586-suse-linux/4.2.1/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o MailSender /usr/lib/gcc/i586-suse-linux/4.2.1/../../../crt1.o /usr/lib/gcc/i586-suse-linux/4.2.1/../../../crti.o /usr/lib/gcc/i586-suse-linux/4.2.1/crtbegin.o -L/usr/lib/gcc/i586-suse-linux/4.2.1 -L/usr/lib/gcc/i586-suse-linux/4.2.1 -L/usr/lib/gcc/i586-suse-linux/4.2.1/../../../../i586-suse-linux/lib -L/usr/lib/gcc/i586-suse-linux/4.2.1/../../.. /tmp/cchBffHx.o /tmp/ccanivAm.o -lgcc_s -lgcc -lgcj -lm -lpthread -lrt -lz -ldl -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/i586-suse-linux/4.2.1/crtend.o /usr/lib/gcc/i586-suse-linux/4.2.1/../../../crtn.o
/tmp/ccanivAm.o: In function `void lantronix::mail::MailSender::doSend()':
MailSender.java.text+0x108): undefined reference to `javax::mail::Session* javax::mail::Session::getDefaultInstance(java::util:roperties*, javax::mail::Authenticator*)'
MailSender.java.text+0x141): undefined reference to `void javax::mail::Session::setDebug(bool)'
MailSender.java.text+0x148): undefined reference to `javax::mail::internet::MimeMessage::class$'
MailSender.java.text+0x177): undefined reference to `javax::mail::internet::MimeMessage::MimeMessage(javax::mail::Session*)'
MailSender.java.text+0x1a4): undefined reference to `javax::mail::internet::InternetAddress::class$'
MailSender.java.text+0x1d3): undefined reference to `javax::mail::internet::InternetAddress::InternetAddress(java::lang::String*)'
MailSender.java.text+0x220): undefined reference to `javax::mail::internet::InternetAddress::class$'
MailSender.java.text+0x24f): undefined reference to `javax::mail::internet::InternetAddress::InternetAddress(java::lang::String*)'
MailSender.java.text+0x27f): undefined reference to `javax::mail::Message$RecipientType::class$'
MailSender.java.text+0x28d): undefined reference to `javax::mail::Message$RecipientType::TO'
MailSender.java.text+0x303): undefined reference to `javax::mail::internet::InternetAddress::class$'
MailSender.java.text+0x326): undefined reference to `javax::mail::internet::InternetAddress::InternetAddress(java::lang::String*)'
MailSender.java.text+0x34a): undefined reference to `javax::mail::Message$RecipientType::class$'
MailSender.java.text+0x354): undefined reference to `javax::mail::Message$RecipientType::CC'
MailSender.java.text+0x425): undefined reference to `void javax::mail::Transport::send(javax::mail::Message*)'
MailSender.java.text+0x46a): undefined reference to `javax::mail::MessagingException::class$'
/tmp/ccanivAm.o.data+0xc4): undefined reference to `javax::mail::Session::class$'
/tmp/ccanivAm.o.data+0xd4): undefined reference to `javax::mail::Message::class$'
/tmp/ccanivAm.o.rodata+0x40): undefined reference to `javax::mail::MessagingException::class$'
collect2: ld returned 1 exit status
matthias@amax:~/workspace/zumTesten/src/lantronix/mail>
anyone with more experience using gcj ??
thanks for help
Matthias