kyamagu / paperdoll

Paper doll parser implementation from ICCV 2013
http://vision.is.tohoku.ac.jp/~kyamagu/research/paperdoll/
Other
83 stars 21 forks source link

Error in bdb.make #9

Open tammytammy opened 6 years ago

tammytammy commented 6 years ago

Hi, I am facing the following error when I try to compile the binaries. I use Matlab R2017b with Ubuntu 17.10. Would you help me how to solve this problem? Thank you.

/usr/local/MATLAB/R2017b/bin/mex -cxx -largeArrayDims -Iinclude -I/usr/include/opencv src/+cv/threshold.cpp -lMxArray -Llib -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn -lopencv_dpm -lopencv_fuzzy -lopencv_hdf -lopencv_line_descriptor -lopencv_optflow -lopencv_plot -lopencv_reg -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_rgbd -lopencv_viz -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_face -lopencv_video -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_xobjdetect -lopencv_objdetect -lopencv_ml -lopencv_xphoto -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_photo -lopencv_imgproc -lopencv_core -o +cv/threshold.mexa64
Unknown MEX argument '-o'.
Makefile:31: recipe for target '+cv/threshold.mexa64' failed
make: *** [+cv/threshold.mexa64] Error 255
make: Nothing to be done for 'all'.
mex -largeArrayDims /home/User1/Research/paperdoll-v1.0/lib/matlab-bdb/src/cursor_api.cc /home/User1/Research/paperdoll-v1.0/lib/matlab-bdb/src/db_api.cc /home/User1/Research/paperdoll-v1.0/lib/matlab-bdb/src/env_api.cc /home/User1/Research/paperdoll-v1.0/lib/matlab-bdb/src/libbdbmex.cc /home/User1/Research/paperdoll-v1.0/lib/matlab-bdb/src/mex/arguments.cc /home/User1/Research/paperdoll-v1.0/lib/matlab-bdb/src/mex/function.cc /home/User1/Research/paperdoll-v1.0/lib/matlab-bdb/src/mex/mxarray.cc -outdir /home/User1/Research/paperdoll-v1.0/lib/matlab-bdb/+bdb/private -output mex_function_ -ldb -DENABLE_ZLIB -lz 
Building with 'g++'.
Error using mex
/tmp/mex_41081439069641_22044/libbdbmex.o: In function `bdbmex::Record::deserialize_mxarray(std::vector<unsigned char,
std::allocator<unsigned char> > const&, mxArray_tag**)':
libbdbmex.cc:(.text+0x1e7): undefined reference to `mxDeserialize'
/tmp/mex_41081439069641_22044/libbdbmex.o: In function `bdbmex::Record::decompress_mxarray(std::vector<unsigned char,
std::allocator<unsigned char> > const&, mxArray_tag**)':
libbdbmex.cc:(.text+0x2a4): undefined reference to `mxDeserialize'
/tmp/mex_41081439069641_22044/libbdbmex.o: In function `bdbmex::Record::compress_mxarray(mxArray_tag const*, std::vector<unsigned
char, std::allocator<unsigned char> >*)':
libbdbmex.cc:(.text+0x762): undefined reference to `mxSerialize'
/tmp/mex_41081439069641_22044/libbdbmex.o: In function `bdbmex::Record::serialize_mxarray(mxArray_tag const*, std::vector<unsigned
char, std::allocator<unsigned char> >*)':
libbdbmex.cc:(.text+0xac6): undefined reference to `mxSerialize'
collect2: error: ld returned 1 exit status

Error in bdb.make (line 59)
    eval(cmd);

Error in make (line 9)
  bdb.make(varargin{:});
kyamagu commented 6 years ago

@tammytammy Seems the old mexopencv fails to build, replace that with the latest version. Get the latest from https://github.com/kyamagu/mexopencv

Regarding bdb, I do not know how Matlab R2017b treats the hidden mxSerialize API. You probably have to manually fix this part. See https://undocumentedmatlab.com/blog/serializing-deserializing-matlab-data