Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matcaffe error #72

Open
KeeganRen opened this issue Mar 23, 2016 · 3 comments
Open

matcaffe error #72

KeeganRen opened this issue Mar 23, 2016 · 3 comments

Comments

@KeeganRen
Copy link

ren@keegan  /home/ren/Code/RCNN/Caffe/caffe-0.999   make matcaffe  00:37:21
/usr/local/MATLAB/R2014a/bin/mex matlab/caffe/matcaffe.cpp build/lib/libcaffe.a
CXXFLAGS="$CXXFLAGS -pthread -fPIC -DNDEBUG -O2 -DUSE_MKL -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -Ibuild/src -I./src -I./include -I/usr/local/cuda-7.0/include -I/opt/intel/composer_xe_2013_sp1.3.174/mkl/include -Wall"
CXXLIBS="$CXXLIBS -L/usr/lib -L/usr/local/lib -L/usr/lib -L/usr/local/cuda-7.0/lib64 -L/usr/local/cuda-7.0/lib -L/opt/intel/composer_xe_2013_sp1.3.174/mkl/lib -L/opt/intel/composer_xe_2013_sp1.3.174/mkl/lib/intel64 -lcudart -lcublas -lcurand -lpthread -lglog -lprotobuf -lleveldb -lsnappy -lboost_system -lhdf5_hl -lhdf5 -lopencv_core -lopencv_highgui -lopencv_imgproc -lmkl_rt" -v -output matlab/caffe/caffe.mexa64
Verbose mode is on.
Neither -compatibleArrayDims nor -largeArrayDims is selected.
Using -compatibleArrayDims. In the future, MATLAB will require the use of
-largeArrayDims and remove the -compatibleArrayDims option.
For more information:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
No MEX options file identified; looking for an implicit selection.
... Looking for compiler 'g++' ...
... Executing command 'which g++' ...Yes ('/usr/bin/g++').
... Executing command 'g++ -print-file-name=libstdc++.so' ...Yes ('/usr/lib/gcc/x86_64-linux-gnu/4.8/libstdc++.so').
Found installed compiler 'g++'.

Options file details

