Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native backend failed to build with Cython 0.20.1 #32

Open
neocxi opened this issue Sep 22, 2015 · 1 comment
Open

Native backend failed to build with Cython 0.20.1 #32

neocxi opened this issue Sep 22, 2015 · 1 comment

Comments

@neocxi
Copy link

neocxi commented Sep 22, 2015

Building native backend with Cython 0.20.1 will result in Cython compiler crash:

/root/deeprl/cgt/src/cycgt.pyx:109:30: Compiler crash in CreateClosureClasses

ModuleNode.body = StatListNode(cycgt.pyx:1:0)
StatListNode.stats[16] = StatListNode(cycgt.pyx:107:5)
StatListNode.stats[0] = CFuncDefNode(cycgt.pyx:107:5,
 args = [...]/2,
 modifiers = [...]/0,
 needs_closure = True,
 visibility = u'private')
CFuncDefNode.body = StatListNode(cycgt.pyx:108:4,
 is_terminator = True)
StatListNode.stats[0] = ReturnStatNode(cycgt.pyx:109:4,
 is_terminator = True)
ReturnStatNode.value = SimpleCallNode(cycgt.pyx:109:16,
 analysed = True,
 is_temp = 1,
 result_is_used = True,
 use_managed_ref = True)
SimpleCallNode.arg_tuple = TupleNode(cycgt.pyx:109:16,
 is_sequence_constructor = 1,
 is_temp = 1,
 result_is_used = True,
 use_managed_ref = True)
TupleNode.args[0] = GeneratorExpressionNode(cycgt.pyx:109:30,
 genexpr_name = u'genexpr1',
 is_temp = 1,
 name = u'genexpr',
 needs_closure = True,
 needs_self_code = True,
 pymethdef_cname = u'__pyx_mdef_5cycgt_12cgt2py_tuple_1genexpr',
 result_is_used = True,
 use_managed_ref = True)

Compiler crash traceback from this point on:
 File "Visitor.py", line 170, in Cython.Compiler.Visitor.TreeVisitor._visit (Cython/Compiler/Visitor.c:4285)
 File "/usr/lib/python2.7/dist-packages/Cython/Compiler/ParseTreeTransforms.py", line 2364, in visit_LambdaNode
 self.create_class_from_scope(node.def_node, self.module_scope, node)
 File "/usr/lib/python2.7/dist-packages/Cython/Compiler/ParseTreeTransforms.py", line 2342, in create_class_from_scope
 type=cscope.scope_class.type,
AttributeError: 'ClosureScope' object has no attribute 'scope_class'

Maybe we can consider having a version lower bound for Cython mentioned either in Readme or checked in make tool?

@hojonathanho
Copy link
Contributor

Good idea. For development, we pretty much use the latest version of all the dependencies, so Cython 0.23.2 should definitely work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants