Hello everyone,<br><br>I&#39;m trying to get my head around PyPy (hoping maybe to participate in the PyPy sprint at EuroPython), and following the getting-started guide on the Web site. Translating pypy with the C backend worked with no problems on my machine, but neither the JVM nor CLI backends work. (I tried both the pypy-dist version and the SVN trunk.)<br>
<br>The stacktrace for the error is:<br> Traceback (most recent call last):<br>   File &quot;translate.py&quot;, line 273, in main<br>    drv.proceed(goals)<br>   File &quot;C:\Src\pypy\pypy\translator\driver.py&quot;, line 704, in proceed<br>
    return self._execute(goals, task_skip = self._maybe_skip())<br>   File &quot;C:\Src\pypy\pypy\translator\tool\taskengine.py&quot;, line 116, in _execute<br>    res = self._do(goal, taskcallable, *args, **kwds)<br>   File &quot;C:\Src\pypy\pypy\translator\driver.py&quot;, line 267, in _do<br>
    res = func()<br>   File &quot;C:\Src\pypy\pypy\translator\driver.py&quot;, line 395, in task_backendopt_ootype<br>    backend_optimizations(self.translator)<br>   File &quot;C:\Src\pypy\pypy\translator\backendopt\all.py&quot;, line 80, in backend_optimizations<br>
    inline_heuristic=heuristic)<br>   File &quot;C:\Src\pypy\pypy\translator\backendopt\all.py&quot;, line 156, in inline_malloc_removal_phase<br>    call_count_pred=call_count_pred)<br>   File &quot;C:\Src\pypy\pypy\translator\backendopt\inline.py&quot;, line 779, in auto_inline_graphs<br>
    call_count_pred=call_count_pred)<br>   File &quot;C:\Src\pypy\pypy\translator\backendopt\inline.py&quot;, line 750, in auto_inlining<br>    call_count_pred, cleanup=False)<br>   File &quot;C:\Src\pypy\pypy\translator\backendopt\inline.py&quot;, line 108, in inline_function<br>
    return inliner.inline_all()<br>   File &quot;C:\Src\pypy\pypy\translator\backendopt\inline.py&quot;, line 217, in inline_all<br>    self.inline_once(block, index_operation)<br>   File &quot;C:\Src\pypy\pypy\translator\backendopt\inline.py&quot;, line 244, in inline_once<br>
    self.translator, self.raise_analyzer):<br>   File &quot;C:\Src\pypy\pypy\translator\backendopt\inline.py&quot;, line 160, in any_call_to_raising_graphs<br>    if does_raise_directly(graph_or_something, raise_analyzer):<br>
   File &quot;C:\Src\pypy\pypy\translator\backendopt\inline.py&quot;, line 153, in does_raise_directly<br>    if raise_analyzer.can_raise(op):<br>   File &quot;C:\Src\pypy\pypy\translator\backendopt\canraise.py&quot;, line 33, in can_raise<br>
    return self.analyze(op, seen)<br>   File &quot;C:\Src\pypy\pypy\translator\backendopt\graphanalyze.py&quot;, line 38, in analyze<br>    return self.analyze_external_call(op)<br>   File &quot;C:\Src\pypy\pypy\translator\backendopt\canraise.py&quot;, line 21, in analyze_external_call<br>
    fnobj = deref(op.args[0].value)<br>   File &quot;C:\Src\pypy\pypy\rpython\typesystem.py&quot;, line 153, in deref<br>    assert isinstance(ootype.typeOf(obj), ootype.OOType)<br> AssertionError<br><br>When I evaluate &#39;obj&#39; with the pdb, I get:<br>
(Pdb+) p obj<br>&lt;* fn CryptGenRandom&gt;<br><br>As far as I understand, the problem happens because the &#39;posix&#39; module under Win32 implements &#39;urandom&#39; by calling the native CryptGetRandom function through rffi, but there is no mapping for this call under the JVM and CLI backends.<br>
<br>What would be the proper way to fix this problem? (Or maybe I&#39;m doing something that&#39;s not supposed to work at all at this stage of the project?)<br><br>(Looks like my question should be at least partly answered by the &quot;OO backends&quot; section of the document at <a href="http://codespeak.net/pypy/dist/pypy/doc/rffi.html">http://codespeak.net/pypy/dist/pypy/doc/rffi.html</a> but unfortunately all it says is &quot;XXX to be written&quot;.)<br>
<br>Thanks in advance for your help!<br><br>Dmitry<br>