Re: KJC and GNU Classpath
Geoff Berry wrote: Vincent GAY-PARA [EMAIL PROTECTED] writes: Hi, At DMS we tried to compile GNU Classpath with KJC (http://www.dms.at/kjc) and we encoutered some problems. ObjectInputStream: == problem with an expression (java/io/ObjectInputStream.java:1188: Variable "value" cannot be initialized by a value of type "int" [JLS 4.5.4]) Which compiler do you use ??? please rewrite: char value = default_initialize ? 0 : this.realInputStream.readChar (); as: char value = default_initialize ? (char)0 : this.realInputStream.readChar (); see also: java/io/ObjectInputStream.java:1223: Variable "value" cannot be initialized by a value of type "int" [JLS 4.5.4] I believe this is a compiler error, not an error in the code. `value' is not being initialized with a value of type int, but with a value of type char. JLS 15.24: The type of a conditional expression is determined as follows: ... Otherwise, if the second and third operands have numeric type, then there are several cases: ... If one of the operands is of type T where T is byte, short, or char, and the other operand is a constant expression of type int whose value is representable in type T, then the type of the conditional expression is T. You're right. I've corrected KJC accordingly. My test case was: short s = aCondition ? 0 : 1; // compile time error but the following is valid: short s = aCondition ? 0 : (short)1; Sorry for the inconvenience. Vincent for DMS ... -- Geoff Berry
Re: KJC and GNU Classpath
On Dec 28, Brian Jones wrote: Vincent GAY-PARA [EMAIL PROTECTED] writes: Hi, At DMS we tried to compile GNU Classpath with KJC (http://www.dms.at/kjc) and we encoutered some problems. WeakHashMap: java/util/WeakHashMap.java:336: Cannot access field "queue" it is in an other package and not a class member [JLS 15.10] This is a problem with how WeakBucket is setup I believe. It doesn't make much sense to me why we would call the super constructor with a package private data member that isn't even initialized in java/lang/ref/Reference.java except in this same constructor. There is also the problem mentioned above of queue being in another package. I think Jochen Hoenicke should look at this. The queue meant here is WeakHashMap.queue, not Reference.queue. Okay, that is a name conflict, but since Reference.queue is private it shouldn't be visible in java.util. jikes and javac don't have problems with this. I may change this, but IMHO this is also a bug in kjc. BTW the conflicts in AbstractList are serious, jikes doesn't compile subList() correctly. Jochen
Re: KJC and GNU Classpath
Vincent GAY-PARA [EMAIL PROTECTED] writes: This bug is already fixed. We'll try to make a new release available on our CVS tomorrow. The line above should now work. Just wanted to report that kjc-suite/msggen does not seem to exist or at least I cannot check it out. Brian -- Brian Jones [EMAIL PROTECTED]
Re: KJC and GNU Classpath
Brian Jones [EMAIL PROTECTED] writes: Vincent GAY-PARA [EMAIL PROTECTED] writes: This bug is already fixed. We'll try to make a new release available on our CVS tomorrow. The line above should now work. Just wanted to report that kjc-suite/msggen does not seem to exist or at least I cannot check it out. And now to let you know that after trying an update on the msggen directory and not getting anything I sent this and now if I do an update on kjc-suite I get about twice as many files as the first time I did a checkout. Weird, but anyway the msggen problem is gone. Apparently I now need a com.ibm.math package for kjc-suite/xtype/. Going to go try finding this. Sorry for any confusion. Brian -- Brian Jones [EMAIL PROTECTED]
Re: KJC and GNU Classpath
Brian Jones wrote: we tried by hand but we encoutered the following problems: command: cd classpath/lib; java -mx12800 at.dms.kjc.Main --verbose --nowrite @classes According to the documentation I think you'd want to do something like the above but changed to cd classpath/lib; java -mx12800 at.dms.kjc.Main --verbose --nowrite `cat classes`, since I did not see the "@classes" syntax documented on your web page, but if it works that's great. It works. Introspector: = ../java/beans/Introspector.java:23: Package gnu.java.beans not found in import. import gnu.java.beans.*; ComponentBeanInfo: == ../gnu/java/beans/info/ComponentBeanInfo.java:23: Package gnu.java.beans not found in import. import gnu.java.beans.*; This package exists in classpath/gnu/java/beans/ so something is probably wrong with how you're trying to compile. It was our fault. AWTEvent: = ../java/awt/AWTEvent.java is missing from lib/classes It appears that AWTEvent is not part of the compile, see classpath/lib/standard.omit. It has been added in lib/classes in the last CVS of CLASSPATH. ObjectInputStream: == problem with an expression (java/io/ObjectInputStream.java:1188: Variable "value" cannot be initialized by a value of type "int" [JLS 4.5.4]) Which compiler do you use ??? please rewrite: char value = default_initialize ? 0 : this.realInputStream.readChar (); as: char value = default_initialize ? (char)0 : this.realInputStream.readChar (); see also: java/io/ObjectInputStream.java:1223: Variable "value" cannot be initialized by a value of type "int" [JLS 4.5.4] Okay, I made these changes in CVS. It works fine. WeakHashMap: java/util/WeakHashMap.java:336: Cannot access field "queue" it is in an other package and not a class member [JLS 15.10] This is a problem with how WeakBucket is setup I believe. It doesn't make much sense to me why we would call the super constructor with a package private data member that isn't even initialized in java/lang/ref/Reference.java except in this same constructor. There is also the problem mentioned above of queue being in another package. I think Jochen Hoenicke should look at this. And we also have the following problem that is a bug in KJC: java/util/AbstractList.java:410: Invalid outer class for this operation [JLS 15.7.2] we will try to fix it today. Could you fix these problems and send us an email ([EMAIL PROTECTED]) when it's available on your CVS ? lyta:~$ cvs -d :pserver:[EMAIL PROTECTED]:/cvs/public co kjc-suite cvs server: cannot find module `kjc-suite' - ignored This bug is already fixed. We'll try to make a new release available on our CVS tomorrow. The line above should now work. Could you fix this problem and let the classpath list know when you have ([EMAIL PROTECTED])? I'd also like to know when you fix the AbstractList problem above. Thanks you for your prompt answer. I got GNU CLASSPATH to compile on my computer using SUN's JDK with: vgp% cd classpath/lib vgp% CLASSPATH=$CLASSPATH:/extra/kaffe/libraries/javalib/Klasses.jar java -mx128m at.dms.kjc.Main @classes Vincent for DMS. Brian -- Brian Jones [EMAIL PROTECTED]
Re: KJC and GNU Classpath
Vincent GAY-PARA [EMAIL PROTECTED] writes: Hi, At DMS we tried to compile GNU Classpath with KJC (http://www.dms.at/kjc) and we encoutered some problems. ObjectInputStream: == problem with an expression (java/io/ObjectInputStream.java:1188: Variable "value" cannot be initialized by a value of type "int" [JLS 4.5.4]) Which compiler do you use ??? please rewrite: char value = default_initialize ? 0 : this.realInputStream.readChar (); as: char value = default_initialize ? (char)0 : this.realInputStream.readChar (); see also: java/io/ObjectInputStream.java:1223: Variable "value" cannot be initialized by a value of type "int" [JLS 4.5.4] I believe this is a compiler error, not an error in the code. `value' is not being initialized with a value of type int, but with a value of type char. JLS 15.24: The type of a conditional expression is determined as follows: ... Otherwise, if the second and third operands have numeric type, then there are several cases: ... If one of the operands is of type T where T is byte, short, or char, and the other operand is a constant expression of type int whose value is representable in type T, then the type of the conditional expression is T. ... -- Geoff Berry
KJC and GNU Classpath
Hi, At DMS we tried to compile GNU Classpath with KJC (http://www.dms.at/kjc) and we encoutered some problems. First of all, we were not able to properly generate the makefiles from the CVS repository. Here is what we did on an intel station with RH6.1: vgp% cvs co classpath vgp% cd classpath vgp% aclocal vgp% autoheader configure.in:41: warning: AC_TRY_RUN called without default to allow cross compiling vgp% automake vgp% autoconf configure.in:41: warning: AC_TRY_RUN called without default to allow cross compiling vgp% ./configure --with-jikes --with-javah=/usr/local/packages/jdk118/bin/javah --with-classlib=/usr/local/packages/jdk118/lib/classes.zip --with-japhar=/tmp/japhar-0.08 vgp% make Making all in lib make[1]: Entering directory `/tmp/classpath/lib' /bin/sh -c "/usr/bin/jikes -nowarn -classpath ..:../vm/reference:.:/usr/local/packages/jdk118/lib/classes.zip +CSO +M +F -d . @classes" make[1]: *** [compile-classes] Segmentation fault make[1]: Leaving directory `/tmp/classpath/lib' make: *** [all-recursive] Error 1 vgp% jikes -version ... Version 1.06 (17 Sep 99) by Philippe Charles and David Shields, IBM Research. we tried by hand but we encoutered the following problems: command: cd classpath/lib; java -mx12800 at.dms.kjc.Main --verbose --nowrite @classes Introspector: = ../java/beans/Introspector.java:23: Package gnu.java.beans not found in import. import gnu.java.beans.*; ComponentBeanInfo: == ../gnu/java/beans/info/ComponentBeanInfo.java:23: Package gnu.java.beans not found in import. import gnu.java.beans.*; AWTEvent: = ../java/awt/AWTEvent.java is missing from lib/classes ObjectInputStream: == problem with an expression (java/io/ObjectInputStream.java:1188: Variable "value" cannot be initialized by a value of type "int" [JLS 4.5.4]) Which compiler do you use ??? please rewrite: char value = default_initialize ? 0 : this.realInputStream.readChar (); as: char value = default_initialize ? (char)0 : this.realInputStream.readChar (); see also: java/io/ObjectInputStream.java:1223: Variable "value" cannot be initialized by a value of type "int" [JLS 4.5.4] WeakHashMap: java/util/WeakHashMap.java:336: Cannot access field "queue" it is in an other package and not a class member [JLS 15.10] And we also have the following problem that is a bug in KJC: java/util/AbstractList.java:410: Invalid outer class for this operation [JLS 15.7.2] we will try to fix it today. Could you fix these problems and send us an email ([EMAIL PROTECTED]) when it's available on your CVS ? Vincent for DMS http://www.dms.at
Re: KJC and GNU Classpath
Vincent GAY-PARA [EMAIL PROTECTED] writes: Hi, At DMS we tried to compile GNU Classpath with KJC (http://www.dms.at/kjc) and we encoutered some problems. First of all, we were not able to properly generate the makefiles from the CVS repository. Here is what we did on an intel station with RH6.1: vgp% cvs co classpath vgp% cd classpath vgp% aclocal vgp% autoheader configure.in:41: warning: AC_TRY_RUN called without default to allow cross compiling vgp% automake vgp% autoconf configure.in:41: warning: AC_TRY_RUN called without default to allow cross compiling vgp% ./configure --with-jikes --with-javah=/usr/local/packages/jdk118/bin/javah --with-classlib=/usr/local/packages/jdk118/lib/classes.zip --with-japhar=/tmp/japhar-0.08 Okay, first of all you don't want to use the --with-jikes if you are intent upon trying to compile with kjc, however I don't think our compilation method supports java/kjc equivalents from CVS at the moment. Essentially what has to be done is to use lib/makefile.dep (generated via jikes and perl) and some combination of classes.dep and java.dep to create the appropriate Makefile syntax. I've been waiting to do this for a while since jikes 1.11 should have the needed code but has not been released. I believe that Jikes 1.06 which you have will not work because it segfaults as you notice. Jikes 1.09 and 1.10 should not segfault in the way we use it. See http://www10.software.ibm.com/developerworks/opensource/jikes/index.html. vgp% make Making all in lib make[1]: Entering directory `/tmp/classpath/lib' /bin/sh -c "/usr/bin/jikes -nowarn -classpath ..:../vm/reference:.:/usr/local/packages/jdk118/lib/classes.zip +CSO +M +F -d . @classes" make[1]: *** [compile-classes] Segmentation fault make[1]: Leaving directory `/tmp/classpath/lib' make: *** [all-recursive] Error 1 vgp% jikes -version ... Version 1.06 (17 Sep 99) by Philippe Charles and David Shields, IBM Research. we tried by hand but we encoutered the following problems: command: cd classpath/lib; java -mx12800 at.dms.kjc.Main --verbose --nowrite @classes According to the documentation I think you'd want to do something like the above but changed to cd classpath/lib; java -mx12800 at.dms.kjc.Main --verbose --nowrite `cat classes`, since I did not see the "@classes" syntax documented on your web page, but if it works that's great. Introspector: = ../java/beans/Introspector.java:23: Package gnu.java.beans not found in import. import gnu.java.beans.*; ComponentBeanInfo: == ../gnu/java/beans/info/ComponentBeanInfo.java:23: Package gnu.java.beans not found in import. import gnu.java.beans.*; This package exists in classpath/gnu/java/beans/ so something is probably wrong with how you're trying to compile. AWTEvent: = ../java/awt/AWTEvent.java is missing from lib/classes It appears that AWTEvent is not part of the compile, see classpath/lib/standard.omit. ObjectInputStream: == problem with an expression (java/io/ObjectInputStream.java:1188: Variable "value" cannot be initialized by a value of type "int" [JLS 4.5.4]) Which compiler do you use ??? please rewrite: char value = default_initialize ? 0 : this.realInputStream.readChar (); as: char value = default_initialize ? (char)0 : this.realInputStream.readChar (); see also: java/io/ObjectInputStream.java:1223: Variable "value" cannot be initialized by a value of type "int" [JLS 4.5.4] Okay, I made these changes in CVS. WeakHashMap: java/util/WeakHashMap.java:336: Cannot access field "queue" it is in an other package and not a class member [JLS 15.10] This is a problem with how WeakBucket is setup I believe. It doesn't make much sense to me why we would call the super constructor with a package private data member that isn't even initialized in java/lang/ref/Reference.java except in this same constructor. There is also the problem mentioned above of queue being in another package. I think Jochen Hoenicke should look at this. And we also have the following problem that is a bug in KJC: java/util/AbstractList.java:410: Invalid outer class for this operation [JLS 15.7.2] we will try to fix it today. Could you fix these problems and send us an email ([EMAIL PROTECTED]) when it's available on your CVS ? lyta:~$ cvs -d :pserver:[EMAIL PROTECTED]:/cvs/public co kjc-suite cvs server: cannot find module `kjc-suite' - ignored Could you fix this problem and let the classpath list know when you have ([EMAIL PROTECTED])? I'd also like to know when you fix the AbstractList problem above. Brian -- Brian Jones [EMAIL PROTECTED]
Re: KJC and GNU Classpath
Hi, On Tue, Dec 28, 1999 at 05:35:44PM +0100, Vincent GAY-PARA wrote: First of all, we were not able to properly generate the makefiles from the CVS repository. [...] we tried by hand but we encoutered the following problems: command: cd classpath/lib; java -mx12800 at.dms.kjc.Main --verbose --nowrite @classes I am a bit intimidated by the Makefiles so what I do is something like: jikes -classpath .:vm/reference `find java gnu/java vm/reference -name "*.java"` or with kaffe and kjc: kaffe -classpath ~/jars/kjc-1.4B-plus.jar:/usr/local/share/kaffe/Klasses.jar at.dms.kjc.Main -classpath .:vm/reference `find java gnu/java vm/reference -name "*.java"` (Look no non-free software used :) But then you need: - The following file from libgcj (attached): - java/text/DecimalFormat.java - Stubs for the following classes (all attached): - java.applet.Applet - java.awt.font.TextHitInfo - java.awt.ActiveEvent - java.awt.Event (adapted from libgcj) - java.util.jar.Attributes/JarEntry/JarFile/Manifest (I have an almost completed implemented of java.util.jar, but then you also need to get java.util.zip from libgcj) - Bug fixes for the following files (diffs attached) - gnu/java/awt/peer/gtk/Test.java - gnu/java/awt/peer/gtk/TestAWT.java - java/lang/Double.java - java/lang/Float.java - java/net/JarURLConnection.java - java/text/ChoiceFormat.java - java/text/DecimalFormatSymbols.java - java/text/NumberFormat.java Have fun, Mark DecimalFormat.java.gz stubs.tar.gz diffs.gz