[Cython] Cython 0.16 issue Windows with Mingw32

Nathan Dunfield nmd at illinois.edu
Mon Apr 23 17:58:00 CEST 2012

I've encountered the following issue with Cython 0.16 on Windows with using the Mingw32 compiler (I'm using Python 3.2 here, but I don't think that's the issue):

$ python3 setup.py build -c mingw32
running build
running build_py
running build_ext
skipping 'SnapPy.c' Cython extension (up-to-date)
building 'snappy.SnapPy' extension
c:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Iheaders -Iunix_kit -Iaddl_code -I. -Ipari/pari-2.3.4/include/ -Ipari/pari-2.3.4/include/pari -Ic:\Python32\include -Ic:\Python32\PC -c SnapPy.c -o build\temp.win32-3.2\Release\snappy.o
SnapPy.c: In function `__pyx_f_6snappy_6SnapPy_13Triangulation_build_rep_into_Sn':
SnapPy.c:25187: warning: implicit declaration of function `fg_get_num_orig_gens'
SnapPy.c:25423: warning: implicit declaration of function `candidateSn_is_valid'
SnapPy.c:25435: warning: implicit declaration of function `candidateSn_is_transitive'
SnapPy.c: At top level:
SnapPy.c:76434: error: initializer element is not constant
SnapPy.c:76434: error: (near initialization for `__pyx_CyFunctionType_type.tp_call')
error: command 'gcc' failed with exit status 1

The problem seems to be in the code that's pulled in from CythonFunction.c.   I apologize for not providing a more minimal example (the above code is available at "hg clone static-http://math.uic.edu/t3m/hg/SnapPy") but the small module I tried didn't pull in the CythonFunction.c code. 



More information about the cython-devel mailing list