I was able to compile the newest version of caffe (https://github.com/BVLC/caffe). However, to use SPP-Net, I am trying to compile caffe (https://github.com/ShaoqingRen/caffe) on Ubuntu 14.04 but I got the following error. Please Help,
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_env_open(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_env_open(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<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = 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_env_open(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<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = 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_env_open(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<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = 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_env_open(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<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = 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_env_open(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);
^
make: *_* [.build_release/src/caffe/test/test_data_layer.o] Error 1