ShaoqingRen / SPP_net

SPP_net : Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition
364 stars 237 forks source link

How to run spp_net with caffe (compiled from source) on Ubuntu #21

Closed danielruelle closed 9 years ago

danielruelle commented 9 years ago

Hi Shaoqing,

I intend to compile and run spp_net on Ubuntu (because I'm running rcnn on Ubuntu too).

To do this, I need to compile caffe from source, not using the caffe.mexw64 that you provided on windows.

But when I compile caffe (https://github.com/ShaoqingRen/caffe), there are files missing such as "caffe/util/Directory.h" and probably others (because you already modified it).

Please give me some suggestions so that I can run spp_net on Ubuntu.

Thank you very much,

danielruelle commented 9 years ago

The matcaffe.cpp used for compiling is copied from SPP_net_release1_data_caffe_mex_cuda5.5.zip

Please help,

ShaoqingRen commented 9 years ago

Hi danielruelle,

the "caffe/include/caffe/util//Directory.h" actually exists, you can have a check :) matcaffe.cpp should use original version from https://github.com/ShaoqingRen/caffe

thanks eendebakpt's help, current https://github.com/ShaoqingRen/caffe version should be compiled under Linux.

danielruelle commented 9 years ago

Hi Shaoqing,

Thank you for your reply. I already compiled caffe as you suggest.

However, I'm now unable to build "nms_multiclass_mex". This is because "windows.h" and "tchar.h" are included in the "nms_multiclass_mex.cpp".

Because I intend to run the "spp_demo" and "keeps = nms_multiclass(scored_boxes, 0.3);" is required at line 56 in spp_detect.m

Surely, I use "Zeiler_conv5_new" instead of "cnn_model/Zeiler_conv5".

Hope you can help, thank you very much.

ShaoqingRen commented 9 years ago

Hi danielruelle,

could you provide the error message when compiling nms_multiclass_mex.cpp

danielruelle commented 9 years ago

Yes.

Here is the message.

nms/nms_multiclass_mex.cpp:2:21: fatal error: windows.h: No such file or directory

include

                 ^

compilation terminated.

mex: compile of ' "nms/nms_multiclass_mex.cpp"' failed.

Error using mex (line 206) Unable to complete successfully.

Error in spp_build (line 85) mex -outdir bin ...

danielruelle commented 9 years ago

When I comment //#include < windows.h >

nms/nms_multiclass_mex.cpp:3:19: fatal error: tchar.h: No such file or directory

include

               ^

compilation terminated.

mex: compile of ' "nms/nms_multiclass_mex.cpp"' failed.

Error using mex (line 206) Unable to complete successfully.

Error in spp_build (line 85) mex -outdir bin ...

danielruelle commented 9 years ago

and here is the message when I comment both windows.h and tchar.h

Compiling nms_multiclass_mex

Warning: You are using gcc version "4.8.2-19ubuntu1)". The version currently supported with MEX is "4.4.6". For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release/

nms/nms_multiclassmex.cpp: In function ‘void nms(const mxArray, int, double, const std::vector&, std::vector&, int&)’: nms/nms_multiclass_mex.cpp:44:8: error: need ‘typename’ before ‘std::multimap<T, int>::iterator’ because ‘std::multimap<T, int>’ is a dependent scope for (std::multimap<T, int>::iterator it = scores.begin(); it != scores.end();) ^ nms/nms_multiclass_mex.cpp:44:40: error: expected ‘;’ before ‘it’ for (std::multimap<T, int>::iterator it = scores.begin(); it != scores.end();) ^ nms/nms_multiclass_mex.cpp:44:61: error: ‘it’ was not declared in this scope for (std::multimap<T, int>::iterator it = scores.begin(); it != scores.end();) ^ nms/nms_multiclass_mex.cpp: In function ‘void mexFunction(int, mxArray, int, mxArray)’: nms/nms_multiclass_mex.cpp:128:52: error: ‘mxCreateCellMatrix_730’ was not declared in this scope plhs[0] = mxCreateCellMatrix_730(nDim_boxes - 4, 1); ^ nms/nms_multiclassmex.cpp: In instantiation of ‘void nms(const mxArray, int, double, const std::vector&, std::vector&, int&) [with T = double; mxArray = mxArray_tag]’: nms/nms_multiclass_mex.cpp:136:69: required from here nms/nms_multiclass_mex.cpp:44:59: error: dependent-name ‘std::multimap<T, int>::iterator’ is parsed as a non-type, but instantiation yields a type for (std::multimap<T, int>::iterator it = scores.begin(); it != scores.end();) ^ nms/nms_multiclass_mex.cpp:44:59: note: say ‘typename std::multimap<T, int>::iterator’ if a type is meant nms/nms_multiclass_mex.cpp: In instantiation of ‘void nms(const mxArray*, int, double, const std::vector&, std::vector&, int&) [with T = float; mxArray = mxArray_tag]’: nms/nms_multiclass_mex.cpp:138:68: required from here nms/nms_multiclass_mex.cpp:44:59: error: dependent-name ‘std::multimap<T, int>::iterator’ is parsed as a non-type, but instantiation yields a type nms/nms_multiclass_mex.cpp:44:59: note: say ‘typename std::multimap<T, int>::iterator’ if a type is meant nms/nms_multiclass_mex.cpp:52:33: error: no matching function for call to ‘max(double, float)’ double w = max(0.0, xx2-xx1+1), h = max(0.0, yy2-yy1+1); ^ nms/nms_multiclass_mex.cpp:52:33: note: candidates are: In file included from /usr/include/c++/4.8/vector:60:0, from nms/nms_multiclass_mex.cpp:4: /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& a, const _Tp& b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed: nms/nms_multiclass_mex.cpp:52:33: note: deduced conflicting types for parameter ‘const _Tp’ (‘double’ and ‘float’) double w = max(0.0, xx2-xx1+1), h = max(0.0, yy2-yy1+1); ^ In file included from /usr/include/c++/4.8/vector:60:0, from nms/nms_multiclass_mex.cpp:4: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& a, const _Tp& b, _Compare comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed: nms/nms_multiclass_mex.cpp:52:33: note: deduced conflicting types for parameter ‘const _Tp’ (‘double’ and ‘float’) double w = max(0.0, xx2-xx1+1), h = max(0.0, yy2-yy1+1); ^ nms/nms_multiclass_mex.cpp:52:58: error: no matching function for call to ‘max(double, float)’ double w = max(0.0, xx2-xx1+1), h = max(0.0, yy2-yy1+1); ^ nms/nms_multiclass_mex.cpp:52:58: note: candidates are: In file included from /usr/include/c++/4.8/vector:60:0, from nms/nms_multiclass_mex.cpp:4: /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& a, const _Tp& b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed: nms/nms_multiclass_mex.cpp:52:58: note: deduced conflicting types for parameter ‘const _Tp’ (‘double’ and ‘float’) double w = max(0.0, xx2-xx1+1), h = max(0.0, yy2-yy1+1); ^ In file included from /usr/include/c++/4.8/vector:60:0, from nms/nms_multiclass_mex.cpp:4: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed: nms/nms_multiclass_mex.cpp:52:58: note: deduced conflicting types for parameter ‘const _Tp’ (‘double’ and ‘float’) double w = max(0.0, xx2-xx1+1), h = max(0.0, yy2-yy1+1); ^

mex: compile of ' "nms/nms_multiclass_mex.cpp"' failed.

Error using mex (line 206) Unable to complete successfully.

Error in spp_build (line 85) mex -outdir bin ...

ShaoqingRen commented 9 years ago

hi danielruelle,

I've updated a version for linux. I have no Linux environment at hand, so if this version has some compile errors, please see https://github.com/ShaoqingRen/SPP_net/blob/master/nms/nms_mex.cpp for reference.

ghost commented 9 years ago

I solved this problem on Ubuntu 14.04 and Matlab R2012b last week by editing several places as follows:

1) startup.m hfile = [matlabroot '/extern/include/matrix.h']; loadlibrary('libmx',hfile)

