[Bug libgcj/23431] abstract method resolve error in gij

2005-08-18 Thread snambi at gmail dot com

--- Additional Comments From snambi at gmail dot com  2005-08-19 06:17 
---
some more analysis of the problem.

looks like this bug has been introduced in gcj 4.0.1
it works correctly in gcj 3.3.3 and javac 1.4.2, ie it gives an error while
compiling. please look below, to see the messages. but gij fails to run. it
should give an compile time error message.

hope it helps.

matrix:/home/snambi/src/java/abs_classes>
$gcj -C --classpath .:./jms.jar B.java C.java
B.java:9: error: Class `B' must override `B.onMessage(javax.jms.Message)' with a
public method in order to implement interface `javax.jms.MessageListener'.
abstract void onMessage( javax.jms.Message message );
 ^
1 error
matrix:/home/snambi/src/java/abs_classes>
$export JAVA_HOME=/otp/software/java/j2sdk1.4.2_08/
matrix:/home/snambi/src/java/abs_classes>
$export PATH=$PATH:$JAVA_HOME/bin
matrix:/home/snambi/src/java/abs_classes>
$javac -classpath .:./jms.jar B.java C.java
B.java:9: onMessage(javax.jms.Message) in B cannot implement
onMessage(javax.jms.Message) in javax.jms.MessageListener; attempting to assign
weaker access privileges; was public
abstract void onMessage( javax.jms.Message message );
  ^
C.java:8: onMessage(javax.jms.Message) in C cannot implement
onMessage(javax.jms.Message) in javax.jms.MessageListener; attempting to assign
weaker access privileges; was public
 void onMessage(javax.jms.Message message)
  ^
2 errors
matrix:/home/snambi/src/java/abs_classes>
$/otp/software/gcc/4.0.1/bin/gcj -C --classpath .:./jms.jar B.java C.java

matrix:/home/snambi/src/java/abs_classes>
$/otp/software/gcc/4.0.1/bin/gcj -C --classpath .:./jms.jar B.java C.java A.java

matrix:/home/snambi/src/java/abs_classes>
$/otp/software/gcc/4.0.1/bin/gij --classpath .:./jms.jar A
A is getting instantiated
Exception in thread "main" java.lang.IllegalAccessError: C.onMessage
(Ljavax.jms.Message;)V
   at java.lang.VMClassLoader.resolveClass(java.lang.Class)
(/otp/software/gcc/4.0.1/lib/libgcj.so.6.0.0)
   at java.lang.Class.initializeClass()
(/otp/software/gcc/4.0.1/lib/libgcj.so.6.0.0)
   at A.A() (Unknown Source)
   at A.main(java.lang.String[]) (Unknown Source)
   at gnu.java.lang.MainThread.call_main()
(/otp/software/gcc/4.0.1/lib/libgcj.so.6.0.0)
(In reply to comment #0)
> there is an abstract class, class B which implements an interface. the method
> defined by the interface, is the abstract method. Another class C extends B 
> and
> implements the method. it compiles in gcj -C.
> 
> while executing in gij, it throws an IllegalAccessError from
> VMClassLoader.resolveClass.
> 
> below is the sequence.
> 
> $cat B.java
> abstract class B implements javax.jms.MessageListener
> {
> public B()
> {
> System.out.println("Class B instantiated");
> }
> 
> abstract void onMessage( javax.jms.Message message );
> }
> matrix:~/src/java/abs_classes>
> $cat C.java
> class C extends B
> {
> public C()
> {
> System.out.println("Class C instantiated");
> }
> 
> void onMessage(javax.jms.Message message)
> {
> System.out.println("abstract method test implemented");
> }
> }
> 
> $cat A.java
> class A
> {
> private C c = null;
> public A()
> {
> System.out.println("A is getting instantiated");
> 
> c = new C();
> }
> 
> public static void main( String[] args )
> {
> A a = new A();
> }
> }
> 
> matrix:~/src/java/abs_classes>
> $gcj --classpath=.:jms.jar -C *.java
> 
> there is a jms.jar file in the current directry.
> 
> matrix:~/src/java/abs_classes>
> $gij --cp ".:jms.jar" A
> A is getting instantiated
> Exception in thread "main" java.lang.IllegalAccessError: C.onMessage
> (Ljavax.jms.Message;)V
>at java.lang.VMClassLoader.resolveClass(java.lang.Class)
> (/otp/software/gcc/4.0.1/lib/libgcj.so.6.0.0)
>at java.lang.Class.initializeClass()
> (/otp/software/gcc/4.0.1/lib/libgcj.so.6.0.0)
>at A.A() (Unknown Source)
>at A.main(java.lang.String[]) (Unknown Source)
>at gnu.java.lang.MainThread.call_main()
> (/otp/software/gcc/4.0.1/lib/libgcj.so.6.0.0)
>at gnu.java.lang.MainThread.run() 
> (/otp/software/gcc/4.0.1/lib/libgcj.so.6.0.0)
> 
> sorry for pasting the source code. it is too difficult to explain it 
> otherwise.
> 
> gcj -v --help 
> .
> .
> .
> Target: i686-pc-linux-gnu
> Configured with: ../configure --prefix=/otp/software/gcc/4.0.1
> Thread model: posix
> gcc version 4.0.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23431


[Bug java/22011] New: converting jar files into .so library in win32

2005-06-10 Thread snambi at gmail dot com
gcj crashes while trying to convert jar to shared library


[EMAIL PROTECTED] /c/otp/otp/src
$ gcj -v -save-temps -shared -findirect-dispatch -fjni -fPIC
$ACTIVEMQ_HOME/lib/activemq-core-3.0.jar -o core.jar.so
Using built-in specs.
Reading specs from
c:/software/gcc/thisiscool/4.0/bin/../lib/gcc/i686-pc-mingw32/4.0.0/../../../../i686-pc-mingw32/lib/libgcj.spec
rename spec lib to liborig
Target: i686-pc-mingw32
Configured with: /datal/gcc/gcc/configure --prefix=/datal/gcc/build/wingcc
--build=i686-pc-linux-gnu --host=i686-pc-mingw32 --target=i686-pc-mingw32
--enable-languages=c,c++,java --with-gcc --with-gnu-as --with-gnu-ld
--enable-threads=win32 --disable-nls --disable-win32-registry --disable-shared
--disable-debug --without-newlib --enable-libgcj --disable-java-awt --without-x
--enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter
--enable-hash-synchronization --enable-sjlj-exceptions --enable-libgcj-multifile
--enable-libgcj-mingw-osapi=ansi
Thread model: win32
gcc version 4.0.0 20050324 (prerelease)
 c:/software/gcc/thisiscool/4.0/bin/../libexec/gcc/i686-pc-mingw32/4.0.0/jc1.exe
c:/software/activemq/3.0/lib/activemq-core-3.0.jar -fhash-synchronization
-fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fnon-call-exceptions
-fno-omit-frame-pointer -fkeep-inline-functions -quiet -dumpbase
activemq-core-3.0.jar -mtune=pentiumpro -auxbase activemq-core-3.0 -g1 -version
-findirect-dispatch -fjni -fPIC -o activemq-core-3.0.s
c:/software/activemq/3.0/lib/activemq-core-3.0.jar:0: warning: -fPIC ignored for
target (all code is position independent)
GNU Java version 4.0.0 20050324 (prerelease) (i686-pc-mingw32)
compiled by GNU C version 4.0.0 20050324 (prerelease).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=32695
Class path starts here:
./
c:\software\activemq\3.0\lib\activemq-core-3.0.jar/ (zip)
c:\software\activemq\3.0\lib\geronimo-spec-jms-1.1-rc4.jar/ (zip)
   
c:\software\gcc\thisiscool\4.0\bin\../lib/gcc/../../share/java/libgcj-4.0.0.jar/
(system) (zip)
org/activemq/message/util/WireByteArrayInputStream.java:147: internal compiler
error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html> for instructions.

-- 
   Summary: converting jar files into .so library in win32
   Product: gcc
   Version: 4.0.0
Status: UNCONFIRMED
  Severity: critical
  Priority: P1
 Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: snambi at gmail dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22011


[Bug java/22094] New: gcj compiled executable runtime crash

2005-06-16 Thread snambi at gmail dot com
$ gcj -v
Using built-in specs.
Reading specs from
c:/software/gcc/thisiscool/4.0/bin/../lib/gcc/i686-pc-mingw32/4.0.0/../../../../i686-pc-mingw32/lib/libgcj.spec
rename spec lib to liborig
Target: i686-pc-mingw32
Configured with: /datal/gcc/gcc/configure --prefix=/datal/gcc/build/wingcc
--build=i686-pc-linux-gnu --host=i686-pc-mingw32 --target=i686-pc-mingw32
--enable-languages=c,c++,java --with-gcc --with-gnu-as --with-gnu-ld
--enable-threads=win32 --disable-nls --disable-win32-registry --disable-shared
--disable-debug --without-newlib --enable-libgcj --disable-java-awt --without-x
--enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter
--enable-hash-synchronization --enable-sjlj-exceptions --enable-libgcj-multifile
--enable-libgcj-mingw-osapi=ansi
Thread model: win32
gcc version 4.0.0 20050324 (prerelease)


[EMAIL PROTECTED] /c/otp/pottrader-swt
$ ./consumer.exe -t amtd
URL tcp://192.168.1.100:61616
Exception in thread "main" java.lang.ExceptionInInitializerError
   at 0x0055f08e (Unknown Source)
   at 0x0055ea22 (Unknown Source)
   at 0x0055a6b4 (Unknown Source)
   at 0x006012d4 (Unknown Source)
   at 0x0068d76c (Unknown Source)
   at 0x005c2e0f (Unknown Source)
   at 0x0068719e (Unknown Source)
   at 0x0068ac13 (Unknown Source)
   at 0x005c2c04 (Unknown Source)
   at 0x005b6bf9 (Unknown Source)
   at 0x005b6da0 (Unknown Source)
   at 0x005b6def (Unknown Source)
   at 0x00539a82 (Unknown Source)
   at 0x004cb26d (Unknown Source)
   at 0x004c9c73 (Unknown Source)
   at 0x004c858e (Unknown Source)
   at 0x004c850e (Unknown Source)
   at 0x00403355 (Unknown Source)
   at 0x00403446 (Unknown Source)
   at 0x004029c5 (Unknown Source)
   at 0x0040288d (Unknown Source)
   at 0x005da8d3 (Unknown Source)
   at 0x005bdb60 (Unknown Source)
   at 0x0052ab06 (Unknown Source)
   at 0x0052ac87 (Unknown Source)
   at 0x004012ca (Unknown Source)
   at 0x004011e3 (Unknown Source)
   at 0x00401234 (Unknown Source)
   at 0x77e9ca8c (Unknown Source)
Caused by: java.util.MissingResourceException: Bundle gnu/regexp/MessagesBundle
not found
   at 0x0055f08e (Unknown Source)
   at 0x0055ea22 (Unknown Source)
   at 0x005423d4 (Unknown Source)
   at 0x0055c4f4 (Unknown Source)
   at 0x007200b5 (Unknown Source)
   at 0x006be07d (Unknown Source)
   at 0x006be10a (Unknown Source)
   at 0x0068a862 (Unknown Source)
   at 0x005c2c04 (Unknown Source)
   ...23 more

-- 
   Summary: gcj compiled executable runtime crash
   Product: gcc
   Version: 4.0.0
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: snambi at gmail dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22094


[Bug java/22094] gcj compiled executable runtime crash

2005-06-16 Thread snambi at gmail dot com

--- Additional Comments From snambi at gmail dot com  2005-06-16 23:40 
---
Subject:  gcj compiled executable runtime crash

how do I solve this problem?
 ie, how do I link these symbols runtime?


On 16 Jun 2005 18:47:37 -, pinskia at gcc dot gnu dot org
<[EMAIL PROTECTED] > wrote:
> 
> --- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-16 
> 18:47 --- 
> Static linking with GCJ does not work as there is no way for the linker to 
> know what symbols are really
> needed.
> 
> --
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22094 
> 
> --- You are receiving this mail because: ---
> You reported the bug, or are watching the reporter.
> 



-- 
Nambi S
408.480.0039 [c]
 http://opentrade.sf.net  



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22094