-
Notifications
You must be signed in to change notification settings - Fork 6
Python setup.py install 报错 #5
Description
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:92:5: error: ‘UMatData’ does not name a type
UMatData* allocate(PyObject* o, int dims, const int* sizes, int type, size_t* step) const
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:106:5: error: ‘UMatData’ does not name a type
UMatData* allocate(int dims0, const int* sizes, int type, void* data, size_t* step, int flags, UMatUsageFlags usageFlags) const
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:139:19: error: ‘UMatData’ has not been declared
bool allocate(UMatData* u, int accessFlags, UMatUsageFlags usageFlags) const
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:139:49: error: ‘UMatUsageFlags’ has not been declared
bool allocate(UMatData* u, int accessFlags, UMatUsageFlags usageFlags) const
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:147:21: error: ‘UMatData’ has not been declared
void deallocate(UMatData* u) const
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp: In constructor ‘NumpyAllocator::NumpyAllocator()’:
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:89:39: error: ‘getStdAllocator’ is not a member of ‘cv::Mat’
NumpyAllocator() { stdAllocator = Mat::getStdAllocator(); }
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp: In member function ‘bool NumpyAllocator::allocate(int*, int, int) const’:
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:144:65: error: no matching function for call to ‘cv::MatAllocator::allocate(int*&, int&, int&) const’
return stdAllocator->allocate(u, accessFlags, usageFlags);
^
In file included from /home/zh/python-seetaface2/src/include/ndarray_converter.h:5:0,
from /home/zh/python-seetaface2/src/api/ndarray_converter.cpp:4:
/usr/include/opencv2/core/core.hpp:1471:18: note: candidate: virtual void cv::MatAllocator::allocate(int, const int*, int, _Atomic_word*&, uchar*&, uchar*&, size_t*)
virtual void allocate(int dims, const int* sizes, int type, _Atomic_word*& refcount,
^
/usr/include/opencv2/core/core.hpp:1471:18: note: candidate expects 7 arguments, 3 provided
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp: In member function ‘void NumpyAllocator::deallocate(int*) const’:
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:152:22: error: request for member ‘urefcount’ in ‘* u’, which is of non-class type ‘int’
CV_Assert(u->urefcount >= 0);
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:153:22: error: request for member ‘refcount’ in ‘* u’, which is of non-class type ‘int’
CV_Assert(u->refcount >= 0);
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:154:15: error: request for member ‘refcount’ in ‘* u’, which is of non-class type ‘int’
if(u->refcount == 0)
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:156:41: error: request for member ‘userdata’ in ‘* u’, which is of non-class type ‘int’
PyObject* o = (PyObject*)u->userdata;
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp: At global scope:
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:165:16: error: cannot declare variable ‘g_numpyAllocator’ to be of abstract type ‘NumpyAllocator’
NumpyAllocator g_numpyAllocator;
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:86:7: note: because the following virtual functions are pure within ‘NumpyAllocator’:
class NumpyAllocator : public MatAllocator
^
In file included from /home/zh/python-seetaface2/src/include/ndarray_converter.h:5:0,
from /home/zh/python-seetaface2/src/api/ndarray_converter.cpp:4:
/usr/include/opencv2/core/core.hpp:1471:18: note: virtual void cv::MatAllocator::allocate(int, const int*, int, _Atomic_word*&, uchar*&, uchar*&, size_t*)
virtual void allocate(int dims, const int* sizes, int type, _Atomic_word*& refcount,
^
/usr/include/opencv2/core/core.hpp:1473:18: note: virtual void cv::MatAllocator::deallocate(_Atomic_word*, uchar*, uchar*)
virtual void deallocate(_Atomic_word* refcount, uchar* datastart, uchar* data) = 0;
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp: In static member function ‘static bool NDArrayConverter::toMat(PyObject*, cv::Mat&)’:
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:334:7: error: ‘class cv::Mat’ has no member named ‘u’
m.u = g_numpyAllocator.allocate(o, ndims, size, type, step);
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:334:63: error: no matching function for call to ‘NumpyAllocator::allocate(PyObject*&, int&, int [33], int&, size_t [33])’
m.u = g_numpyAllocator.allocate(o, ndims, size, type, step);
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:139:10: note: candidate: bool NumpyAllocator::allocate(int*, int, int) const
bool allocate(UMatData* u, int accessFlags, UMatUsageFlags usageFlags) const
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:139:10: note: candidate expects 3 arguments, 5 provided
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp: In static member function ‘static PyObject* NDArrayConverter::toNDArray(const cv::Mat&)’:
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:351:12: error: ‘class cv::Mat’ has no member named ‘u’
if(!p->u || p->allocator != &g_numpyAllocator)
^
/home/zh/python-seetaface2/src/api/ndarray_converter.cpp:357:33: error: ‘class cv::Mat’ has no member named ‘u’
PyObject* o = (PyObject*)p->u->userdata;
^
CMakeFiles/seetaface.dir/build.make:86: recipe for target 'CMakeFiles/seetaface.dir/src/api/ndarray_converter.cpp.o' failed
make[2]: *** [CMakeFiles/seetaface.dir/src/api/ndarray_converter.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/seetaface.dir/all' failed
make[1]: *** [CMakeFiles/seetaface.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "setup.py", line 106, in
zip_safe=False,
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/site-packages/setuptools/init.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/site-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/site-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 173, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 159, in call_command
self.run_command(cmdname)
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 40, in run
self.build_extension(ext)
File "setup.py", line 78, in build_extension
cwd=self.build_temp)
File "/home/zh/anaconda3/envs/pyseeta/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j4']' returned non-zero exit status 2.