[Cython] [SciPy-User] Scikits.sparse build issue

Nathaniel Smith njs at pobox.com
Thu May 5 20:58:29 CEST 2011


Whoops, looks like we passed each other :-)

My patch has a few other fixes you might want to apply too, since I
figured I should probably double-check the rest of the 'enum's in
there too -- I don't know if they'd cause problems in practice, but...

On Thu, May 5, 2011 at 11:46 AM, Dag Sverre Seljebotn
<d.s.seljebotn at astro.uio.no> wrote:
> On 05/05/2011 08:42 PM, Nathaniel Smith wrote:
>>
>> On Thu, May 5, 2011 at 3:03 AM, Anand Patil
>> <anand.prabhakar.patil at gmail.com>  wrote:
>>>
>>> On May 4, 8:16 pm, Nathaniel Smith<n... at pobox.com>  wrote:
>>>>
>>>> On Tue, May 3, 2011 at 10:10 AM, Nathaniel Smith<n... at pobox.com>  wrote:
>>>>>
>>>>> On Tue, May 3, 2011 at 5:51 AM, Anand Patil
>>>>> <anand.prabhakar.pa... at 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...
>
> Awh. Thanks!
>
> https://github.com/cython/cython/commit/a6ec50077990a9767695896076a8b573a5bdccc0
>
> Dag Sverre
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> http://mail.python.org/mailman/listinfo/cython-devel
>


More information about the cython-devel mailing list