On Thu, May 5, 2011 at 3:03 AM, Anand Patil
<anand.prabhakar.pa...@gmail.com> wrote:
>
> On May 4, 8:16 pm, Nathaniel Smith <n...@pobox.com> wrote:
>> On Tue, May 3, 2011 at 10:10 AM, Nathaniel Smith <n...@pobox.com> wrote:
>> > On Tue, May 3, 2011 at 5:51 AM, Anand Patil
>> > <anand.prabhakar.pa...@gmail.com> wrote:
>> >> scikits/sparse/cholmod.c: In function
>> >> ‘__pyx_f_7scikits_6sparse_7cholmod__py_sparse’:
>> >> scikits/sparse/cholmod.c:1713: error: storage size of ‘__pyx_t_10’
>> >> isn’t known
>>
>> >> I've never used Cython and am having a hard time figuring this out.
>>
>> > Could you send me the file 'scikits/sparse/cholmod.c'? This means that
>> > there's some C type that was forward-declared, but never actually
>> > defined, and then we tried to instantiate an instance of it. But I'll
>> > need to see the generated code to figure out which type '__pyx_t_10'
>> > is supposed to be.
>>
>> Huh, this appears to be some bad interaction between numpy and cython,
>> rather than anything to do with my code. The offending variable comes
>> from doing 'cimport numpy as np' and then referring to
>> 'np.NPY_F_CONTIGUOUS' -- this is being translated to:
>>   enum requirements __pyx_t_10;
>>   __pyx_t_10 = NPY_F_CONTIGUOUS;
>> and then gcc is complaining that 'enum requirements' is an undefined type.
>>
>> What version of Numpy and Cython do you have installed?
>
> Cython 0.14.1, Numpy 1.5.1. Which versions do you have?

It looks like with Cython 0.12.1, which is what I was using before, it
happens not to generate a temporary variable in this case, but Cython
0.14.1 generates the temporary variable.

I've just committed a workaround to the scikits.sparse repository:
  
https://code.google.com/p/scikits-sparse/source/detail?r=ad106e9c2c2d55f2022a3fb8b9282003b55666fc#
(I believe it works -- it does compile -- but technically I can't
guarantee it since for me the tests are now failing with an "illegal
instruction" error inside BLAS. But I think this must be an unrelated
Ubuntu screwup. Yay software.)

And I'll see about poking Cython upstream to get this fixed...

-- Nathaniel
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to