Unable to run a java class by j3

Hey all,
I installed vmkit-0.29 following instructions at
http://vmkit.llvm.org/get_started.html
I attempt to run a simple class file (Hey.class) by j3 and it returns following
error:

# j3 Desktop/Hey

Thread 0x20000000 received a SIGSEGV: either the VM code or an external
native method is bogus. Aborting...
; 0x81e5375 (0x200fec68) in _Z14sigsegvHandleriP7siginfoPv
; 0x440410 (0x200fec88) in __kernel_rt_sigreturn
; 0x8166100 (0x200ff078) in
_ZN2j35Class21lookupMethodDontThrowEPKN3mvm4UTF8ES4_bbPPS0_
; 0x8155c46 (0x200ff0e8) in _ZN2j35Jnjvm13loadBootstrapEv
; 0x8155ed6 (0x200ff158) in _ZN2j35Jnjvm13mainJavaStartEPNS_10JavaThreadE
; 0x81e4c7a (0x200ff248) in _ZN3mvm6Thread19internalThreadStartEPS0_
Aborted

Some other information:
OS: Ubuntu 10.04 (32bit) -> Running on VirtualBox
LLVM-2.9 -> http://llvm.org/releases/download.html#2.9
classpath-0.98
vmkit-0.29 -> http://vmkit.llvm.org/releases/index.html

Thanks,
Sarah

Hi Sarah,

You should use classpath 0.97.2 and not 0.98 (isn’t the error message obvious? :-)).
So please try with classpath 0.97.2, and let me know if it works.

Nicolas

Nicolas Geoffray <nicolas.geoffray <at> gmail.com> writes:

Hi Sarah,

You should use classpath 0.97.2 and not 0.98 (isn't the error message obvious?

).

So please try with classpath 0.97.2, and let me know if it works.

_______________________________________________
LLVM Developers mailing list
LLVMdev <at> cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

No! It didn't work :frowning:
The error still remains....!
Any suggestion?

Did you link the shared libraries? (step 2).

Also, can you send me your configure option?

Nicolas

Nicolas Geoffray <nicolas.geoffray <at> gmail.com> writes:

Did you link the shared libraries? (step 2).

Also, can you send me your configure option?

NicolasOn Wed, Jul 20, 2011 at 3:45 PM, Sarah <sarah.berenji <at> gmail.com>

wrote:

Nicolas Geoffray <nicolas.geoffray <at> gmail.com> writes:
>
>
> Hi Sarah,
>
> You should use classpath 0.97.2 and not 0.98 (isn't the error message

obvious?

).
> So please try with classpath 0.97.2, and let me know if it works.
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev <at> cs.uiuc.edu http://llvm.cs.uiuc.edu>

http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

>
No! It didn't work :frowning:
The error still remains....!
Any suggestion?

_______________________________________________
LLVM Developers mailing listLLVMdev <at> cs.uiuc.edu

http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
LLVMdev <at> cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

I created links in "/usr/local/classpath/lib" where my classpath objects are
installed. Since it didn't work I tried these paths too: in classpath's source
"/usr/local/classpath-0.97.2/lib" & also in "/lib"!! The error didn't change.
As another solution, I used gcc-4.1 to compile classpath. But it didn't work
too.
Here is my configure options:
./configure --with-llvmsrc=/usr/local/llvm-2.9 --with-gnu-classpath-
glibj=/usr/local/classpath/share/classpath --with-gnu-classpath-
libs=/usr/local/classpath/lib --with-llvmobj=/usr/local/llvm-2.9

Using "--with-mmtk-plan" returns the following error: "configure: error:
/bin/bash .//autoconf/config.sub org.mmtk.plan.marksweep.MS failed", so I
committed it assuming it will use the default value.

Hi Sarah,

I created links in “/usr/local/classpath/lib” where my classpath objects are
installed. Since it didn’t work I tried these paths too: in classpath’s source
“/usr/local/classpath-0.97.2/lib” & also in “/lib”!! The error didn’t change.
As another solution, I used gcc-4.1 to compile classpath. But it didn’t work
too.
Here is my configure options:
./configure --with-llvmsrc=/usr/local/llvm-2.9 --with-gnu-classpath-
glibj=/usr/local/classpath/share/classpath --with-gnu-classpath-
libs=/usr/local/classpath/lib --with-llvmobj=/usr/local/llvm-2.9

I suggest not installing gnu classpath, but just work on the local directory where you compiled it. At the end of the compilation process, you should have:
…/classpath-0.97.2/lib/*.so

…/classpath-0.97.2/lib/glibj.zip

Using “–with-mmtk-plan” returns the following error: “configure: error:
/bin/bash .//autoconf/config.sub org.mmtk.plan.marksweep.MS failed”, so I
committed it assuming it will use the default value.

It will get the default which is org.mmtk.plan.marksweep.MS, but the configure error is strange. Could you try with another collector?

Nicolas

Nicolas Geoffray <nicolas.geoffray <at> gmail.com> writes:

Hi Sarah,
I created links in "/usr/local/classpath/lib" where my classpath objects are
installed. Since it didn't work I tried these paths too: in classpath's source
"/usr/local/classpath-0.97.2/lib" & also in "/lib"!! The error didn't change.
As another solution, I used gcc-4.1 to compile classpath. But it didn't work
too.
Here is my configure options:
./configure --with-llvmsrc=/usr/local/llvm-2.9 --with-gnu-classpath-
glibj=/usr/local/classpath/share/classpath --with-gnu-classpath-
libs=/usr/local/classpath/lib --with-llvmobj=/usr/local/llvm-2.9

I suggest not installing gnu classpath, but just work on the local directory

where you compiled it. At the end of the compilation process, you should have:

.../classpath-0.97.2/lib/*.so
.../classpath-0.97.2/lib/glibj.zip

Using "--with-mmtk-plan" returns the following error: "configure: error:
/bin/bash .//autoconf/config.sub org.mmtk.plan.marksweep.MS failed", so I
committed it assuming it will use the default value.

It will get the default which is org.mmtk.plan.marksweep.MS, but the

configure error is strange. Could you try with another collector?

Nicolas

Sorry for delay in response. As you suggested, I didn't install classpath &
thankfully it works!!

cd classpath-0.97.2
./configure CC=/usr/bin/gcc-4.1 --disable-plugin --disable-examples --disable-
Werror
make
cd lib
ln -s ../native/jni/java-lang/.libs/libjavalang.so; (and so on)

cd vmkit-0.29
./configure --with-llvmsrc=/usr/local/llvm-2.9 --with-gnu-classpath-
glibj=/usr/local/classpath-0.97.2/lib --with-gnu-classpath-
libs=/usr/local/classpath-0.97.2/lib --with-llvmobj=/usr/local/llvm-2.9 --
with-mmtk-plan=org.mmtk.plan.copyms.CopyMS
make
cd Release/bin/
./j3 Hey

About "--with-mmtk-plan", in my previouse installations, all other collectors
return the same error. But this time (which classpath didn't install) I used
org.mmtk.plan.copyms.CopyMS & everything runs well :slight_smile:
Thanks for your help :slight_smile: