hrldcpr / hungarian

Hungarian / Munkres' algorithm for the linear assignment problem, in Python
MIT License
71 stars 22 forks source link

help! having a problem installing #2

Closed lusann closed 12 years ago

lusann commented 12 years ago

I have python and numpy installed. I'm trying 'python setup.py build', and this is what I see - help?

$ python setup.py build running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src build_src building extension "hungarian" sources build_src: building npy-pkg config files running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext customize UnixCCompiler customize UnixCCompiler using build_ext building 'hungarian' extension compiling C++ sources C compiler: g++ -fno-strict-aliasing -fno-common -dynamic -arch i386 -DNDEBUG -g -O3 -arch i386

compile options: '-I/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/7.3/include/python2.7 -c' g++: hungarian.cpp hungarian.cpp: In function ‘PyObject* hungarian(PyObject, PyObject)’: hungarian.cpp:76: error: jump to label ‘error’ hungarian.cpp:38: error: from here hungarian.cpp:45: error: crosses initialization of ‘npy_intp* strides’ hungarian.cpp:76: error: jump to label ‘error’ hungarian.cpp:32: error: from here hungarian.cpp:45: error: crosses initialization of ‘npyintp* strides’ hungarian.cpp: In function ‘PyObject* hungarian(PyObject, PyObject_)’: hungarian.cpp:76: error: jump to label ‘error’ hungarian.cpp:38: error: from here hungarian.cpp:45: error: crosses initialization of ‘npy_intp* strides’ hungarian.cpp:76: error: jump to label ‘error’ hungarian.cpp:32: error: from here hungarian.cpp:45: error: crosses initialization of ‘npy_intp* strides’ error: Command "g++ -fno-strict-aliasing -fno-common -dynamic -arch i386 -DNDEBUG -g -O3 -arch i386 -I/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/7.3/include/python2.7 -c hungarian.cpp -o build/temp.macosx-10.5-i386-2.7/hungarian.o" failed with exit status 1

atomos commented 12 years ago

Same error I had, see ticket #1. I just replaced the goto's with the code in the error label. It compiled successfully after that. However, I ran into a python error after that (see the ticket) that I wasn't able to solve.

hrldcpr commented 12 years ago

I just pushed a quick fix to the compile errors, but as you can see in #1 there are still issues, which I'll hopefully be able to look at this weekend. Thanks for the input, should be back in working order soon!