[pypy-dev] pypy-jvm doesn't work?

Antonio Cuni anto.cuni at gmail.com
Mon Dec 14 11:39:59 CET 2009


Hi Olli,

Olli Wang wrote:
> Hi, I tried to execute the compiled Python interpreter with jvm backend 
> on both Gentoo Linux(amd64) and Snow Leopard. 
> But unfortunately both of them failed to start. I simply ran 
> "./translate.py --backend=jvm targetpypystandalone.py" and "pypy-jvm" on 
> both computer. Do I miss something? Thanks.
> 
> ==
> Error messages on Gentoo Linux (amd64)
> 
> Exception in thread "main" java.lang.VerifyError: (class: 
> pypy/ConstantInit_0, method: constant_init signature: ()V) Expecting to 
> find long on stack
> at pypy.ConstantInit.init(ConstantInit.j:6)
> at pypy.Main.<clinit>(Main.j:26)
> Could not find the main class: pypy.Main. Program will exit.

I suppose it's a 32/64 bit issue again: the problem is that when you run 
./translate.py with a 64 bit python, it assumes that 'int' variables are 64 
bits, but on the JVM they are always 32 bit. For what I know, the CLI backend 
has exactly the same problem.

As a workaround, you can try to run translate.py under a 32bit chroot (which 
works for sure, as I use it daily to develop pypy) or with a 32bit python 
(which should work, but I've never tried).

ciao,
Anto



More information about the Pypy-dev mailing list