I will be migrating to snow leopard (SL) soon, but right now I don't have access to it so I can't help you with that. Although it happens so soon during translation that it should be unrelated to SL. ps: Hope that when someone fixes the error "'GC_local_malloc' not found in library 'gc'" I can try to fix the jit errors on osx. I hate compiler problems in pypy (I always take hours to discover what is wrong) but if noone fix this by tomorrow I will give it a try :) On Oct 1, 2009, at 1:22 AM, Gabriel Lavoie wrote:
Does it help to build pypy-c under Snow Leopard? I'm still using a build I made when my system was still on Leopard as I'm currently unable to build pypy-c under Snow Leopard. It must have something to do with the switch to 64bits as the default GCC target. I did not have more time to investigate yet.
Here's the build error:
[Timer] Timings: [Timer] annotate --- 358.5 s [Timer] ========================================== [Timer] Total: --- 358.5 s [translation:ERROR] Error: [translation:ERROR] Traceback (most recent call last): [translation:ERROR] File "translate.py", line 277, in main [translation:ERROR] drv.proceed(goals) [translation:ERROR] File "/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/translator/driver.py", line 721, in proceed [translation:ERROR] return self._execute(goals, task_skip = self._maybe_skip()) [translation:ERROR] File "/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/translator/tool/taskengine.py", line 116, in _execute [translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds) [translation:ERROR] File "/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/translator/driver.py", line 275, in _do [translation:ERROR] res = func() [translation:ERROR] File "/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/translator/driver.py", line 302, in task_annotate [translation:ERROR] s = annotator.build_types(self.entry_point, self.inputtypes) [translation:ERROR] File "/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/annotation/annrpython.py", line 99, in build_types [translation:ERROR] return self.build_graph_types(flowgraph, inputcells, complete_now=complete_now) [translation:ERROR] File "/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/annotation/annrpython.py", line 190, in build_graph_types [translation:ERROR] self.complete() [translation:ERROR] File "/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/annotation/annrpython.py", line 246, in complete [translation:ERROR] self.processblock(graph, block) [translation:ERROR] File "/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/annotation/annrpython.py", line 471, in processblock [translation:ERROR] self.flowin(graph, block) [translation:ERROR] File "/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/annotation/annrpython.py", line 531, in flowin [translation:ERROR] self.consider_op(block.operations[i]) [translation:ERROR] File "/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/annotation/annrpython.py", line 735, in consider_op [translation:ERROR] raise_nicer_exception(op, str(graph)) [translation:ERROR] File "/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/annotation/annrpython.py", line 732, in consider_op [translation:ERROR] resultcell = consider_meth(*argcells) [translation:ERROR] File "<codegen /Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/annotation/annrpython.py:770>", line 3, in consider_op_setattr [translation:ERROR] File "/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/annotation/unaryop.py", line 760, in setattr [translation:ERROR] setattr(example, s_attr.const, v_lltype._defl()) [translation:ERROR] File "/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/rpython/lltypesystem/lltype.py", line 1033, in __setattr__ [translation:ERROR] " got %r" % (self._T, field_name, T1, T2)) [translation:ERROR] TypeError': <Struct timeval { c_tv_sec, c_tv_usec, c__pad0, c__pad1, c__pad2, c__pad3 }> instance field 'c_tv_usec': [translation:ERROR] expects <INT> [translation:ERROR] got <Signed> [translation:ERROR] .. v1541 = setattr(v1539, ('c_tv_usec'), v1540) [translation:ERROR] .. '(pypy.rlib.rpoll:75)select' [translation:ERROR] Processing block: [translation:ERROR] block@421 is a <class 'pypy.objspace.flow.flowcontext.SpamBlock'> [translation:ERROR] in (pypy.rlib.rpoll:75)select [translation:ERROR] containing the following operations: [translation:ERROR] v1539 = call_args((function malloc), ((1, ('flavor',), False, False)), (Struct timeval), ('raw')) [translation:ERROR] v1542 = simple_call((builtin_function_or_method fmod), timeout_0, (1.0)) [translation:ERROR] v1543 = simple_call((type int), timeout_0) [translation:ERROR] v1544 = setattr(v1539, ('c_tv_sec'), v1543) [translation:ERROR] v1545 = simple_call((type int), timeout_0) [translation:ERROR] v1546 = sub(timeout_0, v1545) [translation:ERROR] v1547 = mul(v1546, (1000000.0)) [translation:ERROR] v1540 = simple_call((type int), v1547) [translation:ERROR] v1541 = setattr(v1539, ('c_tv_usec'), v1540) [translation:ERROR] --end-- [translation] start debugger...
/Users/wildchild/Documents/Programmation/eclipse-workspace/pypy- trunk/pypy/rpython/lltypesystem/lltype.py(1033)__setattr__() -> " got %r" % (self._T, field_name, T1, T2)) (Pdb+)
Gabriel
2009/9/30 Leonardo Santagada <santagada@gmail.com>:
To make compilation and asmgcroot happy on osx I made some changes, I would like to know if someone has anything against applying this stuff to trunk?
Index: pypy/translator/c/gcc/trackgcroot.py =================================================================== --- pypy/translator/c/gcc/trackgcroot.py (revision 68036) +++ pypy/translator/c/gcc/trackgcroot.py (working copy) @@ -22,7 +22,11 @@ r_sectionstart = re.compile(r"\t\.("+'|'.join(OTHERSECTIONS) +").*$") r_functionstart_darwin = re.compile(r"_(\w+):\s*$")
-OFFSET_LABELS = 2**30 +# darwin's ld complain about this hack +if sys.platform == 'darwin': + OFFSET_LABELS = 0 +else: + OFFSET_LABELS = 2**30
# inside functions LABEL = r'([.]?[\w$@]+)' Index: pypy/translator/platform/test/test_darwin.py =================================================================== --- pypy/translator/platform/test/test_darwin.py (revision 68036) +++ pypy/translator/platform/test/test_darwin.py (working copy) @@ -2,8 +2,8 @@ """ File containing darwin platform tests """
-import py, os -if os.name != 'darwin': +import py, sys +if sys.platform != 'darwin': py.test.skip("Darwin only")
from pypy.tool.udir import udir Index: pypy/translator/platform/darwin.py =================================================================== --- pypy/translator/platform/darwin.py (revision 68036) +++ pypy/translator/platform/darwin.py (working copy) @@ -18,7 +18,7 @@ self.cc = cc
def _args_for_shared(self, args): - return (self.shared_only + ['-bundle', '-undefined', 'dynamic_lookup'] + return (self.shared_only + ['-dynamiclib', '-undefined', 'dynamic_lookup'] + args)
def include_dirs_for_libffi(self):
-- Leonardo Santagada santagada at gmail.com
_______________________________________________ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
-- Gabriel Lavoie glavoie@gmail.com
-- Leonardo Santagada santagada at gmail.com