2) nms_multiclass_mex ~line 56: cast to double double w = std::max(0.0, (double)xx2-xx1+1), h = std::max(0.0, (double)yy2-yy1+1);

~line 82: mexFunction declaration: const void mexFunction(int nlhs, mxArray plhs[], int nrhs, const mxArray prhs[])

~line 142: change mxCreateCellMatrix_730 to mxCreateCellMatrix plhs[0] = mxCreateCellMatrix(nDim_boxes - 4, 1);

Hope this help.

ShaoqingRen commented 9 years ago

@caocuong0306

Thanks very much. Could you merge your version ?

ghost commented 9 years ago

@ShaoqingRen

I just forked your SPP_net repository and committed the updated files (startup.m, nms_multiclass_mex.cpp, and spp_demo.m) so that we can run spp_demo on Linux (I tested with Ubuntu 14.04 and Matlab R2012b).

https://github.com/caocuong0306/SPP_net

Apart from the changes mentioned above, I also modified spp_demo.m as follows: spp_model_file = './data/spp_model/VOC2007/spp_model.mat'; caffe_net_file = fullfile(pwd, 'data/Zeiler_conv5_new/Zeiler_conv5'); caffe_net_def_file = fullfile(pwd, 'data/Zeiler_conv5_new/Zeiler_spm_scale224_test_conv5.prototxt'); im = imread('./datasets/VOCdevkit2007/VOC2007/JPEGImages/000015.jpg');

Here is the results generated on my computer.

000015_detected

ShaoqingRen commented 9 years ago

@caocuong0306 Thank you very much. I've merged startup.m and nms_multiclass_mex.cpp. @danielruelle This version should be good under linux

danielruelle commented 9 years ago

@ShaoqingRen Thanks for your help @caocuong0306 It's helpful.

hayderm commented 9 years ago

Please danielruelle, could you tell me how do you compile caffe (https://github.com/ShaoqingRen/caffe) ? I faced the following errors. however, I was able to compile the latest version of caffe (https://github.com/BVLC/caffe) but as you know in order to use SPP-Net we need to install the first one.

src/caffe/test/test_data_layer.cpp: In member function ‘void caffe::DataLayerTest::FillLMDB(bool)’: src/caffe/test/test_data_layer.cpp:73:5: error: ‘MDB_env’ was not declared in this scope MDB_env _env; ^ src/caffe/test/test_data_layer.cpp:73:14: error: ‘env’ was not declared in this scope MDB_env env; ^ src/caffe/test/test_data_layer.cpp:74:5: error: ‘MDB_dbi’ was not declared in this scope MDB_dbi dbi; ^ src/caffe/test/test_data_layer.cpp:74:13: error: expected ‘;’ before ‘dbi’ MDB_dbi dbi; ^ src/caffe/test/test_data_layer.cpp:75:5: error: ‘MDB_val’ was not declared in this scope MDB_val mdbkey, mdbdata; ^ src/caffe/test/test_data_layer.cpp:75:13: error: expected ‘;’ before ‘mdbkey’ MDB_val mdbkey, mdbdata; ^ src/caffe/test/test_data_layer.cpp:76:5: error: ‘MDB_txn’ was not declared in this scope MDB_txn txn; ^ src/caffe/test/test_data_layer.cpp:76:14: error: ‘txn’ was not declared in this scope MDB_txn *txn; ^ In file included from ./include/caffe/common.hpp:6:0, from ./include/caffe/blob.hpp:4, from src/caffe/test/test_data_layer.cpp:7: src/caffe/test/test_data_layer.cpp:77:33: error: there are no arguments to ‘mdb_env_create’ that depend on a template parameter, so a declaration of ‘mdb_env_create’ must be available [-fpermissive] CHECK_EQ(mdb_env_create(&env), MDB_SUCCESS) << "mdb_env_create failed"; ^ src/caffe/test/test_data_layer.cpp:77:33: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) src/caffe/test/test_data_layer.cpp:77:36: error: ‘MDB_SUCCESS’ was not declared in this scope CHECK_EQ(mdb_env_create(&env), MDB_SUCCESS) << "mdb_env_create failed"; ^ src/caffe/test/test_data_layer.cpp:78:52: error: there are no arguments to ‘mdb_env_set_mapsize’ that depend on a template parameter, so a declaration of ‘mdb_env_set_mapsize’ must be available [-fpermissive] CHECK_EQ(mdb_env_set_mapsize(env, 1099511627776), MDB_SUCCESS) // 1TB ^ src/caffe/test/test_data_layer.cpp:78:55: error: ‘MDB_SUCCESS’ was not declared in this scope CHECK_EQ(mdb_env_set_mapsize(env, 1099511627776), MDB_SUCCESS) // 1TB ^ src/caffe/test/test_data_layer.cpp:80:59: error: there are no arguments to ‘mdb_env_open’ that depend on a template parameter, so a declaration of ‘mdb_env_open’ must be available [-fpermissive] CHECK_EQ(mdb_envopen(env, filename->c_str(), 0, 0664), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:80:62: error: ‘MDB_SUCCESS’ was not declared in this scope CHECK_EQ(mdb_envopen(env, filename->c_str(), 0, 0664), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:82:46: error: there are no arguments to ‘mdb_txn_begin’ that depend on a template parameter, so a declaration of ‘mdb_txn_begin’ must be available [-fpermissive] CHECK_EQ(mdb_txn_begin(env, NULL, 0, &txn), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:82:49: error: ‘MDB_SUCCESS’ was not declared in this scope CHECK_EQ(mdb_txn_begin(env, NULL, 0, &txn), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:84:38: error: ‘dbi’ was not declared in this scope CHECK_EQ(mdb_open(txn, NULL, 0, &dbi), MDB_SUCCESS) << "mdb_open failed"; ^ src/caffe/test/test_data_layer.cpp:84:41: error: there are no arguments to ‘mdb_open’ that depend on a template parameter, so a declaration of ‘mdb_open’ must be available [-fpermissive] CHECK_EQ(mdb_open(txn, NULL, 0, &dbi), MDB_SUCCESS) << "mdb_open failed"; ^ src/caffe/test/test_data_layer.cpp:84:44: error: ‘MDB_SUCCESS’ was not declared in this scope CHECK_EQ(mdb_open(txn, NULL, 0, &dbi), MDB_SUCCESS) << "mdb_open failed"; ^ src/caffe/test/test_data_layer.cpp:102:7: error: ‘mdbdata’ was not declared in this scope mdbdata.mv_size = value.size(); ^ src/caffe/test/test_data_layer.cpp:105:7: error: ‘mdbkey’ was not declared in this scope mdbkey.mv_size = keystr.size(); ^ In file included from ./include/caffe/common.hpp:6:0, from ./include/caffe/blob.hpp:4, from src/caffe/test/test_data_layer.cpp:7: src/caffe/test/test_data_layer.cpp:107:29: error: ‘dbi’ was not declared in this scope CHECK_EQ(mdb_put(txn, dbi, &mdbkey, &mdbdata, 0), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:107:54: error: there are no arguments to ‘mdb_put’ that depend on a template parameter, so a declaration of ‘mdb_put’ must be available [-fpermissive] CHECK_EQ(mdb_put(txn, dbi, &mdbkey, &mdbdata, 0), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:107:57: error: ‘MDB_SUCCESS’ was not declared in this scope CHECK_EQ(mdb_put(txn, dbi, &mdbkey, &mdbdata, 0), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:110:32: error: there are no arguments to ‘mdb_txn_commit’ that depend on a template parameter, so a declaration of ‘mdb_txn_commit’ must be available [-fpermissive] CHECK_EQ(mdb_txn_commit(txn), MDB_SUCCESS) << "mdb_txn_commit failed"; ^ src/caffe/test/test_data_layer.cpp:110:35: error: ‘MDB_SUCCESS’ was not declared in this scope CHECK_EQ(mdb_txn_commit(txn), MDB_SUCCESS) << "mdb_txn_commit failed"; ^ src/caffe/test/test_data_layer.cpp:111:20: error: ‘dbi’ was not declared in this scope mdb_close(env, dbi); ^ src/caffe/test/test_data_layer.cpp:111:23: error: there are no arguments to ‘mdb_close’ that depend on a template parameter, so a declaration of ‘mdb_close’ must be available [-fpermissive] mdb_close(env, dbi); ^ src/caffe/test/test_data_layer.cpp:112:22: error: there are no arguments to ‘mdb_env_close’ that depend on a template parameter, so a declaration of ‘mdb_env_close’ must be available [-fpermissive] mdb_env_close(env); ^ In file included from ./include/caffe/common.hpp:6:0, from ./include/caffe/blob.hpp:4, from src/caffe/test/test_data_layer.cpp:7: src/caffe/test/test_data_layer.cpp: In instantiation of ‘void caffe::DataLayerTest::FillLMDB(bool) [with TypeParam = caffe::DoubleGPU]’: src/caffe/test/test_data_layer.cpp:400:3: required from ‘void caffe::DataLayerTest_TestReadCropTestLMDB_Test::TestBody() [with gtestTypeParam = caffe::DoubleGPU]’ src/caffe/test/test_data_layer.cpp:404:1: required from here src/caffe/test/test_data_layer.cpp:77:33: error: ‘mdb_env_create’ was not declared in this scope CHECK_EQ(mdb_env_create(&env), MDB_SUCCESS) << "mdb_env_create failed"; ^ src/caffe/test/test_data_layer.cpp:78:52: error: ‘mdb_env_set_mapsize’ was not declared in this scope CHECK_EQ(mdb_env_set_mapsize(env, 1099511627776), MDB_SUCCESS) // 1TB ^ src/caffe/test/test_data_layer.cpp:80:59: error: ‘mdb_env_open’ was not declared in this scope CHECK_EQ(mdb_envopen(env, filename->c_str(), 0, 0664), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:82:46: error: ‘mdb_txn_begin’ was not declared in this scope CHECK_EQ(mdb_txn_begin(env, NULL, 0, &txn), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:84:41: error: ‘mdb_open’ was not declared in this scope CHECK_EQ(mdb_open(txn, NULL, 0, &dbi), MDB_SUCCESS) << "mdb_open failed"; ^ src/caffe/test/test_data_layer.cpp:107:54: error: ‘mdb_put’ was not declared in this scope CHECK_EQ(mdb_put(txn, dbi, &mdbkey, &mdbdata, 0), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:110:32: error: ‘mdb_txn_commit’ was not declared in this scope CHECK_EQ(mdb_txn_commit(txn), MDB_SUCCESS) << "mdb_txn_commit failed"; ^ src/caffe/test/test_data_layer.cpp:111:23: error: ‘mdb_close’ was not declared in this scope mdb_close(env, dbi); ^ src/caffe/test/test_data_layer.cpp:112:22: error: ‘mdb_env_close’ was not declared in this scope mdb_env_close(env); ^ In file included from ./include/caffe/common.hpp:6:0, from ./include/caffe/blob.hpp:4, from src/caffe/test/test_data_layer.cpp:7: src/caffe/test/test_data_layer.cpp: In instantiation of ‘void caffe::DataLayerTest::FillLMDB(bool) [with TypeParam = caffe::FloatGPU]’: src/caffe/test/test_data_layer.cpp:400:3: required from ‘void caffe::DataLayerTest_TestReadCropTestLMDB_Test::TestBody() [with gtestTypeParam = caffe::FloatGPU]’ src/caffe/test/test_data_layer.cpp:404:1: required from here src/caffe/test/test_data_layer.cpp:77:33: error: ‘mdb_env_create’ was not declared in this scope CHECK_EQ(mdb_env_create(&env), MDB_SUCCESS) << "mdb_env_create failed"; ^ src/caffe/test/test_data_layer.cpp:78:52: error: ‘mdb_env_set_mapsize’ was not declared in this scope CHECK_EQ(mdb_env_set_mapsize(env, 1099511627776), MDB_SUCCESS) // 1TB ^ src/caffe/test/test_data_layer.cpp:80:59: error: ‘mdb_env_open’ was not declared in this scope CHECK_EQ(mdb_envopen(env, filename->c_str(), 0, 0664), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:82:46: error: ‘mdb_txn_begin’ was not declared in this scope CHECK_EQ(mdb_txn_begin(env, NULL, 0, &txn), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:84:41: error: ‘mdb_open’ was not declared in this scope CHECK_EQ(mdb_open(txn, NULL, 0, &dbi), MDB_SUCCESS) << "mdb_open failed"; ^ src/caffe/test/test_data_layer.cpp:107:54: error: ‘mdb_put’ was not declared in this scope CHECK_EQ(mdb_put(txn, dbi, &mdbkey, &mdbdata, 0), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:110:32: error: ‘mdb_txn_commit’ was not declared in this scope CHECK_EQ(mdb_txn_commit(txn), MDB_SUCCESS) << "mdb_txn_commit failed"; ^ src/caffe/test/test_data_layer.cpp:111:23: error: ‘mdb_close’ was not declared in this scope mdb_close(env, dbi); ^ src/caffe/test/test_data_layer.cpp:112:22: error: ‘mdb_env_close’ was not declared in this scope mdb_env_close(env); ^ In file included from ./include/caffe/common.hpp:6:0, from ./include/caffe/blob.hpp:4, from src/caffe/test/test_data_layer.cpp:7: src/caffe/test/test_data_layer.cpp: In instantiation of ‘void caffe::DataLayerTest::FillLMDB(bool) [with TypeParam = caffe::DoubleCPU]’: src/caffe/test/test_data_layer.cpp:400:3: required from ‘void caffe::DataLayerTest_TestReadCropTestLMDB_Test::TestBody() [with gtestTypeParam = caffe::DoubleCPU]’ src/caffe/test/test_data_layer.cpp:404:1: required from here src/caffe/test/test_data_layer.cpp:77:33: error: ‘mdb_env_create’ was not declared in this scope CHECK_EQ(mdb_env_create(&env), MDB_SUCCESS) << "mdb_env_create failed"; ^ src/caffe/test/test_data_layer.cpp:78:52: error: ‘mdb_env_set_mapsize’ was not declared in this scope CHECK_EQ(mdb_env_set_mapsize(env, 1099511627776), MDB_SUCCESS) // 1TB ^ src/caffe/test/test_data_layer.cpp:80:59: error: ‘mdb_env_open’ was not declared in this scope CHECK_EQ(mdb_envopen(env, filename->c_str(), 0, 0664), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:82:46: error: ‘mdb_txn_begin’ was not declared in this scope CHECK_EQ(mdb_txn_begin(env, NULL, 0, &txn), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:84:41: error: ‘mdb_open’ was not declared in this scope CHECK_EQ(mdb_open(txn, NULL, 0, &dbi), MDB_SUCCESS) << "mdb_open failed"; ^ src/caffe/test/test_data_layer.cpp:107:54: error: ‘mdb_put’ was not declared in this scope CHECK_EQ(mdb_put(txn, dbi, &mdbkey, &mdbdata, 0), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:110:32: error: ‘mdb_txn_commit’ was not declared in this scope CHECK_EQ(mdb_txn_commit(txn), MDB_SUCCESS) << "mdb_txn_commit failed"; ^ src/caffe/test/test_data_layer.cpp:111:23: error: ‘mdb_close’ was not declared in this scope mdb_close(env, dbi); ^ src/caffe/test/test_data_layer.cpp:112:22: error: ‘mdb_env_close’ was not declared in this scope mdb_env_close(env); ^ In file included from ./include/caffe/common.hpp:6:0, from ./include/caffe/blob.hpp:4, from src/caffe/test/test_data_layer.cpp:7: src/caffe/test/test_data_layer.cpp: In instantiation of ‘void caffe::DataLayerTest::FillLMDB(bool) [with TypeParam = caffe::FloatCPU]’: src/caffe/test/test_data_layer.cpp:400:3: required from ‘void caffe::DataLayerTest_TestReadCropTestLMDB_Test::TestBody() [with gtestTypeParam = caffe::FloatCPU]’ src/caffe/test/test_data_layer.cpp:404:1: required from here src/caffe/test/test_data_layer.cpp:77:33: error: ‘mdb_env_create’ was not declared in this scope CHECK_EQ(mdb_env_create(&env), MDB_SUCCESS) << "mdb_env_create failed"; ^ src/caffe/test/test_data_layer.cpp:78:52: error: ‘mdb_env_set_mapsize’ was not declared in this scope CHECK_EQ(mdb_env_set_mapsize(env, 1099511627776), MDB_SUCCESS) // 1TB ^ src/caffe/test/test_data_layer.cpp:80:59: error: ‘mdb_env_open’ was not declared in this scope CHECK_EQ(mdb_envopen(env, filename->c_str(), 0, 0664), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:82:46: error: ‘mdb_txn_begin’ was not declared in this scope CHECK_EQ(mdb_txn_begin(env, NULL, 0, &txn), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:84:41: error: ‘mdb_open’ was not declared in this scope CHECK_EQ(mdb_open(txn, NULL, 0, &dbi), MDB_SUCCESS) << "mdb_open failed"; ^ src/caffe/test/test_data_layer.cpp:107:54: error: ‘mdb_put’ was not declared in this scope CHECK_EQ(mdb_put(txn, dbi, &mdbkey, &mdbdata, 0), MDB_SUCCESS) ^ src/caffe/test/test_data_layer.cpp:110:32: error: ‘mdb_txn_commit’ was not declared in this scope CHECK_EQ(mdb_txn_commit(txn), MDB_SUCCESS) << "mdb_txn_commit failed"; ^ src/caffe/test/test_data_layer.cpp:111:23: error: ‘mdb_close’ was not declared in this scope mdb_close(env, dbi); ^ src/caffe/test/test_data_layer.cpp:112:22: error: ‘mdb_env_close’ was not declared in this scope mdb_envclose(env); ^ make: ** [.build_release/src/caffe/test/test_data_layer.o] Error 1