Compiler errors in CppSupport.cpp

13 views
Skip to first unread message

Michael Hollis

unread,
Aug 4, 2017, 11:53:09 AM8/4/17
to Caffe Users
Hey, 

My name's Mike and I'm new to Caffe. I've been able compile from source minus the python wrapper. I tried today to compile Caffe and PyCaffe but I  get a compile error in CppSupport.cpp. Below is a copy of the outputq

Building CXX object python/CMakeFiles/pycaffe.dir/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp.o

/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:53:1: warning: identifier ‘decltype’ is a keyword in C++11 [-Wc++0x-compat]
 auto to_python_from_expr(T &&value) -> decltype(to_python(
 ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp: In function ‘void __Pyx_CppExn2PyErr()’:
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:13:24: error: ‘PyErr_Occurred’ was not declared in this scope
     if (PyErr_Occurred())
                        ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:18:21: error: ‘PyExc_MemoryError’ was not declared in this scope
     PyErr_SetString(PyExc_MemoryError, exn.what());
                     ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:18:50: error: ‘PyErr_SetString’ was not declared in this scope
     PyErr_SetString(PyExc_MemoryError, exn.what());
                                                  ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:20:21: error: ‘PyExc_TypeError’ was not declared in this scope
     PyErr_SetString(PyExc_TypeError, exn.what());
                     ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:20:48: error: ‘PyErr_SetString’ was not declared in this scope
     PyErr_SetString(PyExc_TypeError, exn.what());
                                                ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:22:21: error: ‘PyExc_TypeError’ was not declared in this scope
     PyErr_SetString(PyExc_TypeError, exn.what());
                     ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:22:48: error: ‘PyErr_SetString’ was not declared in this scope
     PyErr_SetString(PyExc_TypeError, exn.what());
                                                ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:24:21: error: ‘PyExc_ValueError’ was not declared in this scope
     PyErr_SetString(PyExc_ValueError, exn.what());
                     ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:24:49: error: ‘PyErr_SetString’ was not declared in this scope
     PyErr_SetString(PyExc_ValueError, exn.what());
                                                 ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:26:21: error: ‘PyExc_ValueError’ was not declared in this scope
     PyErr_SetString(PyExc_ValueError, exn.what());
                     ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:26:49: error: ‘PyErr_SetString’ was not declared in this scope
     PyErr_SetString(PyExc_ValueError, exn.what());
                                                 ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:30:21: error: ‘PyExc_IOError’ was not declared in this scope
     PyErr_SetString(PyExc_IOError, exn.what());
                     ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:30:46: error: ‘PyErr_SetString’ was not declared in this scope
     PyErr_SetString(PyExc_IOError, exn.what());
                                              ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:33:21: error: ‘PyExc_IndexError’ was not declared in this scope
     PyErr_SetString(PyExc_IndexError, exn.what());
                     ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:33:49: error: ‘PyErr_SetString’ was not declared in this scope
     PyErr_SetString(PyExc_IndexError, exn.what());
                                                 ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:35:21: error: ‘PyExc_OverflowError’ was not declared in this scope
     PyErr_SetString(PyExc_OverflowError, exn.what());
                     ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:35:52: error: ‘PyErr_SetString’ was not declared in this scope
     PyErr_SetString(PyExc_OverflowError, exn.what());
                                                    ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:37:21: error: ‘PyExc_ArithmeticError’ was not declared in this scope
     PyErr_SetString(PyExc_ArithmeticError, exn.what());
                     ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:37:54: error: ‘PyErr_SetString’ was not declared in this scope
     PyErr_SetString(PyExc_ArithmeticError, exn.what());
                                                      ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:39:21: error: ‘PyExc_ArithmeticError’ was not declared in this scope
     PyErr_SetString(PyExc_ArithmeticError, exn.what());
                     ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:39:54: error: ‘PyErr_SetString’ was not declared in this scope
     PyErr_SetString(PyExc_ArithmeticError, exn.what());
                                                      ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:41:21: error: ‘PyExc_RuntimeError’ was not declared in this scope
     PyErr_SetString(PyExc_RuntimeError, exn.what());
                     ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:41:51: error: ‘PyErr_SetString’ was not declared in this scope
     PyErr_SetString(PyExc_RuntimeError, exn.what());
                                                   ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:45:21: error: ‘PyExc_RuntimeError’ was not declared in this scope
     PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
                     ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:45:60: error: ‘PyErr_SetString’ was not declared in this scope
     PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
                                                            ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp: At global scope:
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:53:1: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
 auto to_python_from_expr(T &&value) -> decltype(to_python(
 ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:53:28: error: expected ‘,’ or ‘...’ before ‘&&’ token
 auto to_python_from_expr(T &&value) -> decltype(to_python(
                            ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:53:40: error: expected type-specifier before ‘decltype’
 auto to_python_from_expr(T &&value) -> decltype(to_python(
                                        ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:53:40: error: expected initializer before ‘decltype’
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:54:138: error: expected unqualified-id before ‘)’ token
       typename pythonic::returnable<typename std::remove_cv<typename std::remove_reference<T>::type>::type>::type{std::forward<T>(value)}))
                                                                                                                                          ^
/home/mhollis/Development/caffe/python/env/lib/python2.7/site-packages/Cython/Utility/CppSupport.cpp:9:13: warning: ‘void __Pyx_CppExn2PyErr()’ defined but not used [-Wunused-function]
 static void __Pyx_CppExn2PyErr() {


OS: ubuntu 16.04 LTS
master commit SHA:  4efdf7ee49cffefdd7ea099c00dc5ea327640f04
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

Let me know if you need any other info.

Best,
Mike.


Reply all
Reply to author
Forward
0 new messages