[Cython] build failure on windows with 0.21b2 windows py27 x64

Dirk Rothe thecere at gmail.com
Sat Sep 6 10:02:53 CEST 2014


On Fri, 05 Sep 2014 20:47:47 +0200, Stefan Behnel <stefan_ml at behnel.de>  
wrote:

> Dirk Rothe schrieb am 01.09.2014 um 12:25:
>>>> I've also tested with windows+py27+x64 and I get the same errors;
>>>>
>>>> configobj.c(42437) : error C2121: '#' : invalid character : possibly  
>>>> the
>>>> result of a macro expansion
>>>> configobj.c(42437) : error C2146: syntax error : missing ')' before
>>>> identifier 'ifdef'
>>>> configobj.c(42437) : error C2121: '#' : invalid character : possibly  
>>>> the
>>>> result of a macro expansion
>>>> configobj.c(42439) : error C2059: syntax error : 'else'
>>>> configobj.c(42449) : error C2059: syntax error : '}'
>>>> configobj.c(42463) : error C2121: '#' : invalid character : possibly  
>>>> the
>>>> result of a macro expansion
>>>> configobj.c(42463) : error C2121: '#' : invalid character : possibly  
>>>> the
>>>> result of a macro expansion
>>>> error: command '"C:\Program Files (x86)\Microsoft Visual Studio
>>>> 9.0\VC\BIN\amd64\cl.exe"' failed with exit status 2
>>
>> Here we go, I have annotated the start/end with line numbers:
>>
>> #if CYTHON_COMPILING_IN_CPYTHON ## Line 42431
>> static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func,
>> PyObject *arg) {
>>     if (likely(PyCFunction_Check(func)
>> #ifdef __Pyx_CyFunction_USED
>>             || PyObject_TypeCheck(func, __pyx_CyFunctionType)
>> #endif
>>             ) && likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
>>         return __Pyx_PyObject_CallMethO(func, arg);
>>     } else {
>>         PyObject *result;
>>         PyObject *args = PyTuple_New(1);
>>         if (unlikely(!args)) return NULL;
>> [...]
>
> Thanks. My guess is that the macro nesting is a bit too heavy for MSVC
> here. I pushed a change to the master branch that simplifies it. Could  
> you
> give it another try?
>
> https://github.com/cython/cython/commit/2a1f74aac867fee81e2ddf073f16519f3f454bac

Thanks Stefan! The latest Trunk works fine for me now.

--dirk


More information about the cython-devel mailing list