Pauli Virtanen | 11 Jun 2012 21:12
Picon
Picon
Favicon

[Cython] Cython 1.6 & compilation failure on MinGW?

Hi,

We ran with Scipy to a compilation failure on MinGW in Cython code:

http://projects.scipy.org/scipy/ticket/1673

interpnd.c:10580: error: initializer element is not constant
interpnd.c:10580: error: (near initialization for
`__pyx_CyFunctionType_type.tp_call')

Can be fixed like this:

...
+static PyObject *__Pyx_PyCFunction_Call_wrap(PyObject *a, PyObject *b,
PyObject *c)
+{
+    return __Pyx_PyCFunction_Call(a, b, c);
+}
 static PyTypeObject __pyx_CyFunctionType_type = {
     PyVarObject_HEAD_INIT(0, 0)
     __Pyx_NAMESTR("cython_function_or_method"),
 <at>  <at>  -10577,7 +10581,7  <at>  <at>  static PyTypeObject __pyx_CyFunctionType_type = {
     0,
     0,
     0,
-    __Pyx_PyCFunction_Call,
+    __Pyx_PyCFunction_Call_wrap,
     0,
     0,
     0,
(Continue reading)

mark florisson | 11 Jun 2012 21:17
Picon
Gravatar

Re: [Cython] Cython 1.6 & compilation failure on MinGW?

On 11 June 2012 20:12, Pauli Virtanen <pav <at> iki.fi> wrote:
> Hi,
>
> We ran with Scipy to a compilation failure on MinGW in Cython code:
>
> http://projects.scipy.org/scipy/ticket/1673
>
> interpnd.c:10580: error: initializer element is not constant
> interpnd.c:10580: error: (near initialization for
> `__pyx_CyFunctionType_type.tp_call')
>
> Can be fixed like this:
>
> ...
> +static PyObject *__Pyx_PyCFunction_Call_wrap(PyObject *a, PyObject *b,
> PyObject *c)
> +{
> +    return __Pyx_PyCFunction_Call(a, b, c);
> +}
>  static PyTypeObject __pyx_CyFunctionType_type = {
>     PyVarObject_HEAD_INIT(0, 0)
>     __Pyx_NAMESTR("cython_function_or_method"),
>  <at>  <at>  -10577,7 +10581,7  <at>  <at>  static PyTypeObject __pyx_CyFunctionType_type = {
>     0,
>     0,
>     0,
> -    __Pyx_PyCFunction_Call,
> +    __Pyx_PyCFunction_Call_wrap,
>     0,
>     0,
(Continue reading)

Pauli Virtanen | 11 Jun 2012 21:24
Picon
Picon
Favicon

Re: [Cython] Cython 1.6 & compilation failure on MinGW?

11.06.2012 21:17, mark florisson kirjoitti:
[clip]
> Thanks, could you provide a pull request? That makes it easier to
> merge and assign credit.

Ok, I'll try to not only just complain :)

BRB,

	Pauli

Pauli Virtanen | 11 Jun 2012 21:27
Picon
Picon
Favicon

Re: [Cython] Cython 1.6 & compilation failure on MinGW?

11.06.2012 21:17, mark florisson kirjoitti:
[clip]
> Thanks, could you provide a pull request? That makes it easier to
> merge and assign credit.

Ok, this one seemed to already have been fixed in Cython master.

	Pauli


Gmane