[pypy-dev] Problems translating PyPy to Java

Jan Wedel Jan.Wedel at ettex.de
Wed Oct 7 14:03:12 CEST 2009


Hmmm, downloaded VS2008. Now, it starts to do something strange and 
displays colored ASCII art of Mandelbrot pictures.

During the process, I got several errors and warnings such as:

[platform:ERROR] platcheck_3.c
[platform:ERROR] c:\windows\temp\usession-3\platcheck_3.c(1) : fatal 
error C1083
: Datei (Include) kann nicht geöffnet werden: "sys/time.h": No such file 
or dire
Ctory

[geninterp:WARNING] skipped classmethod: <bound method classobj.fromkeys 
of <cla
ss UserDict.UserDict at 0x00CA1300>>

[platform:ERROR] platcheck_10.c
[platform:ERROR] c:\windows\temp\usession-3\platcheck_10.c(15) : error 
C2065: 'g
ettimeofday': nichtdeklarierter Bezeichner

............................
[annrpython:WARNING] make_sure_not_resized called, but has no effect 
since list_
comprehension is off
[annrpython:WARNING] make_sure_not_resized called, but has no effect 
since list_
comprehension is off
.
[annrpython:WARNING] make_sure_not_resized called, but has no effect 
since list_
comprehension is off
.................

[rtyper] specializing: 19900 / 49722 blocks   (40%)
*************%%%%%
[rtyper:WARNING] compute_unique_id() is not fully supported on ootype
*************%%%%%%%%%%%%
[rtyper] specializing: 22500 / 49865 blocks   (45%)


And at the end:

[rtyper] specializing: 48800 / 50785 blocks   (96%)
[rtyper] -=- specialized 50785 blocks -=-
*
[rtyper:WARNING] prebuilt instance Ellipsis has no attribute 'errno'
**
[rtyper] -=- specialized 8 more blocks -=-
[translation:info] ootype back-end optimisations...
[backendopt:inlining] phase with threshold factor: 32.4
[backendopt:inlining] heuristic: 
pypy.translator.backendopt.inline.inlining_heur
istic
*************%%%%%%%%%%%%%%########%%%%%%%%%**
[Timer] Timings:
[Timer] annotate                       --- 367.1 s
[Timer] rtype_ootype                   --- 125.8 s
[Timer] backendopt_ootype              ---   7.0 s
[Timer] ==========================================
[Timer] Total:                         --- 500.0 s
[translation:ERROR] Error:
[translation:ERROR]  Traceback (most recent call last):
[translation:ERROR]    File "C:\Dokumente und Einstellungen\Jan 
Wedel\Eigene Dat
eien\repo\trunk\rialto\tools\pypy-1.1.0\pypy\translator\goal\translate.p
y", line
 273, in main

Whats the problem now? Do I need to install these additional libraries 
even if want to translate to Java? 

Regards, Jan

-----Ursprüngliche Nachricht-----
Von: Amaury Forgeot d'Arc [mailto:amauryfa at gmail.com] 
Gesendet: Mittwoch, 7. Oktober 2009 11:18
An: Jan Wedel
Cc: pypy-dev at codespeak.net
Betreff: Re: [pypy-dev] Problems translating PyPy to Java

Hello,

2009/10/7 Jan Wedel <Jan.Wedel at ettex.de>:
> Ok, I tried to translate PyPy to Java using
>
> ./translate.py --backend=jvm targetpypystandalone.py
>
> But it tried to call the MS Compiler cl.exe which I dont have. Im
> wondering why? This results in several errors (see below).
>
> Whats happening?

I'm afraid you will need a C compiler to translate pypy: the jvm
backend starts with the C implementation of functions, and ultimately
replaces system calls with java methods.

If you have the mingw32 compiler installed (and in your PATH), you may
try with the --cc=mingw32 option.

-- 
Amaury Forgeot d'Arc





More information about the Pypy-dev mailing list