Compiler location: $GCC_DIR
Options file: /usr/local/MATLAB/R2014a/bin/glnxa64/mexopts/g++_glnxa64.xml
CMDLINE1 : /usr/bin/g++ -c -DMX_COMPAT_32   -D_GNU_SOURCE -DMATLAB_MEX_FILE  -I"/usr/local/MATLAB/R2014a/extern/include" -I"/usr/local/MATLAB/R2014a/simulink/include" -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -pthread -fPIC -DNDEBUG -O2 -DUSE_MKL -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -Ibuild/src -I./src -I./include -I/usr/local/cuda-7.0/include -I/opt/intel/composer_xe_2013_sp1.3.174/mkl/include -Wall -O -DNDEBUG /home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/matcaffe.cpp -o /tmp/mex_254501929137558_22314/matcaffe.o
CMDLINE2 : /usr/bin/g++ -pthread -Wl,--no-undefined  -shared -O -Wl,--version-script,"/usr/local/MATLAB/R2014a/extern/lib/glnxa64/mexFunction.map" /tmp/mex_254501929137558_22314/matcaffe.o   -L/usr/lib -L/usr/local/lib -L/usr/lib -L/usr/local/cuda-7.0/lib64 -L/usr/local/cuda-7.0/lib -L/opt/intel/composer_xe_2013_sp1.3.174/mkl/lib -L/opt/intel/composer_xe_2013_sp1.3.174/mkl/lib/intel64 -lcudart -lcublas -lcurand -lpthread -lglog -lprotobuf -lleveldb -lsnappy -lboost_system -lhdf5_hl -lhdf5 -lopencv_core -lopencv_highgui -lopencv_imgproc -lmkl_rt build/lib/libcaffe.a  -Wl,-rpath-link,/usr/local/MATLAB/R2014a/bin/glnxa64 -L"/usr/local/MATLAB/R2014a/bin/glnxa64" -lmx -lmex -lmat -lm -lstdc++ -o /home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/caffe.mexa64
CMDLINE3 : rm -f /tmp/mex_254501929137558_22314/matcaffe.o
CXX : /usr/bin/g++
DEFINES : -DMX_COMPAT_32   -D_GNU_SOURCE -DMATLAB_MEX_FILE 
MATLABMEX : -DMATLAB_MEX_FILE 
CXXFLAGS : -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -pthread -fPIC -DNDEBUG -O2 -DUSE_MKL -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -Ibuild/src -I./src -I./include -I/usr/local/cuda-7.0/include -I/opt/intel/composer_xe_2013_sp1.3.174/mkl/include -Wall
INCLUDE : -I"/usr/local/MATLAB/R2014a/extern/include" -I"/usr/local/MATLAB/R2014a/simulink/include"
CXXOPTIMFLAGS : -O -DNDEBUG
CXXDEBUGFLAGS : -g
LDXX : /usr/bin/g++
LDFLAGS : -pthread -Wl,--no-undefined 
LDTYPE : -shared
LINKEXPORT : -Wl,--version-script,"/usr/local/MATLAB/R2014a/extern/lib/glnxa64/mexFunction.map"
LINKLIBS : build/lib/libcaffe.a  -Wl,-rpath-link,/usr/local/MATLAB/R2014a/bin/glnxa64 -L"/usr/local/MATLAB/R2014a/bin/glnxa64" -lmx -lmex -lmat -lm -lstdc++
LDOPTIMFLAGS : -O
LDDEBUGFLAGS : -g
OBJEXT : .o
LDEXT : .mexa64
GCC : /usr/bin/g++
CPPLIB_DIR : /usr/lib/gcc/x86_64-linux-gnu/4.8/libstdc++.so
MATLABROOT : /usr/local/MATLAB/R2014a
ARCH : glnxa64
SRC : /home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/matcaffe.cpp
OBJ : /tmp/mex_254501929137558_22314/matcaffe.o
OBJS : /tmp/mex_254501929137558_22314/matcaffe.o 
SRCROOT : /home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/matcaffe
DEF : /tmp/mex_254501929137558_22314/caffe.def
EXP : /home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/caffe.exp
LIB : /home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/caffe.lib
EXE : /home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/caffe.mexa64
ILK : /home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/caffe.ilk
MANIFEST : /home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/caffe.mexa64.manifest
TEMPNAME : /home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/caffe
EXEDIR : /home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/
EXENAME : caffe
CXXLIBS :  -L/usr/lib -L/usr/local/lib -L/usr/lib -L/usr/local/cuda-7.0/lib64 -L/usr/local/cuda-7.0/lib -L/opt/intel/composer_xe_2013_sp1.3.174/mkl/lib -L/opt/intel/composer_xe_2013_sp1.3.174/mkl/lib/intel64 -lcudart -lcublas -lcurand -lpthread -lglog -lprotobuf -lleveldb -lsnappy -lboost_system -lhdf5_hl -lhdf5 -lopencv_core -lopencv_highgui -lopencv_imgproc -lmkl_rt
OPTIM : -O -DNDEBUG
LINKOPTIM : -O

Building with 'g++'.
Warning: You are using gcc version '4.8.5'. The version of gcc is not supported. The version currently supported with MEX is '4.7.x'. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release.
Warning: You are using gcc version '4.8.5-2ubuntu1~14.04.1)'. The version of gcc is not supported. The version currently supported with MEX is '4.7.x'. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release.
/usr/bin/g++ -c -DMX_COMPAT_32 -D_GNU_SOURCE -DMATLAB_MEX_FILE -I"/usr/local/MATLAB/R2014a/extern/include" -I"/usr/local/MATLAB/R2014a/simulink/include" -ansi -fexceptions -fPIC -fno-omit-frame-pointer -pthread -pthread -fPIC -DNDEBUG -O2 -DUSE_MKL -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -Ibuild/src -I./src -I./include -I/usr/local/cuda-7.0/include -I/opt/intel/composer_xe_2013_sp1.3.174/mkl/include -Wall -O -DNDEBUG /home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/matcaffe.cpp -o /tmp/mex_254501929137558_22314/matcaffe.o
/home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/matcaffe.cpp: In function ‘mxArray* do_get_weights()’:
/home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/matcaffe.cpp:188:50: warning: narrowing conversion of ‘(& layer_blobs)->std::vector<_Tp, _Alloc>::sizeboost::shared_ptr<caffe::Blob, std::allocatorboost::shared_ptr<caffe::Blob > >()’ from ‘std::vectorboost::shared_ptr<caffe::Blob, std::allocatorboost::shared_ptr<caffe::Blob > >::size_type {aka long unsigned int}’ to ‘const mwSize {aka const int}’ inside { } is ill-formed in C++11 [-Wnarrowing]
const mwSize dims[2] = {layer_blobs.size(), 1};
^

