Matcaffe installation issues

189 views
Skip to first unread message

Ashwin Mathur

unread,
Mar 7, 2017, 11:35:15 AM3/7/17
to Caffe Users
During installation of matcaffe I get the following issue:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

MEX matlab/+caffe/private/caffe_.cpp
Building with 'g++'.
/home/hcrobotics/caffe/matlab/+caffe/private/caffe_.cpp: In function ‘void delete_solver(int, mxArray**, int, const mxArray**)’:
/home/hcrobotics/caffe/matlab/+caffe/private/caffe_.cpp:208:3: warning: lambda expressions only available with -std=c++0x or -std=gnu++0x [enabled by default]
/home/hcrobotics/caffe/matlab/+caffe/private/caffe_.cpp:208:4: error: no matching function for call to ‘remove_if(std::vector<boost::shared_ptr<caffe::Solver<float> > >::iterator, std::vector<boost::shared_ptr<caffe::Solver<float> > >::iterator, delete_solver(int, mxArray**, int, const mxArray**)::<lambda(const boost::shared_ptr<caffe::Solver<float> >&)>)’
/home/hcrobotics/caffe/matlab/+caffe/private/caffe_.cpp:208:4: note: candidate is:
/usr/include/c++/4.6/bits/stl_algo.h:1131:5: note: template<class _FIter, class _Predicate> _FIter std::remove_if(_FIter, _FIter, _Predicate)
/home/hcrobotics/caffe/matlab/+caffe/private/caffe_.cpp: In function ‘void delete_net(int, mxArray**, int, const mxArray**)’:
/home/hcrobotics/caffe/matlab/+caffe/private/caffe_.cpp:293:3: warning: lambda expressions only available with -std=c++0x or -std=gnu++0x [enabled by default]
/home/hcrobotics/caffe/matlab/+caffe/private/caffe_.cpp:293:4: error: no matching function for call to ‘remove_if(std::vector<boost::shared_ptr<caffe::Net<float> > >::iterator, std::vector<boost::shared_ptr<caffe::Net<float> > >::iterator, delete_net(int, mxArray**, int, const mxArray**)::<lambda(const boost::shared_ptr<caffe::Net<float> >&)>)’
/home/hcrobotics/caffe/matlab/+caffe/private/caffe_.cpp:293:4: note: candidate is:
/usr/include/c++/4.6/bits/stl_algo.h:1131:5: note: template<class _FIter, class _Predicate> _FIter std::remove_if(_FIter, _FIter, _Predica

make: *** [matlab/+caffe/private/caffe_.mexa64] Error 255


----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I am using gcc--4.6 compiler
Matlab R2014b
Ubuntu 14.04
Only CPU.


Any advice on how to rectify the issue??

Ernst Schwartz

unread,
Apr 22, 2017, 9:34:00 PM4/22/17
to Caffe Users
I don't know about gcc-4.6, but with 4.7.3 I needed to enable c++11 support with
export CXXFLAGS="-std=c++11" ; make mat

cheers,
Ernst

Dennis Núñez Fernández

unread,
Apr 22, 2017, 10:29:11 PM4/22/17
to Caffe Users
Ernst Schwartz , can you explain better please?! thanks in advance :) 
Reply all
Reply to author
Forward
0 new messages