Hello, I'm trying to translate PyPy into pypy-c on FreeBSD 7.0 but at the beginning of the translation process I get the following error, NotImplementedError("don't know how to get the C-level errno!") from the file "pypy/rpython/lltypesystem/ll2ctypes.py". How can I solve this problem? It seems it's python-ctypes related. I'm using Python 2.5.3 (from ports tree) and when I tried to build the port "devel/py-ctypes", it told me that ctypes was provided with Python 2.5.x. Thanks! Gabriel -- Gabriel Lavoie glavoie@gmail.com
There is no reasonable, reliable way of getting errno under different operating systems. That's why we introduced per-system hack at the very bottom of ll2ctypes that tries to get errno. Can you think about a way to do it on FreeBSD? There is also nice, generic way to do it on top of python2.6, if you're up to trying it on it, I can provide the fix (it's not implemented yet). Cheers, fijal On Fri, Nov 21, 2008 at 4:13 AM, Gabriel Lavoie <glavoie@gmail.com> wrote:
Hello, I'm trying to translate PyPy into pypy-c on FreeBSD 7.0 but at the beginning of the translation process I get the following error,
NotImplementedError("don't know how to get the C-level errno!")
from the file "pypy/rpython/lltypesystem/ll2ctypes.py". How can I solve this problem? It seems it's python-ctypes related. I'm using Python 2.5.3 (from ports tree) and when I tried to build the port "devel/py-ctypes", it told me that ctypes was provided with Python 2.5.x.
Thanks!
Gabriel
-- Gabriel Lavoie glavoie@gmail.com
_______________________________________________ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
PyPy is currently building on my FreeBSD 7 with no problem at the moment. I'll be able to tell more later. I had to modify a few files and create a new platform to specify some include/lib paths. I'll have to see with you Marciej on the best way to integrate that. About "errno", FreeBSD 7 does it the Darwin way, probably to be POSIX compliant. Else, there are a few includes that have to be added and some lib incudes that have to be removed in order to pass the platform_check part. As I write these lines, the translation just failed with the following trace: [rtyper] specializing: 76200 / 83054 blocks (91%) [rtyper] specializing: 79800 / 83054 blocks (96%) [rtyper] -=- specialized 83054 blocks -=- ****************%%%%%%%%%%%%%%%%%%%%%************+++++++++...................... ..%........................................................+++++++++++++++++++++ ...*#%+..............................................++++++ [rtyper] specializing: 83100 / 85101 blocks (97%) [Timer] Timings: [Timer] annotate --- 516.9 s [Timer] rtype_lltype --- 443.3 s [Timer] ========================================== [Timer] Total: --- 960.2 s [translation:ERROR] Error: [translation:ERROR] Traceback (most recent call last): [translation:ERROR] File "translate.py", line 275, in main [translation:ERROR] drv.proceed(goals) [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/translator/driver.py", line 805, in proceed [translation:ERROR] return self._execute(goals, task_skip = self._maybe_skip()) [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/translator/tool/taskengine.py", line 116, in _execute [translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds) [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/translator/driver.py", line 269, in _do [translation:ERROR] res = func() [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/translator/driver.py", line 344, in task_rtype_lltype [translation:ERROR] crash_on_first_typeerror=insist) [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/rpython/rtyper.py", line 180, in specialize [translation:ERROR] self.specialize_more_blocks() [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/rpython/rtyper.py", line 252, in specialize_more_blocks [translation:ERROR] annmixlevel.finish() [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/rpython/annlowlevel.py", line 240, in finish [translation:ERROR] self.finish_rtype() [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/rpython/annlowlevel.py", line 290, in finish_rtype [translation:ERROR] rtyper.specialize_more_blocks() [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/rpython/rtyper.py", line 226, in specialize_more_blocks [translation:ERROR] self.specialize_block(block) [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/rpython/rtyper.py", line 347, in specialize_block [translation:ERROR] self.gottypererror(e, block, hop.spaceop, newops) [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/rpython/rtyper.py", line 345, in specialize_block [translation:ERROR] self.translate_hl_to_ll(hop, varmapping) [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/rpython/rtyper.py", line 474, in translate_hl_to_ll [translation:ERROR] resultvar = hop.dispatch() [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/rpython/rtyper.py", line 709, in dispatch [translation:ERROR] return translate_meth(self) [translation:ERROR] File "<codegen /home/wildchild/devel/pypy-dist/pypy/rpython/rtyper.py:558>", line 5, in translate_op_eq [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/rpython/rint.py", line 161, in rtype_eq [translation:ERROR] return _rtype_compare_template(hop, 'eq') [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/rpython/rint.py", line 268, in _rtype_compare_template [translation:ERROR] return hop.genop(repr.opprefix+func, vlist, resulttype=Bool) [translation:ERROR] File "/home/wildchild/devel/pypy-dist/pypy/rpython/rmodel.py", line 339, in _get_opprefix [translation:ERROR] self.lowleveltype) [translation:ERROR] TyperError: arithmetic not supported on <INT> [translation:ERROR] .. block@60 with 2 exits(v443) [translation:ERROR] .. v445 = eq(result_0, v444) [translation] start debugger...
/home/wildchild/devel/pypy-dist/pypy/rpython/rmodel.py(339)_get_opprefix() -> self.lowleveltype) (Pdb+)
Any idea? Thanks Gabriel 2008/11/21 Maciej Fijalkowski <fijall@gmail.com>
There is no reasonable, reliable way of getting errno under different operating systems. That's why we introduced per-system hack at the very bottom of ll2ctypes that tries to get errno. Can you think about a way to do it on FreeBSD? There is also nice, generic way to do it on top of python2.6, if you're up to trying it on it, I can provide the fix (it's not implemented yet).
Cheers, fijal
Hello, I'm trying to translate PyPy into pypy-c on FreeBSD 7.0 but at the beginning of the translation process I get the following error,
NotImplementedError("don't know how to get the C-level errno!")
from the file "pypy/rpython/lltypesystem/ll2ctypes.py". How can I solve
On Fri, Nov 21, 2008 at 4:13 AM, Gabriel Lavoie <glavoie@gmail.com> wrote: this
problem? It seems it's python-ctypes related. I'm using Python 2.5.3 (from ports tree) and when I tried to build the port "devel/py-ctypes", it told me that ctypes was provided with Python 2.5.x.
Thanks!
Gabriel
-- Gabriel Lavoie glavoie@gmail.com
_______________________________________________ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
-- Gabriel Lavoie glavoie@gmail.com
participants (2)
-
Gabriel Lavoie
-
Maciej Fijalkowski