Open KeeganRen opened 8 years ago
had you solved this problem? I have the same bug. Can you help me ?
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.
@jinyu121 It‘s useless。
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
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::ToProto(caffe::NetParameter , bool)':
net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x34): undefined reference to ::Forward(std::string const&, float)':
net.cpp:(.text._ZN5caffe3NetIfE7ForwardERKSsPf[_ZN5caffe3NetIfE7ForwardERKSsPf]+0x45): undefined reference to::ToProto(caffe::LayerParameter , bool)':
layer_factory.cpp:(.text._ZN5caffe5LayerIfE7ToProtoEPNS_14LayerParameterEb[_ZN5caffe5LayerIfE7ToProtoEPNS_14LayerParameterEb]+0x149): undefined reference to ::ToProto(caffe::LayerParameter_, bool)':
layer_factory.cpp:(.text._ZN5caffe5LayerIdE7ToProtoEPNS_14LayerParameterEb[_ZN5caffe5LayerIdE7ToProtoEPNS_14LayerParameterEb]+0x149): undefined reference to
caffe::Caffe::Caffe()': common.cpp:(.text+0x99): undefined reference to
cublasCreate_v2' common.cpp:(.text+0xeb): undefined reference tocurandCreateGenerator' common.cpp:(.text+0x14d): undefined reference to
curandSetPseudoRandomGeneratorSeed' build/lib/libcaffe.a(common.o): In functioncaffe::Caffe::~Caffe()': common.cpp:(.text+0x354): undefined reference to
cublasDestroy_v2' common.cpp:(.text+0x376): undefined reference tocurandDestroyGenerator' build/lib/libcaffe.a(common.o): In function
caffe::Caffe::SetDevice(int)': common.cpp:(.text+0xcf0): undefined reference tocublasDestroy_v2' common.cpp:(.text+0xd1e): undefined reference to
curandDestroyGenerator' common.cpp:(.text+0xd5e): undefined reference tocublasCreate_v2' common.cpp:(.text+0xd8c): undefined reference to
curandCreateGenerator' common.cpp:(.text+0xdc0): undefined reference tocurandSetPseudoRandomGeneratorSeed' build/lib/libcaffe.a(common.o): In function
caffe::Caffe::set_randomseed(unsigned int)': common.cpp:(.text+0x158f): undefined reference tocurandDestroyGenerator' common.cpp:(.text+0x15bd): undefined reference to
curandCreateGenerator' common.cpp:(.text+0x15ec): undefined reference tocurandSetPseudoRandomGeneratorSeed' build/lib/libcaffe.a(net.o): In function
caffe::Netgoogle::protobuf::internal::kEmptyString' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x84): undefined reference to
google::protobuf::internal::StringTypeHandlerBase::New()' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x1ea): undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::New()' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x2aa): undefined reference to
google::protobuf::internal::StringTypeHandlerBase::New()' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x399): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x3b9): undefined reference to
google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x3de): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x3f3): undefined reference to
google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' build/lib/libcaffe.a(net.o): In functioncaffe::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::Netgoogle::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 to`google::protobuf::MessageLite::SerializeToString(std::string) const' build/lib/libcaffe.a(net.o): In functioncaffe::Net<double>::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(layerfactory.o): In function`caffe::Layergoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' build/lib/libcaffe.a(layer_factory.o): In function
caffe::Layergoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' build/lib/libcaffe.a(insert_splits.o): In function
caffe::ConfigureSplitLayer(std::string const&, std::string const&, int, int, caffe::LayerParameter_)': insert_splits.cpp:(.text+0x8b7): undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::New()' insert_splits.cpp:(.text+0x8fe): undefined reference to
google::protobuf::internal::kEmptyString' insert_splits.cpp:(.text+0x96c): undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::New()' insert_splits.cpp:(.text+0x9e9): undefined reference to
google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' insert_splits.cpp:(.text+0xa4f): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' build/lib/libcaffe.a(insert_splits.o): In function
caffe::InsertSplits(caffe::NetParameter const&, caffe::NetParameter_)': insert_splits.cpp:(.text+0x2017): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' insert_splits.cpp:(.text+0x2118): undefined reference to
google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' insert_splits.cpp:(.text+0x214f): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' build/lib/libcaffe.a(upgrade_proto.o): In function
caffe::UpgradeLayerParameter(caffe::LayerParameter const&, caffe::LayerParameter*)': upgrade_proto.cpp:(.text+0x380): undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::New()' upgrade_proto.cpp:(.text+0x400): undefined reference to
google::protobuf::internal::StringTypeHandlerBase::New()' upgrade_ make: *\ [matlab/caffe/caffe.mexa64] Error 255