[Cython] git master fails to compile scipy

2015-10-10 Thread Julian Taylor via cython-devel
hi,
since ab78f93b3ffa88183a0d2aae6b692e394c51f860 scipy does not build anymore:
the failing file is:
https://github.com/scipy/scipy/blob/master/scipy/sparse/csgraph/_reordering.pyx

error:
Traceback (most recent call last):
  File "/usr/bin/cython", line 8, in 
main(command_line = 1)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py",
line 704, in main
result = compile(sources, options)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py",
line 679, in compile
return compile_multiple(source, options)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py",
line 657, in compile_multiple
result = run_pipeline(source, options, context=context)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py",
line 487, in run_pipeline
err, enddata = Pipeline.run_pipeline(pipeline, source)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Pipeline.py",
line 365, in run_pipeline
data = phase(data)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Pipeline.py",
line 53, in generate_pyx_code_stage
module_node.process_implementation(options, result)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/ModuleNode.py",
line 118, in process_implementation
self.generate_c_code(env, options, result)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/ModuleNode.py",
line 349, in generate_c_code
self.body.generate_function_definitions(env, code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 436, in generate_function_definitions
stat.generate_function_definitions(env, code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 436, in generate_function_definitions
stat.generate_function_definitions(env, code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/FusedNode.py",
line 785, in generate_function_definitions
stat.generate_function_definitions(env, code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 3068, in generate_function_definitions
FuncDefNode.generate_function_definitions(self, env, code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 1935, in generate_function_definitions
self.generate_function_body(env, code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 1691, in generate_function_body
self.body.generate_execution_code(code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 442, in generate_execution_code
stat.generate_execution_code(code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/UtilNodes.py",
line 321, in generate_execution_code
self.body.generate_execution_code(code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 6419, in generate_execution_code
self.body.generate_execution_code(code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 442, in generate_execution_code
stat.generate_execution_code(code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 5865, in generate_execution_code
if_clause.generate_execution_code(code, end_label, is_last=i == last)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 5908, in generate_execution_code
self.body.generate_execution_code(code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 442, in generate_execution_code
stat.generate_execution_code(code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 4800, in generate_execution_code
self.generate_assignment_code(code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 5091, in generate_assignment_code
self.lhs.generate_assignment_code(self.rhs, code)
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/ExprNodes.py",
line 3897, in generate_assignment_code
self.generate_

Re: [Cython] git master fails to compile scipy

2015-10-11 Thread Julian Taylor via cython-devel
thanks,
another file fails too:
https://github.com/scipy/scipy/blob/master/scipy/sparse/csgraph/_shortest_path.pyx

Error compiling Cython file:

...
for k from csr_indptr[j] <= k < csr_indptr[j + 1]:
w12 = csr_weights[k]
ind_k = csr_indices[k]
d2 = dist_matrix[i, ind_k]
if d1 + w12 < d2:
dist_matrix[i, ind_k] = d2 = d1 + w12
   ^


scipy/sparse/csgraph/_shortest_path.pyx:798:56: Compiler crash in
AnalyseExpressionsTransform

ModuleNode.body = StatListNode(_shortest_path.pyx:12:0)
StatListNode.stats[17] = StatListNode(_shortest_path.pyx:770:5)
StatListNode.stats[0] = CFuncDefNode(_shortest_path.pyx:770:5,
args = [...]/6,
modifiers = [...]/0,
visibility = u'private')
File 'Nodes.py', line 430, in analyse_expressions:
StatListNode(_shortest_path.pyx:777:4,
is_terminator = True)
File 'Nodes.py', line 6370, in analyse_expressions:
ForFromStatNode(_shortest_path.pyx:786:4,
relation1 = u'<=',
relation2 = u'<')
File 'Nodes.py', line 430, in analyse_expressions:
StatListNode(_shortest_path.pyx:787:8)
File 'Nodes.py', line 6370, in analyse_expressions:
ForFromStatNode(_shortest_path.pyx:790:8,
relation1 = u'<=',
relation2 = u'<')
File 'Nodes.py', line 430, in analyse_expressions:
StatListNode(_shortest_path.pyx:791:12)
File 'Nodes.py', line 6370, in analyse_expressions:
ForFromStatNode(_shortest_path.pyx:791:12,
relation1 = u'<=',
relation2 = u'<')
File 'Nodes.py', line 430, in analyse_expressions:
StatListNode(_shortest_path.pyx:792:16)
File 'Nodes.py', line 6370, in analyse_expressions:
ForFromStatNode(_shortest_path.pyx:793:16,
relation1 = u'<=',
relation2 = u'<')
File 'Nodes.py', line 430, in analyse_expressions:
StatListNode(_shortest_path.pyx:794:20)
File 'Nodes.py', line 5853, in analyse_expressions:
IfStatNode(_shortest_path.pyx:797:20)
File 'Nodes.py', line 5899, in analyse_expressions:
IfClauseNode(_shortest_path.pyx:797:23)
File 'Nodes.py', line 430, in analyse_expressions:
StatListNode(_shortest_path.pyx:798:24)
File 'Nodes.py', line 4787, in analyse_expressions:
CascadedAssignmentNode(_shortest_path.pyx:798:56,
assignment_overloads = [...]/0)
File 'Nodes.py', line 5157, in analyse_types:
CascadedAssignmentNode(_shortest_path.pyx:798:56,
assignment_overloads = [...]/0)

Compiler crash traceback from this point on:
  File
"/tmp/local/lib/python2.7/site-packages/Cython-0.24.0a0-py2.7-linux-x86_64.egg/Cython/Compiler/Nodes.py",
line 5157, in analyse_types
overloaded = lhs.type.is_cpp_class and env.lookup_operator('=',
[lhs, self.rhs])
AttributeError: 'NoneType' object has no attribute 'is_cpp_class'


On 11.10.2015 07:30, Robert Bradshaw wrote:
> Thanks for the report. This should be fixed with
> https://github.com/cython/cython/commit/eef2bc650945d69158e888653a2f8bd6bbad3db3
> 
> On Sat, Oct 10, 2015 at 2:11 PM, Julian Taylor via cython-devel
>  wrote:
>> hi,
>> since ab78f93b3ffa88183a0d2aae6b692e394c51f860 scipy does not build anymore:
>> the failing file is:
>> https://github.com/scipy/scipy/blob/master/scipy/sparse/csgraph/_reordering.pyx
>>

___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel