On the config.log, I see that javac can't find VMStackWalker (which is jamvm-specific) I added the jamvm classes to the CLASSPATH, then I got this error:
The Java VM jamvm failed (see config.log)
On the config.log, I see that jamvm cannot find java.lang.Class
WTF?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
BTW, don't add JamVM to your path until _after_ you've configured and built GNU Classpath. You don't want GNU Classpath's configure picking JamVM up as a VM, as JamVM won't work without GNU Classpath, which you haven't built yet!
Rob.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm looking for a pre-built classpath-based JDK (no luck yet, I am always get source download). I also tried with eclipse, I dowloaded the libgcj... didn't help. Argh!
However, please note that the INSTALL text file from JamVM 1.5.2 is incorrect, as it suggest building with jikes (which is not supported with classpath 0.98).
Thanks for your help!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I guess you're trying to run JamVM with the prebuilt GNU Classpath? There could be lots of reasons why it's not working.
This is what you should do:
I assume the following :
1) You have jamvm.tar.gz distribution file
2) You have classpath.tar.gz distribution file
3) You have some prebuilt classpath.tar.gz
At this point do not have jamvm in your path.
1) Unpack the prebuilt classpath.tar.gz file. Find in it the glibj.zip file.
2) Unpack the classpath distribution file
3) Configure classpath, adding the following:
--disable-examples --disable-tools --with-glibj-zip=<absolute address of the glibj.zip from the prebuilt classpath>
This will configure Classpath to build the native libraries, etc., but it will not build the Java classes, instead using the prebuilt ones.
(--disable-examples, --disable-tools, may be wrong, I'm doing this from memory. Normally, GNU Classpath will also build examples and tools which also require a Java compiler. The options will be something similar, ./configure --help will show all options)
4) make && make install
5) Unpack JamVM
6) ./configure && make && make install
* This should work, and you will not need a Java compiler or a working Java VM for the Classpath build *
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But still, I've worked out an issue. By using your command, I got this error during compilation:
checking for stdint types... stdint.h (shortcircuit)
make use of stdint.h in include/config-int.h (assuming C99 compatible system)
configure: error: conditional "GCJ_JAVAC" was never defined.
Usually this means the macro was only invoked conditionally.
Guessing that GCJ_JAVAC was never defined, but also never actually used. I manually edited the configured and removed the offending "if" clause.
And only then it worked.
Many many many thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I also try to compile and run the GNU-classpath 0.98 on ubuntu 9.10.
My target is also to run the jamvm..
The problem is, that i always get the error after i have write "make":
cc1: warnings being treated as errors
cpnet.c: In function ‘cpnet_addMembership’:
cpnet.c:583: error: dereferencing type-punned pointer will break strict-aliasing rules
cpnet.c: In function ‘cpnet_dropMembership’:
cpnet.c:598: error: dereferencing type-punned pointer will break strict-aliasing rules
make: *** Fehler 1
make: Verlasse Verzeichnis '/home/tomek/Desktop/classpath-0.98/native/jni/native-lib'
make: *** Fehler 1
make: Verlasse Verzeichnis '/home/tomek/Desktop/classpath-0.98/native/jni'
make: *** Fehler 1
make: Verlasse Verzeichnis '/home/tomek/Desktop/classpath-0.98/native'
make: *** Fehler 1
I hope somebody can give me some tips. It is really no easy to run the jamvm. Another possibility is, to get the jamvm from the ubuntu repository. But there is the Problem, that i will not work, because the classpath is too old (my suggestion).
Best regards
Tomek
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Rob…
First thank you for your support.
After i have change the configuration to ./configure -disable-Werror i get the next error.
I looks so:
gcjwebplugin.cc:65:31: error: nsIPluginInstance.h: No such file or directory
gcjwebplugin.cc:66:35: error: nsIPluginInstancePeer.h: No such file or directory
gcjwebplugin.cc:67:31: error: nsIPluginTagInfo2.h: No such file or directory
gcjwebplugin.cc:149: error: ISO C++ forbids declaration of ‘NS_DEFINE_IID’ with no type
gcjwebplugin.cc:149: error: ‘kIPluginTagInfo2IID’ was not declared in this scope
gcjwebplugin.cc:149: error: ‘NS_IPLUGINTAGINFO2_IID’ was not declared in this scope
gcjwebplugin.cc:149: error: initializer expression list treated as compound expression
gcjwebplugin.cc:207: error: ISO C++ forbids declaration of ‘nsIPluginTagInfo2’ with no type
gcjwebplugin.cc:207: error: expected ‘;’ before ‘*’ token
gcjwebplugin.cc: In function ‘gchar* plugin_get_documentbase(NPP_t*)’:
gcjwebplugin.cc:876: error: ‘nsIPluginInstance’ was not declared in this scope
gcjwebplugin.cc:876: error: ‘xpcom_instance’ was not declared in this scope
gcjwebplugin.cc:877: error: ‘nsIPluginInstancePeer’ was not declared in this scope
gcjwebplugin.cc:877: error: ‘peer’ was not declared in this scope
gcjwebplugin.cc:878: error: ‘nsresult’ was not declared in this scope
gcjwebplugin.cc:878: error: expected ‘;’ before ‘result’
gcjwebplugin.cc:879: error: ‘nsIPluginTagInfo2’ was not declared in this scope
gcjwebplugin.cc:879: error: ‘pluginTagInfo2’ was not declared in this scope
gcjwebplugin.cc:884: error: expected primary-expression before ‘)’ token
gcjwebplugin.cc:898: error: ‘union info_union’ has no member named ‘info_field’
gcjwebplugin.cc:900: error: ‘result’ was not declared in this scope
gcjwebplugin.cc:900: error: ‘kIPluginTagInfo2IID’ was not declared in this scope
gcjwebplugin.cc:920: error: ‘NS_RELEASE’ was not declared in this scope
gcjwebplugin.cc: At global scope:
gcjwebplugin.cc:149: warning: ‘NS_DEFINE_IID’ defined but not used
make: *** Fehler 1
make: Verlasse Verzeichnis '/home/tomek/Desktop/classpath-0.98/native/plugin'
make: *** Fehler 1
make: Verlasse Verzeichnis '/home/tomek/Desktop/classpath-0.98/native'
make: *** Fehler 1
After this error massage i decided to run the configuration with ./configure -disable-Werror -disable-plugin.
The erorr looks so:
I also tested this with gnu-classpath 0.97.2. Only to test if i get successfull with the make on my ubuntu .The configuration was "./configure -disable-Werror". After make i get the the error which looks like the first error with the gcjwebplugin.cc.
Sorry for the long text and the boring error massages but I hope you can help and give me a hint.
Tomek
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello…
Im back again.
Jamvm is working now..
The error massage is always "make: *** Fehler 1 make:".
I thought that that error massage is important, but after "sudo make install", the classpath has been installed.
If somebody has Problems with the java compiler, download the ecj from the ubuntu rep.
Regards, Tomek
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am facing the problem in executing jamvm. I've compiled classpath-0.98 and jamvm-1.5.2 using the instructions specified above. But when I executed the following command, I am getting the following error.
jamvm HelloWorld
Cannot create system class loader
Exception occured while printing exception (java/lang/NoClassDefFoundError)…
Original exception was java/lang/ExceptionInInitializerError
The classpath libraries are present in /usr/local/classpath/share/classpath, and classes.zip is present in /usr/local/jamvm/share/jamvm.
What can be the problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-09-13
gkemot, I had your same exact error. Then I tried classpath-0.96.1 and it compiles perfectly here.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to build GNU Classpath 0.98 and JamVM 1.5.2. Following the JamVM readme, I did 'configure; make; make install' on the jamVM, and it worked.
I then added jamvm and Sun javac to the path. Then with GNU Classpath I did this:
./configure --enable-jni --disable-gtk-peer --disable-gconf-peer --disable-plugin
I got this error:
The javac failed (see config.log)
On the config.log, I see that javac can't find VMStackWalker (which is jamvm-specific) I added the jamvm classes to the CLASSPATH, then I got this error:
The Java VM jamvm failed (see config.log)
On the config.log, I see that jamvm cannot find java.lang.Class
WTF?
The standard javac doesn't work. I use ecj (the Eclipse Java Compiler).
Most Linux distributions should provide a standalone package for ecj.
Rob.
BTW, don't add JamVM to your path until _after_ you've configured and built GNU Classpath. You don't want GNU Classpath's configure picking JamVM up as a VM, as JamVM won't work without GNU Classpath, which you haven't built yet!
Rob.
OK, I have already downloaded the ecj from the eclipse website. But it's a .jar file! How am I supposed to run it without a working JVM?
I'm looking for a pre-built classpath-based JDK (no luck yet, I am always get source download). I also tried with eclipse, I dowloaded the libgcj... didn't help. Argh!
However, please note that the INSTALL text file from JamVM 1.5.2 is incorrect, as it suggest building with jikes (which is not supported with classpath 0.98).
Thanks for your help!
Another question: do you mean that I need ANOTHER JVM installed for installing JamVM and Classpath?
This is really strange!
Finally, I managed to get a precompiled classpath-0.98-1.pkg.tar.gz.
I corrected the broken link from rt.jar to glibj.zip, and I added these files to the classpath, but still it didn't work.
I guess you're trying to run JamVM with the prebuilt GNU Classpath? There could be lots of reasons why it's not working.
This is what you should do:
I assume the following :
1) You have jamvm.tar.gz distribution file
2) You have classpath.tar.gz distribution file
3) You have some prebuilt classpath.tar.gz
At this point do not have jamvm in your path.
1) Unpack the prebuilt classpath.tar.gz file. Find in it the glibj.zip file.
2) Unpack the classpath distribution file
3) Configure classpath, adding the following:
--disable-examples --disable-tools --with-glibj-zip=<absolute address of the glibj.zip from the prebuilt classpath>
This will configure Classpath to build the native libraries, etc., but it will not build the Java classes, instead using the prebuilt ones.
(--disable-examples, --disable-tools, may be wrong, I'm doing this from memory. Normally, GNU Classpath will also build examples and tools which also require a Java compiler. The options will be something similar, ./configure --help will show all options)
4) make && make install
5) Unpack JamVM
6) ./configure && make && make install
* This should work, and you will not need a Java compiler or a working Java VM for the Classpath build *
WOW! It worked!!!!!!
But still, I've worked out an issue. By using your command, I got this error during compilation:
checking for stdint types... stdint.h (shortcircuit)
make use of stdint.h in include/config-int.h (assuming C99 compatible system)
configure: error: conditional "GCJ_JAVAC" was never defined.
Usually this means the macro was only invoked conditionally.
Guessing that GCJ_JAVAC was never defined, but also never actually used. I manually edited the configured and removed the offending "if" clause.
And only then it worked.
Many many many thanks!
Hello…
I also try to compile and run the GNU-classpath 0.98 on ubuntu 9.10.
My target is also to run the jamvm..
The problem is, that i always get the error after i have write "make":
cc1: warnings being treated as errors
cpnet.c: In function ‘cpnet_addMembership’:
cpnet.c:583: error: dereferencing type-punned pointer will break strict-aliasing rules
cpnet.c: In function ‘cpnet_dropMembership’:
cpnet.c:598: error: dereferencing type-punned pointer will break strict-aliasing rules
make: *** Fehler 1
make: Verlasse Verzeichnis '/home/tomek/Desktop/classpath-0.98/native/jni/native-lib'
make: *** Fehler 1
make: Verlasse Verzeichnis '/home/tomek/Desktop/classpath-0.98/native/jni'
make: *** Fehler 1
make: Verlasse Verzeichnis '/home/tomek/Desktop/classpath-0.98/native'
make: *** Fehler 1
I hope somebody can give me some tips. It is really no easy to run the jamvm. Another possibility is, to get the jamvm from the ubuntu repository. But there is the Problem, that i will not work, because the classpath is too old (my suggestion).
Best regards
Tomek
cpnet.c is part of GNU Classpath, not JamVM.
The error you are seeing is a warning. By default GNU Classpath is configured to treat warnings as errors. To turn this off, add
-disable-Werror
to the GNU Classpath configure line, e.g.:
./configure -disable-Werror <rest of arguments>
Rob.
Hello Rob…
First thank you for your support.
After i have change the configuration to ./configure -disable-Werror i get the next error.
I looks so:
gcjwebplugin.cc:65:31: error: nsIPluginInstance.h: No such file or directory
gcjwebplugin.cc:66:35: error: nsIPluginInstancePeer.h: No such file or directory
gcjwebplugin.cc:67:31: error: nsIPluginTagInfo2.h: No such file or directory
gcjwebplugin.cc:149: error: ISO C++ forbids declaration of ‘NS_DEFINE_IID’ with no type
gcjwebplugin.cc:149: error: ‘kIPluginTagInfo2IID’ was not declared in this scope
gcjwebplugin.cc:149: error: ‘NS_IPLUGINTAGINFO2_IID’ was not declared in this scope
gcjwebplugin.cc:149: error: initializer expression list treated as compound expression
gcjwebplugin.cc:207: error: ISO C++ forbids declaration of ‘nsIPluginTagInfo2’ with no type
gcjwebplugin.cc:207: error: expected ‘;’ before ‘*’ token
gcjwebplugin.cc: In function ‘gchar* plugin_get_documentbase(NPP_t*)’:
gcjwebplugin.cc:876: error: ‘nsIPluginInstance’ was not declared in this scope
gcjwebplugin.cc:876: error: ‘xpcom_instance’ was not declared in this scope
gcjwebplugin.cc:877: error: ‘nsIPluginInstancePeer’ was not declared in this scope
gcjwebplugin.cc:877: error: ‘peer’ was not declared in this scope
gcjwebplugin.cc:878: error: ‘nsresult’ was not declared in this scope
gcjwebplugin.cc:878: error: expected ‘;’ before ‘result’
gcjwebplugin.cc:879: error: ‘nsIPluginTagInfo2’ was not declared in this scope
gcjwebplugin.cc:879: error: ‘pluginTagInfo2’ was not declared in this scope
gcjwebplugin.cc:884: error: expected primary-expression before ‘)’ token
gcjwebplugin.cc:898: error: ‘union info_union’ has no member named ‘info_field’
gcjwebplugin.cc:900: error: ‘result’ was not declared in this scope
gcjwebplugin.cc:900: error: ‘kIPluginTagInfo2IID’ was not declared in this scope
gcjwebplugin.cc:920: error: ‘NS_RELEASE’ was not declared in this scope
gcjwebplugin.cc: At global scope:
gcjwebplugin.cc:149: warning: ‘NS_DEFINE_IID’ defined but not used
make: *** Fehler 1
make: Verlasse Verzeichnis '/home/tomek/Desktop/classpath-0.98/native/plugin'
make: *** Fehler 1
make: Verlasse Verzeichnis '/home/tomek/Desktop/classpath-0.98/native'
make: *** Fehler 1
After this error massage i decided to run the configuration with ./configure -disable-Werror -disable-plugin.
The erorr looks so:
make: *** Fehler 1
make: Verlasse Verzeichnis '/home/tomek/Desktop/classpath-0.98/tools'
make: *** Fehler 1
I also tested this with gnu-classpath 0.97.2. Only to test if i get successfull with the make on my ubuntu .The configuration was "./configure -disable-Werror". After make i get the the error which looks like the first error with the gcjwebplugin.cc.
Sorry for the long text and the boring error massages but I hope you can help and give me a hint.
Tomek
Hello…
Im back again.
Jamvm is working now..
The error massage is always "make: *** Fehler 1 make:".
I thought that that error massage is important, but after "sudo make install", the classpath has been installed.
If somebody has Problems with the java compiler, download the ecj from the ubuntu rep.
Regards, Tomek
Hello,
I am facing the problem in executing jamvm. I've compiled classpath-0.98 and jamvm-1.5.2 using the instructions specified above. But when I executed the following command, I am getting the following error.
jamvm HelloWorld
Cannot create system class loader
Exception occured while printing exception (java/lang/NoClassDefFoundError)…
Original exception was java/lang/ExceptionInInitializerError
The classpath libraries are present in /usr/local/classpath/share/classpath, and classes.zip is present in /usr/local/jamvm/share/jamvm.
What can be the problem?
gkemot, I had your same exact error. Then I tried classpath-0.96.1 and it compiles perfectly here.