cvondrick / vatic

Efficiently Scaling Up Video Annotation with Crowdsourced Marketplaces. IJCV 2012
http://mit.edu/vondrick/vatic/
MIT License
597 stars 255 forks source link

Compiler Error : command 'x86_64-linux-gnu-gcc' failed with exit status 1 #77

Open setyawp25 opened 7 years ago

setyawp25 commented 7 years ago

Hi, when I run ./vatic-install.sh

I got this issue,

Please help. Thanks a lot for any responses

vision/svm.cpp:1379:72: error: use of enum ‘solver_type’ without previous declaration tic CYTHON_INLINE PyObject __Pyx_PyInt_From_enum__solver_type(enum solver_type ^ vision/svm.cpp:9174:86: error: use of enum ‘solver_type’ without previous declaration tic CYTHON_INLINE PyObject Pyx_PyInt_From_enumsolver_type(enum solver_type ^ vision/svm.cpp: In function ‘PyObject* Pyx_PyInt_From_enumsolver_type(int)’: vision/svm.cpp:9175:16: error: use of enum ‘solver_type’ without previous declaration const enum solver_type neg_one = (enum solver_type) -1, const_zero = (enum ^ vision/svm.cpp:9175:44: error: use of enum ‘solver_type’ without previous declaration const enum solver_type neg_one = (enum solver_type) -1, const_zero = (enum ^ vision/svm.cpp:9176:39: error: ‘const_zero’ was not declared in this scope const int is_unsigned = neg_one > const_zero; ^ vision/svm.cpp:9178:25: error: use of enum ‘solver_type’ without previous declaration if (sizeof(enum solver_type) < sizeof(long)) { ^ vision/svm.cpp:9180:32: error: use of enum ‘solver_type’ without previous declaration } else if (sizeof(enum solver_type) <= sizeof(unsigned long)) { ^ vision/svm.cpp:9183:32: error: use of enum ‘solver_type’ without previous declaration } else if (sizeof(enum solver_type) <= sizeof(unsigned PY_LONG_LONG)) { ^ vision/svm.cpp:9188:25: error: use of enum ‘solver_type’ without previous declaration if (sizeof(enum solver_type) <= sizeof(long)) { ^ vision/svm.cpp:9191:32: error: use of enum ‘solver_type’ without previous declaration } else if (sizeof(enum solver_type) <= sizeof(PY_LONG_LONG)) { ^ vision/svm.cpp:9199:57: error: use of enum ‘solver_type’ without previous declaration return _PyLong_FromByteArray(bytes, sizeof(enum solver_type), ^ vision/svm.cpp:9200:47: error: in argument to unary ! little, !is_unsigned); ^ error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

hhofner commented 6 years ago

Hi,

I ran into the same problem. What I did to solve this was just to cd into /pyvision/vision/liblinear and edit linear.h Specifically I gave the enum enum { L2R_LR, L2R_L2LOSS_SVC_DUAL, L2R_L2LOSS_SVC, L2R_L1LOSS_SVC_DUAL, MCSVM_CS, L1R_L2LOSS_SVC, L1R_LR }; /* solver_type */ a name: enum solver_type { L2R_LR, L2R_L2LOSS_SVC_DUAL, L2R_L2LOSS_SVC, L2R_L1LOSS_SVC_DUAL, MCSVM_CS, L1R_L2LOSS_SVC, L1R_LR }; /* solver_type */ Before I did this, I downgraded to Cython 0.20.