From njs at pobox.com Thu May 5 20:42:08 2011 From: njs at pobox.com (Nathaniel Smith) Date: Thu, 5 May 2011 11:42:08 -0700 Subject: [Cython] [SciPy-User] Scikits.sparse build issue In-Reply-To: References: <565dfdb6-56e8-41df-b69f-eaabc02002a7@k22g2000yqh.googlegroups.com> Message-ID: On Thu, May 5, 2011 at 3:03 AM, Anand Patil wrote: > > On May 4, 8:16?pm, Nathaniel Smith wrote: >> On Tue, May 3, 2011 at 10:10 AM, Nathaniel Smith wrote: >> > On Tue, May 3, 2011 at 5:51 AM, Anand Patil >> > 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 From njs at pobox.com Thu May 5 20:57:15 2011 From: njs at pobox.com (Nathaniel Smith) Date: Thu, 5 May 2011 11:57:15 -0700 Subject: [Cython] [SciPy-User] Scikits.sparse build issue In-Reply-To: References: <565dfdb6-56e8-41df-b69f-eaabc02002a7@k22g2000yqh.googlegroups.com> Message-ID: Hi guys - Please apply: https://github.com/cython/cython/pull/31 Thanks, -- Nathaniel On Thu, May 5, 2011 at 11:42 AM, Nathaniel Smith wrote: > 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 >