Skip to content

Instantly share code, notes, and snippets.

@ialong
Created December 16, 2014 18:12
Show Gist options
  • Save ialong/159ee33c6c3717d75c6d to your computer and use it in GitHub Desktop.
Save ialong/159ee33c6c3717d75c6d to your computer and use it in GitHub Desktop.
Python Mod issue
[100%] [100%] Building CXX object src/interfaces/python_modular/CMakeFiles/_python_modular.dir/modshogunPYTHON_wrap.cxx.o
Building CXX object src/interfaces/python_modular/CMakeFiles/_python_modular.dir/sg_print_functions.cpp.o
In file included from /Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:6314:
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1760:
/usr/local/lib/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by " \
^
1 warning generated.
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:1473:25: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
if (((obj)->ob_type == &PyClass_Type)) {
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:1473:25: note: remove extraneous parentheses around the comparison to silence this warning
if (((obj)->ob_type == &PyClass_Type)) {
~ ^ ~
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:1473:25: note: use '=' to turn this equality comparison into an assignment
if (((obj)->ob_type == &PyClass_Type)) {
^~
=
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:6350:26: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
if (((py_obj)->ob_type == &PyInstance_Type)) return "instance";
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:6350:26: note: remove extraneous parentheses around the comparison to silence this warning
if (((py_obj)->ob_type == &PyInstance_Type)) return "instance";
~ ^ ~
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:6350:26: note: use '=' to turn this equality comparison into an assignment
if (((py_obj)->ob_type == &PyInstance_Type)) return "instance";
^~
=
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:7677:17: error: expected member name or ';' after declaration specifiers
static bool {
~~~~~~~~~~~ ^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:7685:17: error: expected member name or ';' after declaration specifiers
static bool {
~~~~~~~~~~~ ^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:7692:15: error: expected unqualified-id
inline bool {
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:7764:17: error: expected member name or ';' after declaration specifiers
static bool {
~~~~~~~~~~~ ^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8425:5: error: expected member name or ';' after declaration specifiers
{
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8370:42: error: member initializer '_seq' does not name a non-static data member or base class
SwigPySequence_Cont(PyObject* seq) : _seq(0)
^~~~~~~
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8375:7: error: use of undeclared identifier '_seq'; did you mean 'seq'?
_seq = seq;
^~~~
seq
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8370:35: note: 'seq' declared here
SwigPySequence_Cont(PyObject* seq) : _seq(0)
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8376:22: error: use of undeclared identifier '_seq'; did you mean 'seq'?
( ((PyObject*)(_seq))->ob_refcnt++) ;
^~~~
seq
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8370:35: note: 'seq' declared here
SwigPySequence_Cont(PyObject* seq) : _seq(0)
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8381:17: error: use of undeclared identifier '_seq'
do { if ((_seq) == __null) ; else do { if ( --((PyObject*)(_seq))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(_seq)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(_seq)))); } while (0); } while (0);
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8381:66: error: use of undeclared identifier '_seq'
do { if ((_seq) == __null) ; else do { if ( --((PyObject*)(_seq))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(_seq)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(_seq)))); } while (0); } while (0);
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8381:128: error: use of undeclared identifier '_seq'
do { if ((_seq) == __null) ; else do { if ( --((PyObject*)(_seq))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(_seq)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(_seq)))); } while (0); } while (0);
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8381:185: error: use of undeclared identifier '_seq'
do { if ((_seq) == __null) ; else do { if ( --((PyObject*)(_seq))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(_seq)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(_seq)))); } while (0); } while (0);
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8386:53: error: use of undeclared identifier '_seq'
return static_cast<size_type>(PySequence_Size(_seq));
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8396:23: error: use of undeclared identifier '_seq'
return iterator(_seq, 0);
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8401:29: error: use of undeclared identifier '_seq'
return const_iterator(_seq, 0);
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8406:23: error: use of undeclared identifier '_seq'
return iterator(_seq, size());
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8411:29: error: use of undeclared identifier '_seq'
return const_iterator(_seq, size());
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8416:24: error: use of undeclared identifier '_seq'
return reference(_seq, n);
^
/Users/Ale/shogun/build/src/interfaces/python_modular/modshogunPYTHON_wrap.cxx:8421:30: error: use of undeclared identifier '_seq'
return const_reference(_seq, n);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
make[2]: *** [src/interfaces/python_modular/CMakeFiles/_python_modular.dir/modshogunPYTHON_wrap.cxx.o] Error 1
make[1]: *** [src/interfaces/python_modular/CMakeFiles/_python_modular.dir/all] Error 2
make: *** [all] Error 2
@besser82
Copy link

Currently there is strange stuff going on with LLVM 6 + Accelerate-Framework 6 on Mac OSX 10.10 Yosemite… :(

We are currently working on getting compilation running with mp-gcc-49, see shogun-toolbox/shogun#2635

@evbsnray
Copy link

evbsnray commented Sep 6, 2023

Could you please let me know what version of Python you used while coding for ANPR?
We are stuck @ cell 26 SVM=get_SVM() ( we are using Python V.3.12)
Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment