Re: [pypy-dev] Problems translating PyPy to Java
> In the meantime: could you tell us what is the result of typing "print obj" > and "print ootype.typeOf(obj)" at the pdb prompt? I don't know if its still necessary, but: [translation] start debugger... > c:\dokumente und einstellungen\jan wedel\eigene dateien\repo\trunk\rialto\tool s\pypy-1.1.0\py\io\terminalwriter.py(40)SetConsoleTextAttribute() -> handle, attr) (Pdb+) print obj *** NameError: name 'obj' is not defined (Pdb+) print ootype.typeOf(obj) *** NameError: name 'ootype' is not defined (Pdb+) Anyhow, I will try to use the trunk version. Thanks so far! -J -Ursprüngliche Nachricht- Von: Antonio Cuni [mailto:anto.c...@gmail.com] Gesendet: Mittwoch, 7. Oktober 2009 17:10 An: Jan Wedel Cc: amaur...@gmail.com; pypy-dev@codespeak.net Betreff: Re: [pypy-dev] Problems translating PyPy to Java Jan Wedel wrote: >> c:\dokumente und einstellungen\jan wedel\eigene > dateien\repo\trunk\rialto\tool > s\pypy-1.1.0\pypy\rpython\typesystem.py(153)deref() > -> assert isinstance(ootype.typeOf(obj), ootype.OOType) > (Pdb+) exit uhm, that's weird. I've just tried a jvm translation on a linux machine and it works fine. I don't have any windows machine with JDK to try it by myself, but I'm downloading it right now. In the meantime: could you tell us what is the result of typing "print obj" and "print ootype.typeOf(obj)" at the pdb prompt? Thanks, Anto ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] Problems translating PyPy to Java
Amaury Forgeot d'Arc wrote: >> Jan Wedel wrote: >> c:\dokumente und einstellungen\jan wedel\eigene >>> dateien\repo\trunk\rialto\tool >>> s\pypy-1.1.0\pypy\rpython\typesystem.py(153)deref() >>> -> assert isinstance(ootype.typeOf(obj), ootype.OOType) >>> (Pdb+) exit > > Hey, do you use trunk version, or some release branch? > Recent development is done on trunk... ah, indeed, I didn't notice the 1.1.0. I remember that at post-europython sprint (which was after the 1.1.0 release) I fixed a couple of issues that prevented pypy-jvm to be translated on windows, so if you shoul really use trunk for this. ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] Problems translating PyPy to Java
> Jan Wedel wrote: > >>> c:\dokumente und einstellungen\jan wedel\eigene >> >> dateien\repo\trunk\rialto\tool >> s\pypy-1.1.0\pypy\rpython\typesystem.py(153)deref() >> -> assert isinstance(ootype.typeOf(obj), ootype.OOType) >> (Pdb+) exit Hey, do you use trunk version, or some release branch? Recent development is done on trunk... -- Amaury Forgeot d'Arc ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] Problems translating PyPy to Java
Jan Wedel wrote: >> c:\dokumente und einstellungen\jan wedel\eigene > dateien\repo\trunk\rialto\tool > s\pypy-1.1.0\pypy\rpython\typesystem.py(153)deref() > -> assert isinstance(ootype.typeOf(obj), ootype.OOType) > (Pdb+) exit uhm, that's weird. I've just tried a jvm translation on a linux machine and it works fine. I don't have any windows machine with JDK to try it by myself, but I'm downloading it right now. In the meantime: could you tell us what is the result of typing "print obj" and "print ootype.typeOf(obj)" at the pdb prompt? Thanks, Anto ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] Problems translating PyPy to Java
m.py(153)deref() -> assert isinstance(ootype.typeOf(obj), ootype.OOType) (Pdb+) exit -Ursprüngliche Nachricht----- Von: Amaury Forgeot d'Arc [mailto:amaur...@gmail.com] Gesendet: Mittwoch, 7. Oktober 2009 15:22 An: Jan Wedel Cc: pypy-dev@codespeak.net Betreff: Re: [pypy-dev] Problems translating PyPy to Java 2009/10/7 Jan Wedel : > >> More interesting is the last traceback, but your post truncated it. >> Can you provide a full traceback? > > Actually...no! There is no traceback except what I posted. After this > line, its an unknown (at least to me) debugger and displays a promp > which I exited by typing "exit". Err... no exception type, no message... maybe some kind of out-of-memory condition? -- Amaury Forgeot d'Arc ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] Problems translating PyPy to Java
2009/10/7 Jan Wedel : > >> More interesting is the last traceback, but your post truncated it. >> Can you provide a full traceback? > > Actually...no! There is no traceback except what I posted. After this > line, its an unknown (at least to me) debugger and displays a promp > which I exited by typing "exit". Err... no exception type, no message... maybe some kind of out-of-memory condition? -- Amaury Forgeot d'Arc ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] Problems translating PyPy to Java
> More interesting is the last traceback, but your post truncated it. > Can you provide a full traceback? Actually...no! There is no traceback except what I posted. After this line, its an unknown (at least to me) debugger and displays a promp which I exited by typing "exit". -J -Ursprüngliche Nachricht- Von: Amaury Forgeot d'Arc [mailto:amaur...@gmail.com] Gesendet: Mittwoch, 7. Oktober 2009 15:11 An: Jan Wedel Cc: pypy-dev@codespeak.net Betreff: Re: [pypy-dev] Problems translating PyPy to Java 2009/10/7 Jan Wedel : > Hmmm, downloaded VS2008. Now, it starts to do something strange and > displays colored ASCII art of Mandelbrot pictures. cool. > 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: of 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 The first warnings are normal, they come from conditional code that detects the capabilities of the platform. for example, "sys/time.h" is tried to see if the function "utimes()" can be used. More interesting is the last traceback, but your post truncated it. Can you provide a full traceback? -- Amaury Forgeot d'Arc ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] Problems translating PyPy to Java
2009/10/7 Jan Wedel : > Hmmm, downloaded VS2008. Now, it starts to do something strange and > displays colored ASCII art of Mandelbrot pictures. cool. > 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: of 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 The first warnings are normal, they come from conditional code that detects the capabilities of the platform. for example, "sys/time.h" is tried to see if the function "utimes()" can be used. More interesting is the last traceback, but your post truncated it. Can you provide a full traceback? -- Amaury Forgeot d'Arc ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] Problems translating PyPy to Java
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: > [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:amaur...@gmail.com] Gesendet: Mittwoch, 7. Oktober 2009 11:18 An: Jan Wedel Cc: pypy-dev@codespeak.net Betreff: Re: [pypy-dev] Problems translating PyPy to Java Hello, 2009/10/7 Jan Wedel : > 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 ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
Re: [pypy-dev] Problems translating PyPy to Java
Hello, 2009/10/7 Jan Wedel : > 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 don’t have. I’m > wondering why? This results in several errors (see below). > > What’s 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 ___ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
[pypy-dev] Problems translating PyPy to Java
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 don’t have. I’m wondering why? This results in several errors (see below). What’s happening? Thanks, Jan C:\Dokumente und Einstellungen\Jan Wedel\Eigene Dateien\repo\trunk\rialto\tools\ pypy-1.1.0\pypy\translator\goal>translate.py --backend=jvm targetpypystandalone. py [translation:info] Translating target as defined by targetpypystandalone [platform:error] Could not find a Microsoft Compiler [platform:msg] Setting platform to 'host' cc=None [translation] PyPy config object: [translation] [objspace] [translation] compiler = ast [translation] nofaking = True [translation] [opcodes] [translation] CALL_LIKELY_BUILTIN = True [translation] CALL_METHOD = True [translation] [std] [translation] builtinshortcut = True [translation] getattributeshortcut = True [translation] multimethods = doubledispatch [translation] optimized_list_getitem = True [translation] withmethodcache = True [translation] withmultidict = True [translation] withprebuiltchar = True [translation] withrangelist = True [translation] withshadowtracking = True [translation] withtypeversion = True [translation] [usemodules] [translation] __pypy__ = True [translation] _codecs = True [translation] _pickle_support = True [translation] _random = True [translation] _sre = True [translation] _weakref = True [translation] cStringIO = True [translation] errno = True [translation] gc = True [translation] itertools = True [translation] marshal = True [translation] math = True [translation] md5 = True [translation] operator = True [translation] posix = True [translation] rbench = True [translation] recparser = True [translation] sha = True [translation] symbol = True [translation] time = True [platform:execute] cl.exe /nologo /c /MD /O2 /IC:\Python26\PC c:\windows\temp\us ession-2\gcctest.c /Foc:\windows\temp\usession-2\gcctest.obj [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 257, in main [translation:ERROR] default_goal='compile') [translation:ERROR]File "C:\Dokumente und Einstellungen\Jan Wedel\Eigene Dat eien\repo\trunk\rialto\tools\pypy-1.1.0\pypy\translator\driver.py", line 723, in from_targetspec [translation:ERROR] spec = target(driver, args) [translation:ERROR]File "targetpypystandalone.py", line 202, in target [translation:ERROR] return self.get_entry_point(config) [translation:ERROR]File "targetpypystandalone.py", line 209, in get_entry_po int [translation:ERROR] space = make_objspace(config) [translation:ERROR]File "C:\Dokumente und Einstellungen\Jan Wedel\Eigene Dat eien\repo\trunk\rialto\tools\pypy-1.1.0\pypy\tool\option.py", line 48, in make_o bjspace [translation:ERROR] space = Space(config) [translation:ERROR]File "C:\Dokumente und Einstellungen\Jan Wedel\Eigene Dat eien\repo\trunk\rialto\tools\pypy-1.1.0\pypy\interpreter\baseobjspace.py ", line 265, in __init__ [translation:ERROR] self.initialize() [translation:ERROR]File "C:\Dokumente und Einstellungen\Jan Wedel\Eigene Dat eien\repo\trunk\rialto\tools\pypy-1.1.0\pypy\objspace\std\objspace.py", line 73, in initialize [translation:ERROR] self.model = StdTypeModel(self.config) [translation:ERROR]File "C:\Dokumente und Einstellungen\Jan Wedel\Eigene Dat eien\repo\trunk\rialto\tools\pypy-1.1.0\pypy\objspace\std\model.py", line 88, in __init__ [translation:ERROR] import pypy.objspace.std.marshal_impl # install marshal multimethods [translation:ERROR]File "C:\Dokumente und Einstellungen\Jan Wedel\Eigene Dat eien\repo\trunk\rialto\tools\pypy-1.1.0\pypy\objspace\std\marshal_impl.p y", line 40, in [translation:ERROR] from pypy.module.marshal.interp_marshal import register [translation:ERROR]File "C:\Dokumente und Einstellungen\Jan Wedel\Eigene Dat eien\repo\trunk\rialto\tools\pypy-1.1.0\pypy\module\marshal\interp_marsh al.py", line 4, in [translation:ERROR] from pypy.module._file.interp_file import W_File [translation:ERROR]File "C:\Dokumente und Einstellungen\Jan Wedel\Eigene Dat eien\repo\trunk\rialto\tools\pypy-1.1.0\pypy\module\_file\interp_file.py ", line 3, in [translation:ERROR] from pypy.rlib import streamio [translation:ERROR]File "C:\Dokumente und Einstellungen\Jan Wedel\Eigene Dat eien\repo\trunk\rialto\tools\pypy-1.1.0\pypy\rlib\streamio.py", line 167, in [translation:ER