[Cython] Cython alpha 0.24

Joshua joshua.adelman at gmail.com
Fri Mar 18 11:55:14 EDT 2016



On Friday, March 11, 2016 at 3:24:26 AM UTC-5, Robert Bradshaw wrote:
>
> We are getting ready to push a new major release. A first alpha is up 
> at http://cython.org/release/Cython-0.24a0.tar.gz 
>
> To avoid surprises, please test and report. 
>
> Thanks, 
> Robert 
>


I ran across a compilation error using 0.24a1. It's actually the same error 
that I posted to the list a while back 
(https://groups.google.com/d/msg/cython-users/_ShPVfZAuKA/RxiS0dfRDwAJ), 
but at the time, I didn't have a minimal working example that had been 
extracted from a much more complicated project that I couldn't post 
publicly. 

I now have a minimal demonstration that I've posted here:
https://gist.github.com/synapticarbors/c6268e25ce22e4d04b4d

It fails on both OSX and Windows (using mingw) with traceback:

$ python setup.py build_ext -i
Compiling factors.pyx because it changed.
Compiling xlib.pyx because it changed.
[1/2] Cythonizing factors.pyx
[2/2] Cythonizing xlib.pyx
running build_ext
building 'factors' extension
creating build
creating build/temp.macosx-10.5-x86_64-2.7
gcc -fno-strict-aliasing -I/Users/lev/anaconda/envs/test-cython/include -arch 
x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/Users/lev/
anaconda/envs/test-cython/lib/python2.7/site-packages/numpy/core/include -I/
Users/lev/anaconda/envs/test-cython/include/python2.7 -c factors.c -o build/
temp.macosx-10.5-x86_64-2.7/factors.o -O3 -w
gcc -bundle -undefined dynamic_lookup -L/Users/lev/anaconda/envs/test-cython
/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.5-x86_64-2.7/factors.o -
L/Users/lev/anaconda/envs/test-cython/lib -o /Users/lev/Desktop/av4tmp/
cython-test/factors.so
building 'xlib' extension
gcc -fno-strict-aliasing -I/Users/lev/anaconda/envs/test-cython/include -arch 
x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -I/Users/lev/
anaconda/envs/test-cython/lib/python2.7/site-packages/numpy/core/include -I/
Users/lev/anaconda/envs/test-cython/include/python2.7 -c xlib.c -o build/
temp.macosx-10.5-x86_64-2.7/xlib.o -O3 -w
xlib.c:17371:63: error: too few arguments to function call, expected 3, 
have 1
    __pyx_v_7factors_xarr0 = __Pyx_carray_from_py_xarr__type(o); if (
PyErr_Occurred()) __PYX_ERR(1, 13, __pyx_L2_error);
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
xlib.c:4726:1: note: '__Pyx_carray_from_py_xarr__type' declared here
static int __Pyx_carray_from_py_xarr__type(PyObject *__pyx_v_o, struct 
__pyx_t_15data_structures_xarr_type *__py...
^
xlib.c:20424:13: error: static declaration of '__Pyx_BufFmt_Init' follows 
non-static declaration
static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
            ^
xlib.c:20295:9: note: previous implicit declaration is here
        __Pyx_BufFmt_Init(&ctx, stack, dtype);
        ^
xlib.c:20789:20: error: static declaration of '__Pyx_BufFmt_CheckString' 
follows non-static declaration
static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const 
char* ts) {
                   ^
xlib.c:20296:14: note: previous implicit declaration is here
        if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
             ^
3 errors generated.
error: command 'gcc' failed with exit status 1

It fails similarly with Cython 0.23.4. It compiles without error using 
Cython 0.22.1, which is what I'm using in production. 

It looks like a possible codegen error to me since the function call 
doesn't match the prototype, but it's deep enough in the cython internals 
that I'll defer to a Cython developer.

Any help with this would be very much appreciated.

Thanks,
Josh
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20160318/ce37fac9/attachment-0001.html>


More information about the cython-devel mailing list