I'm trying to build scikit-learn library for Python which has it's build files as c++ files in a Windows 32-bit system. While building I get the following error.
undefined reference to `__sync_fetch_and_add_4'
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: build\temp
.win32-2.7\Release\sklearn\ensemble\_gradient_boosting.o: bad reloc address 0x0
in section `.data'
collect2.exe: error: ld returned 1 exit status
error: Command "g++ -shared build\temp.win32-2.7\Release\sklearn\ensemble\_gradi
ent_boosting.o -LC:\Python27\libs -LC:\Python27\PCbuild -Lbuild\temp.win32-2.7 -
lpython27 -lmsvcr90 -o build\lib.win32-2.7\sklearn\ensemble\_gradient_boosting.p
yd" failed with exit status 1
What is the reason for this? What does that first line mean about an undefined reference? How do I resolve this?
Your question lacks quite a few essential information like the version of Python you are using but I guess it's 2.7 going by the error message. Did you try to build this on any other platform? I hear Fedora is pretty good for this kind of stuff.