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

2009-12-14 Thread Olli Wang
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.(Main.j:26)
Could not find the main class: pypy.Main. Program will exit.


==
Error messages on Snow Leopard (I also tried to fix the "Adobe Unit
Types.osax" by following this page (
http://www.davidchinphoto.com/snow-leopard-and-adobe-unit-types-osax/), but
still failed.)

2009-12-14 18:25:20.913 java[9944:1707] Error loading
/Library/ScriptingAdditions/Adobe Unit Types copy.osax/Contents/MacOS/Adobe
Unit Types:  dlopen(/Library/ScriptingAdditions/Adobe Unit Types
copy.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found.
 Did find:
 /Library/ScriptingAdditions/Adobe Unit Types copy.osax/Contents/MacOS/Adobe
Unit Types: no matching architecture in universal wrapper
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.(Main.j:26)
java: OpenScripting.framework - scripting addition
"/Library/ScriptingAdditions/Adobe Unit Types copy.osax" declares no
loadable handlers.
2009-12-14 18:25:20.923 java[9944:1707] Error loading
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit
Types:  dlopen(/Library/ScriptingAdditions/Adobe Unit
Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found.
 Did find:
 /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit
Types: no matching architecture in universal wrapper
java: OpenScripting.framework - scripting addition
"/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable
handlers.

-- 
Olli Wang

OLLI WANG PRODUCTIONS - http://olliwang.com
A BLOG ABOUT MY LIFE AND MY WORK
___
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev

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

2009-12-14 Thread Antonio Cuni
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.(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
___
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev


Re: [pypy-dev] Advice needed debugging a Sys.exit error involving py.py and Stackless.py

2009-12-14 Thread Carl Friedrich Bolz
Hi Andrew,

On 12/12/2009 01:02 AM, Andrew Francis wrote:
 > I am trying to add a new function, stackless.select() to the 
Stackless.py module. This select() is loosely based on the select() in 
Newsqueak/Go. Once I get this select() to work, I would like to figure 
out some Python
 > syntax to support it. One step deeper into PyPy :-)
 >
 > For the most part, select() is pretty straightforward to implement.
 > In two of my test cases, test4.py and test5.py, the select() function 
seems to work. Unfortunately, I get a sys.exit() error.

unfortunately I don't really have time to dig deeply into your code. I 
just wanted to give you the following hint: if you install greenlets for 
CPython, you can test the lib/stackless.py code on top of CPython.

This makes it possible to distinguish problems in the pure app-level 
code in lib/stackless.py from problems in the RPython-implementation of 
coroutines in PyPy. Given that you are changing the applevel code only, 
it is much more likely that the problem is actually caused by something 
you changed.

Cheers,

Carl Friedrich

___
pypy-dev@codespeak.net
http://codespeak.net/mailman/listinfo/pypy-dev