/usr/bin/g++ -pthread -Wl,--no-undefined -shared -O -Wl,--version-script,"/usr/local/MATLAB/R2014a/extern/lib/glnxa64/mexFunction.map" /tmp/mex_254501929137558_22314/matcaffe.o -L/usr/lib -L/usr/local/lib -L/usr/lib -L/usr/local/cuda-7.0/lib64 -L/usr/local/cuda-7.0/lib -L/opt/intel/composer_xe_2013_sp1.3.174/mkl/lib -L/opt/intel/composer_xe_2013_sp1.3.174/mkl/lib/intel64 -lcudart -lcublas -lcurand -lpthread -lglog -lprotobuf -lleveldb -lsnappy -lboost_system -lhdf5_hl -lhdf5 -lopencv_core -lopencv_highgui -lopencv_imgproc -lmkl_rt build/lib/libcaffe.a -Wl,-rpath-link,/usr/local/MATLAB/R2014a/bin/glnxa64 -L"/usr/local/MATLAB/R2014a/bin/glnxa64" -lmx -lmex -lmat -lm -lstdc++ -o /home/ren/Code/RCNN/Caffe/caffe-0.999/matlab/caffe/caffe.mexa64
build/lib/libcaffe.a(common.o): In function caffe::Caffe::Caffe()': common.cpp:(.text+0x99): undefined reference tocublasCreate_v2'
common.cpp:(.text+0xeb): undefined reference to curandCreateGenerator' common.cpp:(.text+0x14d): undefined reference tocurandSetPseudoRandomGeneratorSeed'
build/lib/libcaffe.a(common.o): In function caffe::Caffe::~Caffe()': common.cpp:(.text+0x354): undefined reference tocublasDestroy_v2'
common.cpp:(.text+0x376): undefined reference to curandDestroyGenerator' build/lib/libcaffe.a(common.o): In functioncaffe::Caffe::SetDevice(int)':
common.cpp:(.text+0xcf0): undefined reference to cublasDestroy_v2' common.cpp:(.text+0xd1e): undefined reference tocurandDestroyGenerator'
common.cpp:(.text+0xd5e): undefined reference to cublasCreate_v2' common.cpp:(.text+0xd8c): undefined reference tocurandCreateGenerator'
common.cpp:(.text+0xdc0): undefined reference to curandSetPseudoRandomGeneratorSeed' build/lib/libcaffe.a(common.o): In functioncaffe::Caffe::set_random_seed(unsigned int)':
common.cpp:(.text+0x158f): undefined reference to curandDestroyGenerator' common.cpp:(.text+0x15bd): undefined reference tocurandCreateGenerator'
common.cpp:(.text+0x15ec): undefined reference to curandSetPseudoRandomGeneratorSeed' build/lib/libcaffe.a(net.o): In functioncaffe::Net::ToProto(caffe::NetParameter_, bool)':
net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x34): undefined reference to google::protobuf::internal::kEmptyString' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x84): undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::New()'
net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x1ea): undefined reference to google::protobuf::internal::StringTypeHandlerBase::New()' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x2aa): undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::New()'
net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x399): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x3b9): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)'
net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x3de): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x3f3): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)'
build/lib/libcaffe.a(net.o): In function caffe::Net<double>::ToProto(caffe::NetParameter_, bool)': net.cpp:(.text._ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x34): undefined reference to google::protobuf::internal::kEmptyString'
net.cpp:(.text._ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x84): undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::New()' net.cpp:(.text._ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x1ea): undefined reference to google::protobuf::internal::StringTypeHandlerBase::New()'
net.cpp:(.text._ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x2aa): undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::New()' net.cpp:(.text._ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x399): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)'
net.cpp:(.text._ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x3b9): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' net.cpp:(.text._ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x3de): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)'
net.cpp:(.text._ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x3f3): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' build/lib/libcaffe.a(net.o): In function caffe::Net::Forward(std::string const&, float*)':
net.cpp:(.text._ZN5caffe3NetIfE7ForwardERKSsPf[_ZN5caffe3NetIfE7ForwardERKSsPf]+0x45): undefined reference togoogle::protobuf::MessageLite::ParseFromString(std::string const&)' net.cpp:(.text._ZN5caffe3NetIfE7ForwardERKSsPf[_ZN5caffe3NetIfE7ForwardERKSsPf]+0x189): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)'
net.cpp:(.text._ZN5caffe3NetIfE7ForwardERKSsPf[ZN5caffe3NetIfE7ForwardERKSsPf]+0x1b5): undefined reference togoogle::protobuf::MessageLite::SerializeToString(std::string_) const' build/lib/libcaffe.a(net.o): In function caffe::Net::Forward(std::string const&, double)':
net.cpp:(.text._ZN5caffe3NetIdE7ForwardERKSsPd[_ZN5caffe3NetIdE7ForwardERKSsPd]+0x45): undefined reference to google::protobuf::MessageLite::ParseFromString(std::string const&)' net.cpp:(.text._ZN5caffe3NetIdE7ForwardERKSsPd[_ZN5caffe3NetIdE7ForwardERKSsPd]+0x189): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)'
net.cpp:(.text._ZN5caffe3NetIdE7ForwardERKSsPd[ZN5caffe3NetIdE7ForwardERKSsPd]+0x1b5): undefined reference to google::protobuf::MessageLite::SerializeToString(std::string*) const' build/lib/libcaffe.a(layer_factory.o): In functioncaffe::Layer::ToProto(caffe::LayerParameter, bool)':
layer_factory.cpp:(.text.ZN5caffe5LayerIfE7ToProtoEPNS_14LayerParameterEb[ZN5caffe5LayerIfE7ToProtoEPNS_14LayerParameterEb]+0x149): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' build/lib/libcaffe.a(layer_factory.o): In functioncaffe::Layer::ToProto(caffe::LayerParameter, bool)':
layer_factory.cpp:(.text.ZN5caffe5LayerIdE7ToProtoEPNS_14LayerParameterEb[ZN5caffe5LayerIdE7ToProtoEPNS_14LayerParameterEb]+0x149): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' build/lib/libcaffe.a(insert_splits.o): In functioncaffe::ConfigureSplitLayer(std::string const&, std::string const&, int, int, caffe::LayerParameter)':
insert_splits.cpp:(.text+0x8b7): undefined reference to google::protobuf::internal::StringTypeHandlerBase::New()' insert_splits.cpp:(.text+0x8fe): undefined reference togoogle::protobuf::internal::kEmptyString'
insert_splits.cpp:(.text+0x96c): undefined reference to google::protobuf::internal::StringTypeHandlerBase::New()' insert_splits.cpp:(.text+0x9e9): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)'
insert_splits.cpp:(.text+0xa4f): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' build/lib/libcaffe.a(insert_splits.o): In functioncaffe::InsertSplits(caffe::NetParameter const&, caffe::NetParameter
)':
insert_splits.cpp:(.text+0x2017): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' insert_splits.cpp:(.text+0x2118): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)'
insert_splits.cpp:(.text+0x214f): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' build/lib/libcaffe.a(upgrade_proto.o): In functioncaffe::UpgradeLayerParameter(caffe::LayerParameter const&, caffe::LayerParameter*)':
upgrade_proto.cpp:(.text+0x380): undefined reference to google::protobuf::internal::StringTypeHandlerBase::New()' upgrade_proto.cpp:(.text+0x400): undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::New()'
upgrade

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

@ghost
Copy link

ghost commented Apr 13, 2017

had you solved this problem? I have the same bug. Can you help me ?

@jinyu121
Copy link

Some blog says that the version of protobuf causes this issue, for your version is too new. Please try a older protobuf venison, such as 2.5.0.
I haven't try it yet.

@unicoe
Copy link

unicoe commented Sep 16, 2017

@jinyu121 It‘s useless。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants