Dave Hirschfeld | 18 Jul 2012 10:39
Picon

undefined reference to `__sync_fetch_and_sub_4'

I was trying out the new memoryview functionality but I got the error
message in the subject when trying to compile the following simple
example:

cimport cython

import numpy as np
cimport numpy as np

ctypedef np.float64_t float_t

 <at> cython.boundscheck(False) 
 <at> cython.wraparound(False) 
def func(float_t[::1] array):
    return array[0]
#

Some background:
Python 2.7.2 [MSC v.1500 32 bit (Intel)] on win32
Latest Cython from GitHub (0.17pre)
GCC 4.5.2

I initially thought it might be my MinGW was too old so I upgraded to TDM-GCC 
4.6.1.

After upgrading I got the "unrecognized command line option '-mno-cygwin'
" error which I fixed by removing all references to -mno-cygwin in the __init__ 
function of Mingw32CCompiler in Python27/Lib/distutils/cygwinccompiler.py. This 
however only got me back to the error in the subject. 

(Continue reading)


Gmane