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

Compile error about google:protobuf #19

Closed
ghost opened this issue Dec 26, 2013 · 26 comments
Closed

Compile error about google:protobuf #19

ghost opened this issue Dec 26, 2013 · 26 comments

Comments

@ghost
Copy link

ghost commented Dec 26, 2013

Dear fellow, I have got the following error while compiling all, I have installed the google logging library, can anyone help me with this ? Many thanks !

libcaffe.a(caffe.pb.o): In function caffe::LayerParameter::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)': caffe.pb.cc:(.text+0xbe2d): undefined reference togoogle::protobuf::io::CodedInputStream::BytesUntilLimit() const'
caffe.pb.cc:(.text+0xbef5): undefined reference to google::protobuf::io::CodedInputStream::BytesUntilLimit() const' libcaffe.a(caffe.pb.o):caffe.pb.cc:(.text+0xdefd): more undefined references togoogle::protobuf::io::CodedInputStream::BytesUntilLimit() const' follow
libcaffe.a(io.o): In function caffe::ReadProtoFromBinaryFile(char const*, google::protobuf::Message*)': io.cpp:(.text+0xb6d): undefined reference togoogle::protobuf::io::CodedInputStream::default_recursion_limit_'
io.cpp:(.text+0xbb4): undefined reference to `google::protobuf::io::CodedInputStream::~CodedInputStream()'
collect2: ld returned 1 exit status
make: *** [examples/finetune_net.bin] Error 1

@shelhamer
Copy link
Member

caffe needs both the google logging and google protocol buffer libraries. Please follow the link to compile and libprotobuf and then compile caffe.

@ghost
Copy link
Author

ghost commented Dec 26, 2013

Dear Shelhamer,
I have already compile google protobuf, the 'google' file is in /usr/local/include, but still I got the above error, does the version of protobuf effect? Many thanks!

@Yangqing
Copy link
Member

This seems to be a linking error so make sure you don't have multiple (especially old) protobuf .so libraries in your library paths. Both protobuf 2.4 and 2.5 should work, I believe.

@rbgirshick
Copy link
Contributor

IIRC this linking error occurs with protobuf 2.5. I recommend using 2.4 if
you're on 2.5 and getting this error.

Ross

On Wed, Dec 25, 2013 at 9:43 PM, Yangqing Jia notifications@github.comwrote:

This seems to be a linking error so make sure you don't have multiple
(especially old) protobuf .so libraries in your library paths. Both
protobuf 2.4 and 2.5 should work, I believe.


Reply to this email directly or view it on GitHubhttps://github.com//issues/19#issuecomment-31212049
.

http://www.cs.berkeley.edu/~rbg/

@ghost
Copy link
Author

ghost commented Dec 26, 2013

Compiling successfully! Thanks a lot, guys!

@amc-nu
Copy link

amc-nu commented May 14, 2014

Sorry to open this again, I have tried the above solution with no success.
Please help.
I am running Ubuntu 14.04 with CUDA Toolkit 5.5
$ protoc --version
libprotoc 2.4.1
I also tried with the latest 2.5.0
It build ok with
$make
but when I try to
$make matcaffe
/usr/local/MATLAB/R2014a/bin/mex matlab/caffe/matcaffe.cpp build/lib/libcaffe.a
CXXFLAGS="$CXXFLAGS -pthread -fPIC -DNDEBUG -O2 -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/include -Wall"
CXXLIBS="$CXXLIBS -L/usr/lib/x86_64-linux-gnu/ -L/usr/local/lib -L/usr/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib -lcudart -lcublas -lcurand -lpthread -lglog -lprotobuf -lleveldb -lsnappy -lboost_system -lhdf5_hl -lhdf5 -lopencv_core -lopencv_highgui -lopencv_imgproc -lcblas -latlas" -output matlab/caffe/caffe.mexa64
Building with 'g++'.
/home/user1/Downloads/caffe-dev/matlab/caffe/matcaffe.cpp: In function ‘mxArray* do_get_weights()’:
/home/user1/Downloads/caffe-dev/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]

build/lib/libcaffe.a(net.o): In function caffe::Net<float>::ToProto(caffe::NetParameter*, bool)': net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x36): undefined reference togoogle::protobuf::internal::kEmptyString'
net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x82): undefined reference to google::protobuf::internal::StringTypeHandlerBase::New()' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x1d0): undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::New()'
net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x298): undefined reference to google::protobuf::internal::StringTypeHandlerBase::New()' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x389): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)'
net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x3a1): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' net.cpp:(.text._ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x3c5): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)'
net.cpp:(.text.ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb[ZN5caffe3NetIfE7ToProtoEPNS_12NetParameterEb]+0x3d9): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' build/lib/libcaffe.a(net.o): In functioncaffe::Net::ToProto(caffe::NetParameter, bool)':
net.cpp:(.text.ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x36): undefined reference to google::protobuf::internal::kEmptyString' net.cpp:(.text._ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x82): undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::New()'
net.cpp:(.text.ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x1d0): undefined reference to google::protobuf::internal::StringTypeHandlerBase::New()' net.cpp:(.text._ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x298): undefined reference togoogle::protobuf::internal::StringTypeHandlerBase::New()'
net.cpp:(.text.ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x389): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' net.cpp:(.text._ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x3a1): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)'
net.cpp:(.text.ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x3c5): undefined reference to google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' net.cpp:(.text._ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb[_ZN5caffe3NetIdE7ToProtoEPNS_12NetParameterEb]+0x3d9): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)'
build/lib/libcaffe.a(net.o): In function caffe::Net<double>::Forward(std::string const&, double_)': net.cpp:(.text._ZN5caffe3NetIdE7ForwardERKSsPd[_ZN5caffe3NetIdE7ForwardERKSsPd]+0x47): undefined reference to google::protobuf::MessageLite::ParseFromString(std::string const&)'
net.cpp:(.text.ZN5caffe3NetIdE7ForwardERKSsPd[ZN5caffe3NetIdE7ForwardERKSsPd]+0x18f): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' net.cpp:(.text._ZN5caffe3NetIdE7ForwardERKSsPd[_ZN5caffe3NetIdE7ForwardERKSsPd]+0x1b8): undefined reference to google::protobuf::MessageLite::SerializeToString(std::string*) const'
build/lib/libcaffe.a(net.o): In functioncaffe::Net<float>::Forward(std::string const&, float_)': net.cpp:(.text._ZN5caffe3NetIfE7ForwardERKSsPf[_ZN5caffe3NetIfE7ForwardERKSsPf]+0x47): undefined reference to google::protobuf::MessageLite::ParseFromString(std::string const&)'
net.cpp:(.text.ZN5caffe3NetIfE7ForwardERKSsPf[ZN5caffe3NetIfE7ForwardERKSsPf]+0x18f): undefined reference togoogle::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)' net.cpp:(.text._ZN5caffe3NetIfE7ForwardERKSsPf[_ZN5caffe3NetIfE7ForwardERKSsPf]+0x1b8): undefined reference to google::protobuf::MessageLite::SerializeToString(std::string) const'
build/lib/libcaffe.a(math_functions.o): In function void caffe::caffe_cpu_gemm<float>(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, float, float const*, float const*, float, float*)': math_functions.cpp:(.text+0x1ee): undefined reference tocblas_sgemm'
build/lib/libcaffe.a(math_functions.o): In function void caffe::caffe_cpu_gemm<double>(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, double, double const*, double const*, double, double*)': math_functions.cpp:(.text+0x24e): undefined reference tocblas_dgemm'
build/lib/libcaffe.a(math_functions.o): In function void caffe::caffe_cpu_gemv<float>(CBLAS_TRANSPOSE, int, int, float, float const*, float const*, float, float*)': math_functions.cpp:(.text+0x28f): undefined reference tocblas_sgemv'
build/lib/libcaffe.a(math_functions.o): In function void caffe::caffe_cpu_gemv<double>(CBLAS_TRANSPOSE, int, int, double, double const*, double const*, double, double*)': math_functions.cpp:(.text+0x2cf): undefined reference tocblas_dgemv'
build/lib/libcaffe.a(math_functions.o): In function void caffe::caffe_cpu_axpby<float>(int, float, float const*, float, float*)': math_functions.cpp:(.text+0x4af): undefined reference tocblas_sscal'
build/lib/libcaffe.a(math_functions.o): In function void caffe::caffe_cpu_axpby<double>(int, double, double const*, double, double*)': math_functions.cpp:(.text+0x521): undefined reference tocblas_dscal'
build/lib/libcaffe.a(math_functions.o): In function void caffe::caffe_cpu_scale<float>(int, float, float const*, float*)': math_functions.cpp:(.text+0x717): undefined reference tocblas_scopy'
build/lib/libcaffe.a(math_functions.o): In function void caffe::caffe_cpu_scale<double>(int, double, double const*, double*)': math_functions.cpp:(.text+0x767): undefined reference tocblas_dcopy'
build/lib/libcaffe.a(math_functions.o): In function void caffe::caffe_gpu_gemm<float>(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, float, float const*, float const*, float, float*)': math_functions.cpp:(.text+0x94f): undefined reference tocublasSgemm_v2'
build/lib/libcaffe.a(math_functions.o): In function void caffe::caffe_gpu_scale<float>(int, float, float const*, float*)': math_functions.cpp:(.text+0xad5): undefined reference tocublasScopy_v2'
math_functions.cpp:(.text+0xb09): undefined reference to cublasSscal_v2' build/lib/libcaffe.a(math_functions.o): In functionvoid caffe::caffe_gpu_asum(int, double const
, double
)':
math_functions.cpp:(.text+0xd05): undefined reference to cublasDasum_v2' build/lib/libcaffe.a(math_functions.o): In functionvoid caffe::caffe_gpu_asum(int, float const, float)':
math_functions.cpp:(.text+0xe45): undefined reference to cublasSasum_v2' build/lib/libcaffe.a(math_functions.o): In functionvoid caffe::caffe_gpu_dot(int, double const, double const, double)':
math_functions.cpp:(.text+0xf97): undefined reference to cublasDdot_v2' build/lib/libcaffe.a(math_functions.o): In functionvoid caffe::caffe_gpu_dot(int, float const, float const, float)':
math_functions.cpp:(.text+0x10e7): undefined reference to cublasSdot_v2' build/lib/libcaffe.a(math_functions.o): In functionvoid caffe::caffe_gpu_scal(int, double, double)':
math_functions.cpp:(.text+0x1226): undefined reference to cublasDscal_v2' build/lib/libcaffe.a(math_functions.o): In functionvoid caffe::caffe_gpu_scal(int, float, float)':
math_functions.cpp:(.text+0x1356): undefined reference to `cublasSscal_v2'
build/lib/libcaffe.a(math_function
make: *** [matlab/caffe/caffe.mexa64] Error 255

Thank you.

@LearnerInGithub
Copy link

If you want to remove the old version of the Protobuf, then you can input that sudo apt-get autoremove libprotobuf-dev, then compile the caffe aggain! Of Course, you need install the the Protobuf matually, for me, I installed it by source code(https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz).

Reference:
Yangqing Jia
Owner
Yangqing commented on Dec 26, 2013

This seems to be a linking error so make sure you don't have multiple (especially old) protobuf .so libraries in your library paths. Both protobuf 2.4 and 2.5 should work, I believe.

@spandanagella
Copy link

Hi,

I'm having issue with google:protobuf and I'm unable to build caffe. I tried with protobuf 3.0, 2.5 and 2.4. For all the cases I'm getting the same error. Looks like its not able to access the google folder in protobuf-*/include. I have also included both the bin and include from protobuf in LD_LIBRARY_PATH and PATH. Please find the attached error. Any pointers would be highly helpful.

Thanks,
spandana

P:S; Looks like its just spitting out build/src/caffe/proto/caffe_pretty_print.pb.o.warnings.txt file.

In file included from .build_release/src/caffe/proto/caffe_pretty_print.pb.cc:4:
.build_release/src/caffe/proto/caffe_pretty_print.pb.h:9:42: error: google/protobuf/stubs/common.h: No such file or directory
.build_release/src/caffe/proto/caffe_pretty_print.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
.build_release/src/caffe/proto/caffe_pretty_print.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
.build_release/src/caffe/proto/caffe_pretty_print.pb.h:14:2: error: #error your headers.
.build_release/src/caffe/proto/caffe_pretty_print.pb.h:22:52: error: google/protobuf/generated_message_util.h: No such file or directory
.build_release/src/caffe/proto/caffe_pretty_print.pb.h:23:44: error: google/protobuf/repeated_field.h: No such file or directory
.build_release/src/caffe/proto/caffe_pretty_print.pb.h:24:43: error: google/protobuf/extension_set.h: No such file or directory
.build_release/src/caffe/proto/caffe_pretty_print.pb.h:25:58: error: google/protobuf/generated_message_reflection.h: No such file or directory
In file included from .build_release/src/caffe/proto/caffe_pretty_print.pb.h:26,
from .build_release/src/caffe/proto/caffe_pretty_print.pb.cc:4:
.build_release/src/caffe/proto/caffe.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
.build_release/src/caffe/proto/caffe.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
.build_release/src/caffe/proto/caffe.pb.h:14:2: error: #error your headers.
.build_release/src/caffe/proto/caffe_pretty_print.pb.cc:8:40: error: google/protobuf/stubs/once.h: No such file or directory
.build_release/src/caffe/proto/caffe_pretty_print.pb.cc:9:45: error: google/protobuf/io/coded_stream.h: No such file or directory
.build_release/src/caffe/proto/caffe_pretty_print.pb.cc:10:50: error: google/protobuf/wire_format_lite_inl.h: No such file or directory
.build_release/src/caffe/proto/caffe_pretty_print.pb.cc:11:40: error: google/protobuf/descriptor.h: No such file or directory
.build_release/src/caffe/proto/caffe_pretty_print.pb.cc:12:44: error: google/protobuf/reflection_ops.h: No such file or directory
.build_release/src/caffe/proto/caffe_pretty_print.pb.cc:13:41: error: google/protobuf/wire_format.h: No such file or directory
In file included from .build_release/src/caffe/proto/caffe_pretty_print.pb.h:26,
from .build_release/src/caffe/proto/caffe_pretty_print.pb.cc:4:
.build_release/src/caffe/proto/caffe.pb.h:84: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:84: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::SolverParameter_SolverMode_Name(caffe::SolverParameter_SolverMode)’:
.build_release/src/caffe/proto/caffe.pb.h:86: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:87: error: ‘SolverParameter_SolverMode_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::SolverParameter_SolverMode_Parse(const std::string&, caffe::SolverParameter_SolverMode
)’:
.build_release/src/caffe/proto/caffe.pb.h:91: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:91: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:92: error: ‘SolverParameter_SolverMode_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:104: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:104: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::SolverParameter_SolverType_Name(caffe::SolverParameter_SolverType)’:
.build_release/src/caffe/proto/caffe.pb.h:106: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:107: error: ‘SolverParameter_SolverType_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::SolverParameter_SolverType_Parse(const std::string&, caffe::SolverParameter_SolverType
)’:
.build_release/src/caffe/proto/caffe.pb.h:111: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:111: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:112: error: ‘SolverParameter_SolverType_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:159: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:159: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::LayerParameter_LayerType_Name(caffe::LayerParameter_LayerType)’:
.build_release/src/caffe/proto/caffe.pb.h:161: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:162: error: ‘LayerParameter_LayerType_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::LayerParameter_LayerType_Parse(const std::string&, caffe::LayerParameter_LayerType
)’:
.build_release/src/caffe/proto/caffe.pb.h:166: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:166: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:167: error: ‘LayerParameter_LayerType_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:178: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:178: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::LayerParameter_DimCheckMode_Name(caffe::LayerParameter_DimCheckMode)’:
.build_release/src/caffe/proto/caffe.pb.h:180: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:181: error: ‘LayerParameter_DimCheckMode_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::LayerParameter_DimCheckMode_Parse(const std::string&, caffe::LayerParameter_DimCheckMode
)’:
.build_release/src/caffe/proto/caffe.pb.h:185: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:185: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:186: error: ‘LayerParameter_DimCheckMode_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:198: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:198: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::ConvolutionParameter_Engine_Name(caffe::ConvolutionParameter_Engine)’:
.build_release/src/caffe/proto/caffe.pb.h:200: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:201: error: ‘ConvolutionParameter_Engine_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::ConvolutionParameter_Engine_Parse(const std::string&, caffe::ConvolutionParameter_Engine
)’:
.build_release/src/caffe/proto/caffe.pb.h:205: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:205: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:206: error: ‘ConvolutionParameter_Engine_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:217: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:217: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::DataParameter_DB_Name(caffe::DataParameter_DB)’:
.build_release/src/caffe/proto/caffe.pb.h:219: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:220: error: ‘DataParameter_DB_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::DataParameter_DB_Parse(const std::string&, caffe::DataParameter_DB
)’:
.build_release/src/caffe/proto/caffe.pb.h:224: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:224: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:225: error: ‘DataParameter_DB_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:237: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:237: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::EltwiseParameter_EltwiseOp_Name(caffe::EltwiseParameter_EltwiseOp)’:
.build_release/src/caffe/proto/caffe.pb.h:239: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:240: error: ‘EltwiseParameter_EltwiseOp_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::EltwiseParameter_EltwiseOp_Parse(const std::string&, caffe::EltwiseParameter_EltwiseOp
)’:
.build_release/src/caffe/proto/caffe.pb.h:244: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:244: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:245: error: ‘EltwiseParameter_EltwiseOp_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:256: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:256: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::HingeLossParameter_Norm_Name(caffe::HingeLossParameter_Norm)’:
.build_release/src/caffe/proto/caffe.pb.h:258: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:259: error: ‘HingeLossParameter_Norm_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::HingeLossParameter_Norm_Parse(const std::string&, caffe::HingeLossParameter_Norm
)’:
.build_release/src/caffe/proto/caffe.pb.h:263: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:263: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:264: error: ‘HingeLossParameter_Norm_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:275: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:275: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::LRNParameter_NormRegion_Name(caffe::LRNParameter_NormRegion)’:
.build_release/src/caffe/proto/caffe.pb.h:277: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:278: error: ‘LRNParameter_NormRegion_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::LRNParameter_NormRegion_Parse(const std::string&, caffe::LRNParameter_NormRegion
)’:
.build_release/src/caffe/proto/caffe.pb.h:282: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:282: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:283: error: ‘LRNParameter_NormRegion_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:295: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:295: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::PoolingParameter_PoolMethod_Name(caffe::PoolingParameter_PoolMethod)’:
.build_release/src/caffe/proto/caffe.pb.h:297: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:298: error: ‘PoolingParameter_PoolMethod_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::PoolingParameter_PoolMethod_Parse(const std::string&, caffe::PoolingParameter_PoolMethod
)’:
.build_release/src/caffe/proto/caffe.pb.h:302: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:302: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:303: error: ‘PoolingParameter_PoolMethod_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:315: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:315: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::PoolingParameter_Engine_Name(caffe::PoolingParameter_Engine)’:
.build_release/src/caffe/proto/caffe.pb.h:317: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:318: error: ‘PoolingParameter_Engine_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::PoolingParameter_Engine_Parse(const std::string&, caffe::PoolingParameter_Engine
)’:
.build_release/src/caffe/proto/caffe.pb.h:322: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:322: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:323: error: ‘PoolingParameter_Engine_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:335: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:335: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::ReLUParameter_Engine_Name(caffe::ReLUParameter_Engine)’:
.build_release/src/caffe/proto/caffe.pb.h:337: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:338: error: ‘ReLUParameter_Engine_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::ReLUParameter_Engine_Parse(const std::string&, caffe::ReLUParameter_Engine
)’:
.build_release/src/caffe/proto/caffe.pb.h:342: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:342: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:343: error: ‘ReLUParameter_Engine_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:355: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:355: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::SigmoidParameter_Engine_Name(caffe::SigmoidParameter_Engine)’:
.build_release/src/caffe/proto/caffe.pb.h:357: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:358: error: ‘SigmoidParameter_Engine_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::SigmoidParameter_Engine_Parse(const std::string&, caffe::SigmoidParameter_Engine
)’:
.build_release/src/caffe/proto/caffe.pb.h:362: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:362: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:363: error: ‘SigmoidParameter_Engine_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:375: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:375: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::SoftmaxParameter_Engine_Name(caffe::SoftmaxParameter_Engine)’:
.build_release/src/caffe/proto/caffe.pb.h:377: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:378: error: ‘SoftmaxParameter_Engine_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::SoftmaxParameter_Engine_Parse(const std::string&, caffe::SoftmaxParameter_Engine
)’:
.build_release/src/caffe/proto/caffe.pb.h:382: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:382: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:383: error: ‘SoftmaxParameter_Engine_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:395: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:395: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::TanHParameter_Engine_Name(caffe::TanHParameter_Engine)’:
.build_release/src/caffe/proto/caffe.pb.h:397: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:398: error: ‘TanHParameter_Engine_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::TanHParameter_Engine_Parse(const std::string&, caffe::TanHParameter_Engine
)’:
.build_release/src/caffe/proto/caffe.pb.h:402: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:402: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:403: error: ‘TanHParameter_Engine_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:415: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:415: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::V0LayerParameter_PoolMethod_Name(caffe::V0LayerParameter_PoolMethod)’:
.build_release/src/caffe/proto/caffe.pb.h:417: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:418: error: ‘V0LayerParameter_PoolMethod_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::V0LayerParameter_PoolMethod_Parse(const std::string&, caffe::V0LayerParameter_PoolMethod
)’:
.build_release/src/caffe/proto/caffe.pb.h:422: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:422: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:423: error: ‘V0LayerParameter_PoolMethod_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:434: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:434: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h: In function ‘const std::string& caffe::Phase_Name(caffe::Phase)’:
.build_release/src/caffe/proto/caffe.pb.h:436: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:437: error: ‘Phase_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: In function ‘bool caffe::Phase_Parse(const std::string&, caffe::Phase
)’:
.build_release/src/caffe/proto/caffe.pb.h:441: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:441: error: expected primary-expression before ‘>’ token
.build_release/src/caffe/proto/caffe.pb.h:442: error: ‘Phase_descriptor’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:446: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:446: error: expected ‘{’ before ‘Message’
.build_release/src/caffe/proto/caffe.pb.h:446: error: invalid type in declaration before ‘{’ token
.build_release/src/caffe/proto/caffe.pb.h:446: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
.build_release/src/caffe/proto/caffe.pb.h:447: error: expected primary-expression before ‘public’
.build_release/src/caffe/proto/caffe.pb.h:447: error: expected ‘}’ before ‘public’
.build_release/src/caffe/proto/caffe.pb.h:447: error: expected ‘,’ or ‘;’ before ‘public’
.build_release/src/caffe/proto/caffe.pb.h:449: error: declaration of ‘~caffe::BlobProto’ as non-member
.build_release/src/caffe/proto/caffe.pb.h:451: error: expected unqualified-id before ‘const’
.build_release/src/caffe/proto/caffe.pb.h:451: error: expected ‘)’ before ‘const’
.build_release/src/caffe/proto/caffe.pb.h:453: error: ‘caffe::BlobProto& caffe::operator=(const caffe::BlobProto&)’ must be a nonstatic member function
.build_release/src/caffe/proto/caffe.pb.h:458: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:458: error: expected initializer before ‘&’ token
.build_release/src/caffe/proto/caffe.pb.h:462: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:462: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h:466: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:466: error: expected initializer before ‘
’ token
.build_release/src/caffe/proto/caffe.pb.h:473: error: non-member function ‘caffe::BlobProto* caffe::New()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:474: error: expected unqualified-id before ‘::’ token
.build_release/src/caffe/proto/caffe.pb.h:474: error: expected ‘)’ before ‘::’ token
.build_release/src/caffe/proto/caffe.pb.h:474: error: expected initializer before ‘::’ token
.build_release/src/caffe/proto/caffe.pb.h:475: error: expected unqualified-id before ‘::’ token
.build_release/src/caffe/proto/caffe.pb.h:475: error: expected ‘)’ before ‘::’ token
.build_release/src/caffe/proto/caffe.pb.h:475: error: expected initializer before ‘::’ token
.build_release/src/caffe/proto/caffe.pb.h:479: error: non-member function ‘bool caffe::IsInitialized()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:481: error: non-member function ‘int caffe::ByteSize()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:483: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:483: error: ‘input’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h:485: error: variable or field ‘SerializeWithCachedSizes’ declared void
.build_release/src/caffe/proto/caffe.pb.h:485: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:485: error: ‘output’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h:486: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:486: error: expected constructor, destructor, or type conversion before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h:487: error: non-member function ‘int caffe::GetCachedSize()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h: In function ‘int caffe::GetCachedSize()’:
.build_release/src/caffe/proto/caffe.pb.h:487: error: ‘cached_size’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:488: error: expected unqualified-id before ‘private’
.build_release/src/caffe/proto/caffe.pb.h:491: error: non-member function ‘void caffe::SetCachedSize(int)’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:492: error: expected unqualified-id before ‘public’
.build_release/src/caffe/proto/caffe.pb.h:501: error: non-member function ‘bool caffe::has_num()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:504: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:504: error: expected initializer before ‘num’
.build_release/src/caffe/proto/caffe.pb.h:505: error: variable or field ‘set_num’ declared void
.build_release/src/caffe/proto/caffe.pb.h:505: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:508: error: non-member function ‘bool caffe::has_channels()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:511: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:511: error: expected initializer before ‘channels’
.build_release/src/caffe/proto/caffe.pb.h:512: error: variable or field ‘set_channels’ declared void
.build_release/src/caffe/proto/caffe.pb.h:512: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:515: error: non-member function ‘bool caffe::has_height()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:518: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:518: error: expected initializer before ‘height’
.build_release/src/caffe/proto/caffe.pb.h:519: error: variable or field ‘set_height’ declared void
.build_release/src/caffe/proto/caffe.pb.h:519: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:522: error: non-member function ‘bool caffe::has_width()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:525: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:525: error: expected initializer before ‘width’
.build_release/src/caffe/proto/caffe.pb.h:526: error: variable or field ‘set_width’ declared void
.build_release/src/caffe/proto/caffe.pb.h:526: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:529: error: non-member function ‘int caffe::data_size()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:532: error: non-member function ‘float caffe::data(int)’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:535: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:535: error: expected initializer before ‘<’ token
.build_release/src/caffe/proto/caffe.pb.h:537: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:537: error: expected initializer before ‘<’ token
.build_release/src/caffe/proto/caffe.pb.h:541: error: non-member function ‘int caffe::diff_size()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:544: error: non-member function ‘float caffe::diff(int)’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:547: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:547: error: expected initializer before ‘<’ token
.build_release/src/caffe/proto/caffe.pb.h:549: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:549: error: expected initializer before ‘<’ token
.build_release/src/caffe/proto/caffe.pb.h:553: error: expected unqualified-id before ‘private’
.build_release/src/caffe/proto/caffe.pb.h:563: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:563: error: expected constructor, destructor, or type conversion before ‘unknown_fields
.build_release/src/caffe/proto/caffe.pb.h:565: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:565: error: expected constructor, destructor, or type conversion before ‘num

.build_release/src/caffe/proto/caffe.pb.h:566: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:566: error: expected constructor, destructor, or type conversion before ‘channels_’
.build_release/src/caffe/proto/caffe.pb.h:567: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:567: error: expected constructor, destructor, or type conversion before ‘height_’
.build_release/src/caffe/proto/caffe.pb.h:568: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:568: error: expected constructor, destructor, or type conversion before ‘width_’
.build_release/src/caffe/proto/caffe.pb.h:569: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:569: error: expected constructor, destructor, or type conversion before ‘<’ token
.build_release/src/caffe/proto/caffe.pb.h:570: error: non-member ‘data_cached_byte_size’ cannot be declared ‘mutable’
.build_release/src/caffe/proto/caffe.pb.h:571: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:571: error: expected constructor, destructor, or type conversion before ‘<’ token
.build_release/src/caffe/proto/caffe.pb.h:572: error: non-member ‘diff_cached_byte_size’ cannot be declared ‘mutable’
.build_release/src/caffe/proto/caffe.pb.h:574: error: non-member ‘cached_size’ cannot be declared ‘mutable’
.build_release/src/caffe/proto/caffe.pb.h:575: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:575: error: expected constructor, destructor, or type conversion before ‘has_bits
.build_release/src/caffe/proto/caffe.pb.h:577: error: ‘friend’ used outside of class
.build_release/src/caffe/proto/caffe.pb.h:578: error: ‘friend’ used outside of class
.build_release/src/caffe/proto/caffe.pb.h:579: error: ‘friend’ used outside of class
.build_release/src/caffe/proto/caffe.pb.h:586: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:586: error: expected ‘{’ before ‘Message’
.build_release/src/caffe/proto/caffe.pb.h:586: error: invalid type in declaration before ‘{’ token
.build_release/src/caffe/proto/caffe.pb.h:586: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
.build_release/src/caffe/proto/caffe.pb.h:587: error: expected primary-expression before ‘public’
.build_release/src/caffe/proto/caffe.pb.h:587: error: expected ‘}’ before ‘public’
.build_release/src/caffe/proto/caffe.pb.h:587: error: expected ‘,’ or ‘;’ before ‘public’
.build_release/src/caffe/proto/caffe.pb.h:589: error: declaration of ‘~BlobProtoVector’ as non-member
.build_release/src/caffe/proto/caffe.pb.h:591: error: expected unqualified-id before ‘const’
.build_release/src/caffe/proto/caffe.pb.h:591: error: expected ‘)’ before ‘const’
.build_release/src/caffe/proto/caffe.pb.h:593: error: ‘BlobProtoVector& operator=(const BlobProtoVector&)’ must be a nonstatic member function
.build_release/src/caffe/proto/caffe.pb.h:598: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:598: error: expected initializer before ‘&’ token
.build_release/src/caffe/proto/caffe.pb.h:602: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:602: error: expected initializer before ‘’ token
.build_release/src/caffe/proto/caffe.pb.h:606: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:606: error: expected initializer before ‘
’ token
.build_release/src/caffe/proto/caffe.pb.h:613: error: non-member function ‘BlobProtoVector_ New()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:614: error: expected unqualified-id before ‘::’ token
.build_release/src/caffe/proto/caffe.pb.h:614: error: expected ‘)’ before ‘::’ token
.build_release/src/caffe/proto/caffe.pb.h:614: error: expected initializer before ‘::’ token
.build_release/src/caffe/proto/caffe.pb.h:615: error: expected unqualified-id before ‘::’ token
.build_release/src/caffe/proto/caffe.pb.h:615: error: expected ‘)’ before ‘::’ token
.build_release/src/caffe/proto/caffe.pb.h:615: error: expected initializer before ‘::’ token
.build_release/src/caffe/proto/caffe.pb.h:619: error: non-member function ‘bool IsInitialized()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:621: error: non-member function ‘int ByteSize()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:623: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:623: error: ‘input’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h:625: error: variable or field ‘SerializeWithCachedSizes’ declared void
.build_release/src/caffe/proto/caffe.pb.h:625: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:625: error: ‘output’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h:626: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:626: error: expected constructor, destructor, or type conversion before ‘*’ token
.build_release/src/caffe/proto/caffe.pb.h:627: error: non-member function ‘int GetCachedSize()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h: In function ‘int GetCachedSize()’:
.build_release/src/caffe/proto/caffe.pb.h:627: error: ‘cached_size’ was not declared in this scope
.build_release/src/caffe/proto/caffe.pb.h: At global scope:
.build_release/src/caffe/proto/caffe.pb.h:628: error: expected unqualified-id before ‘private’
.build_release/src/caffe/proto/caffe.pb.h:631: error: non-member function ‘void SetCachedSize(int)’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:632: error: expected unqualified-id before ‘public’
.build_release/src/caffe/proto/caffe.pb.h:641: error: non-member function ‘int blobs_size()’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:644: error: non-member function ‘const caffe::BlobProto& blobs(int)’ cannot have cv-qualifier
.build_release/src/caffe/proto/caffe.pb.h:647: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:647: error: expected initializer before ‘<’ token
.build_release/src/caffe/proto/caffe.pb.h:649: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:649: error: expected initializer before ‘<’ token
.build_release/src/caffe/proto/caffe.pb.h:653: error: expected unqualified-id before ‘private’
.build_release/src/caffe/proto/caffe.pb.h:657: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:657: error: expected constructor, destructor, or type conversion before ‘<’ token
.build_release/src/caffe/proto/caffe.pb.h:659: error: non-member ‘cached_size’ cannot be declared ‘mutable’
.build_release/src/caffe/proto/caffe.pb.h:660: error: ‘::google’ has not been declared
.build_release/src/caffe/proto/caffe.pb.h:660: error: expected constructor, destructor, or type conversion before ‘has_bits
.build_release/src/caffe/proto/caffe.pb.h:662: error: ‘friend’ used outside of class
.build_release/src/caffe/proto/caffe.pb.h:663: error: ‘friend’ used outside of class
.build_release/src/caffe/proto/caffe.pb.h:664: error: ‘friend’ used outside of class
.build_release/src/caffe/proto/caffe.pb.h:668: error: expected declaration before ‘}’ token
.build_release/src/caffe/proto/caffe.pb.h:607: warning: ‘const BlobProtoVector& default_instance()’ declared ‘static’ but never defined
.build_release/src/caffe/proto/caffe.pb.h:667: warning: ‘default_instance_’ defined but not used
.build_release/src/caffe/proto/caffe.pb.h:467: warning: ‘const caffe::BlobProto& caffe::default_instance()’ declared ‘static’ but never defined
.build_release/src/caffe/proto/caffe.pb.h:582: warning: ‘caffe::default_instance_’ defined but not used

@LearnerInGithub
Copy link

I worked on Ubuntu, I had faced this problem when I start using Caffe, my suggestion:

sudo apt-get install libprotobuf-dev

If this code still not help you remove the error, I think you need delete the libs related with protobuf in your computer, and input the above command again. Ubuntu12.04 has version problem, that's say maybe you need install manually the higher version of protobuf, but in Ubuntu14.04, no this problem. If you can't fixed the error by following the above steps, please provide more info(what type of OS are you used,.. and so on) then we can help you! Here is the installation help page: http://caffe.berkeleyvision.org/installation.html

@spandanagella
Copy link

Thanks for prompt response. Unfortunately I do not have root permissions and I'm using scientific linux (Red Hat 4.4.7-3).

I have installed all the prerequisites etc following the installation.

@LearnerInGithub
Copy link

Oh, I had tried compiling Caffe on CentOS6.5, but I found it very not convenient to install the dependency libraries, so at last I translate to Ubuntu, then everything became fine(Of course, I also meet much trouble, but better than in CentOS). So I think you need clear the installed protobuf first in your computer, and then installed the newer version, maybe this will help...

@spandanagella
Copy link

I did try cleaning up the existing version of protobuf and re-installing newer/older version and nothing seems to be working.

@LearnerInGithub
Copy link

According to your feedback, I think the libraries should not be remove, at that time, I also faced the phenomenon, after I cd into the /usr/local/lib and /usr/lib to delete the libs, then re-install, the problem solved, this require you had the root or root passwd. The second possible reson is that, becasue you lack the root privilege, so the libs not be inserted into the /usr/local/lib or /usr/lib, so make caffe can't found protobuf, so it gave you the error.

@spandanagella
Copy link

Hmm.. As I dont have root permissions I added protoc in the PATH variable and other lib and include files to LD_LIBRARY_PATH. So, I guess that shouldnt be an issue

@ZhengRui
Copy link

my experience: the server version of protobuf is 2.3, which makes "make runtest" give some error, since i don't have root access, so i can only install protobuf2.6 under my $HOME, but when i do "make all", it gives some error like " ... is produced by an older version of protobuf ...", which is due to the messed up of two versions (the default 2.3 and my customized 2.6 under my $HOME), finally i found the solution is in my .bash_profile, i have to add the $HOME/bin and $HOME/lib into $PATH, $LD_LIBRARY_PATH, very important thing to make sure that caffe is using 2.6 instead of 2.3, $HOME/bin and $HOME/lib should be put in front of $PATH, $LD_LIBRARY_PATH like this:

export PATH=$HOME/bin:$PATH
export LD_LIBRARY_PATH=$HOME/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$HOME/lib/pkgconfig:$PKG_CONFIG_PATH

to check i typed : protoc --version , it returns 2.6, "pkg-config --cflags --libs protobuf" also gives correct info, then i could pass all the compilation steps.

@lolongcovas
Copy link

I had the same problem. It seems that you have different version of google protobuf. I had remove the default installation: sudo apt-get remove --purge libprotobuf-dev

@ghost
Copy link
Author

ghost commented May 24, 2015

Hi guys,
It seems this issue has been wrongly closed while some guys haven't managed to solve the problems with protobuf, protoc, .. So I would like to open this issue and give a thorough solution which would solve most of the problems regarding protobuf during caffe installation;
Here the solution goes:

Make sure you don't have already install protobuf and other similar name files
$ sudo apt-get clean
$ sudo apt-get autoclea
$ sudo apt-get autoremove
$ sudo apt-get remove --purge proto\tab % remove all the files by pressing tab and finding those file or using *.
$ sudo dpkg -P proto\tab

After these steps you are sure that there is no already protobuf in your machine. you can do some of steps e.g. autoremove to make sure.

make sure you've tried installing: sudo apt-get install libprotobuf-dev protobuf-compiler
then download protocol-buffer: https://developers.google.com/protocol-buffers/ for your OS.
afterwards extract it in (Ubuntu)
$ tar zxvf protobuf-2.6.1.tar.gz
$ cd protobuf-2.6.1
$ ./configure
$ make && make all.
if you during make all for caffe faced with error : error while loading shared libraries: libprotoc.so.9: cannot open shared object file: No such file or directory
fix it simly by sudo ldconfig.
if make all in caffe directory gives you error during make all, try this:
mkdir build && cd build
and then make all.
In this way, it's rare that you encounter with any error during the installation regarding protobuf.
Hopefully helps.

@knightsamar
Copy link

I had the same problem and the instructions by @ghost would surely work for anyone on Debian/Ubuntu. I had CentOS but installing 2.6.1 version of protobuf worked for me.

The easiest way to debug and fix the problem that I found is looking at the source of the header file named in the first line of the error. It had the exact version of protobuf mentioned in it which was required to be present for successful compilation. Hope this helps someone! :)

@ghost
Copy link

ghost commented Nov 24, 2015

I was having the problems above on OSX10.10 because I installed protbuf, boost, etc in /opt

  1. Protobuf issue solved by

export PATH="/opt/protobuf/bin:$PATH"

  1. Include file issues

The fix, easy in retrospect, is at the end of cafee-master/Makefile.config look for the following

If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies

INCLUDE_DIRS += $(shell brew --prefix)/include

add things like this

INCLUDE_DIRS += /opt/protobuf/include
INCLUDE_DIRS += /opt/boost/include
...

  1. likewise for the link step

LIBRARY_DIRS += /opt/gflags/lib
...

Shell experts can no doubt do these steps in a more clever way..

@jenifferYingyiWu
Copy link

I execute the command "make all" under $CAFFE_HOME, but I met following errors.

protoc --version
libprotoc 3.0.0

root@jenifferwu-System-Product-Name:~/code/caffe# make all
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:0:
.build_release/src/caffe/proto/caffe.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
#error This file was generated by a newer version of protoc which is
^
.build_release/src/caffe/proto/caffe.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
#error incompatible with your Protocol Buffer headers. Please update
^
.build_release/src/caffe/proto/caffe.pb.h:14:2: error: #error your headers.
#error your headers.
^
.build_release/src/caffe/proto/caffe.pb.h:22:35: fatal error: google/protobuf/arena.h: No such file or directory
#include <google/protobuf/arena.h>
^
compilation terminated.
make: *** [.build_release/src/caffe/proto/caffe.pb.o] Error 1

@franzsetti
Copy link

I got a very similar error.
Funny thing is on another computer with the same libraries installed it works fine ;(

This is my error:
CXX/LD -o .build_release/tools/caffe.bin
.build_release/lib/libcaffe.so: undefined reference to google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' .build_release/lib/libcaffe.so: undefined reference to google::protobuf::Message::GetTypeNameabi:cxx11 const'
.build_release/lib/libcaffe.so: undefined reference to google::protobuf::Message::InitializationErrorString[abi:cxx11]() const' .build_release/lib/libcaffe.so: undefined reference to google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned char*)'
.build_release/lib/libcaffe.so: undefined reference to google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream*)' .build_release/lib/libcaffe.so: undefined reference to google::protobuf::internal::ArenaStringPtr::AssignWithDefault(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const*, google::protobuf::internal::ArenaStringPtr)'
.build_release/lib/libcaffe.so: undefined reference to google::protobuf::Message::DebugString[abi:cxx11]() const' .build_release/lib/libcaffe.so: undefined reference to google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void ()(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&))'
.build_release/lib/libcaffe.so: undefined reference to google::protobuf::MessageLite::ParseFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' .build_release/lib/libcaffe.so: undefined reference to google::protobuf::internal::fixed_address_empty_string[abi:cxx11]'
.build_release/lib/libcaffe.so: undefined reference to google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)' .build_release/lib/libcaffe.so: undefined reference to google::protobuf::internal::NameOfEnum[abi:cxx11](google::protobuf::EnumDescriptor const
, int)'
.build_release/lib/libcaffe.so: undefined reference to google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::internal::DefaultInstanceData const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)' .build_release/lib/libcaffe.so: undefined reference to google::protobuf::internal::WireFormatLite::WriteString(int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, google::protobuf::io::CodedOutputStream*)'
collect2: error: ld returned 1 exit status
Makefile:619: recipe for target '.build_release/tools/caffe.bin' failed
make: *** [.build_release/tools/caffe.bin] Error 1

@Po-Hsuan-Huang
Copy link

Hi guys,
It seems this issue has been wrongly closed while some guys haven't managed to solve the problems with protobuf, protoc, .. So I would like to open this issue and give a thorough solution which would solve most of the problems regarding protobuf during caffe installation;
Here the solution goes:

Make sure you don't have already install protobuf and other similar name files
$ sudo apt-get clean
$ sudo apt-get autoclea
$ sudo apt-get autoremove
$ sudo apt-get remove --purge proto\tab % remove all the files by pressing tab and finding those file or using *.
$ sudo dpkg -P proto\tab

After these steps you are sure that there is no already protobuf in your machine. you can do some of steps e.g. autoremove to make sure.

make sure you've tried installing: sudo apt-get install libprotobuf-dev protobuf-compiler
then download protocol-buffer: https://developers.google.com/protocol-buffers/ for your OS.
afterwards extract it in (Ubuntu)
$ tar zxvf protobuf-2.6.1.tar.gz
$ cd protobuf-2.6.1
$ ./configure
$ make && make all.
if you during make all for caffe faced with error : error while loading shared libraries: libprotoc.so.9: cannot open shared object file: No such file or directory
fix it simly by sudo ldconfig.
if make all in caffe directory gives you error during make all, try this:
mkdir build && cd build
and then make all.
In this way, it's rare that you encounter with any error during the installation regarding protobuf.
Hopefully helps

This answer needs some update, since the latest release is protobuf-3.0.0, after making sure you removed all protobuf related old files,

$ tar zxvf protobuf-3.0.0.tar.gz
$ cd protobuf-3.0.0
$ ./configure
$ make && make all.

Also, change your makefile.config according to the official guide
https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-or-15.10-Installation-Guide
Noting that some part of the instruction is not applicable to the Ubuntu 16.04

Execute the additional commands:

find . -type f -exec sed -i -e 's^"hdf5.h"^"hdf5/serial/hdf5.h"^g' -e 's^"hdf5_hl.h"^"hdf5/serial/hdf5_hl.h"^g' '{}' ;

cd /usr/lib/x86_64-linux-gnu

sudo ln -s libhdf5_serial.so.8.0.2 libhdf5.so

sudo ln -s libhdf5_serial_hl.so.8.0.2 libhdf5_hl.so

The above commands are no longer needed on Ubuntu 16.04 after a certain system update.

@jaypanda
Copy link

jaypanda commented Jun 4, 2017

apt-get installs a version for libprotobuf-dev [For example 2.6.1] and pip installs the latest [For example 3.3.0] which creates the conflict. Solved this by installing 2.6.1 via pip as well
sudo apt-get install libprotobuf-dev #check the version installed, say 2.6.1
sudo pip install protobuf==2.6.1

@YoungJimmy
Copy link

Hi, guys, I have meet the similar issue, My protobuf version is 2.6.1 AS follows:

.build_release/src/caffe/proto/caffe.pb.h:22391:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::WindowDataParameter::has_bg_threshold() const’:
.build_release/src/caffe/proto/caffe.pb.h:22415:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::WindowDataParameter::has_fg_fraction() const’:
.build_release/src/caffe/proto/caffe.pb.h:22439:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::WindowDataParameter::has_context_pad() const’:
.build_release/src/caffe/proto/caffe.pb.h:22463:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::WindowDataParameter::has_cache_images() const’:
.build_release/src/caffe/proto/caffe.pb.h:22549:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::SPPParameter::has_pyramid_height() const’:
.build_release/src/caffe/proto/caffe.pb.h:22639:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::SPPParameter::has_pool() const’:
.build_release/src/caffe/proto/caffe.pb.h:22663:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::SPPParameter::has_engine() const’:
.build_release/src/caffe/proto/caffe.pb.h:22688:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_name() const’:
.build_release/src/caffe/proto/caffe.pb.h:22827:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_accuracy_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23181:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_argmax_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23226:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_concat_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23271:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_contrastive_loss_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23316:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_convolution_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23361:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_data_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23406:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_dropout_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23451:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_dummy_data_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23496:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_eltwise_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23541:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_exp_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23586:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_hdf5_data_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23631:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_hdf5_output_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23676:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_hinge_loss_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23721:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_image_data_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23766:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_infogain_loss_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23811:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_inner_product_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23856:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_lrn_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23901:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_memory_data_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23946:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_mvn_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:23991:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_pooling_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:24036:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_power_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:24081:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_relu_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:24126:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_sigmoid_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:24171:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_softmax_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:24216:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_slice_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:24261:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_tanh_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:24306:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_threshold_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:24351:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_window_data_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:24396:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_transform_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:24441:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_loss_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:24486:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_layer() const’:
.build_release/src/caffe/proto/caffe.pb.h:24531:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘const string& caffe::V1LayerParameter::name() const’:
.build_release/src/caffe/proto/caffe.pb.h:22841:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V1LayerParameter::has_type() const’:
.build_release/src/caffe/proto/caffe.pb.h:22949:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_name() const’:
.build_release/src/caffe/proto/caffe.pb.h:24580:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_type() const’:
.build_release/src/caffe/proto/caffe.pb.h:24642:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_source() const’:
.build_release/src/caffe/proto/caffe.pb.h:25083:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_meanfile() const’:
.build_release/src/caffe/proto/caffe.pb.h:25169:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_det_crop_mode() const’:
.build_release/src/caffe/proto/caffe.pb.h:25513:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_weight_filler() const’:
.build_release/src/caffe/proto/caffe.pb.h:24752:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_bias_filler() const’:
.build_release/src/caffe/proto/caffe.pb.h:24797:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_hdf5_output_param() const’:
.build_release/src/caffe/proto/caffe.pb.h:25719:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘const string& caffe::V0LayerParameter::name() const’:
.build_release/src/caffe/proto/caffe.pb.h:24594:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘const string& caffe::V0LayerParameter::type() const’:
.build_release/src/caffe/proto/caffe.pb.h:24656:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘const string& caffe::V0LayerParameter::source() const’:
.build_release/src/caffe/proto/caffe.pb.h:25097:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘const string& caffe::V0LayerParameter::meanfile() const’:
.build_release/src/caffe/proto/caffe.pb.h:25183:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘std::string* caffe::V0LayerParameter::mutable_det_crop_mode()’:
.build_release/src/caffe/proto/caffe.pb.h:25556:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘const string& caffe::V0LayerParameter::det_crop_mode() const’:
.build_release/src/caffe/proto/caffe.pb.h:25527:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_num_output() const’:
.build_release/src/caffe/proto/caffe.pb.h:24704:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_biasterm() const’:
.build_release/src/caffe/proto/caffe.pb.h:24728:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_pad() const’:
.build_release/src/caffe/proto/caffe.pb.h:24842:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_kernelsize() const’:
.build_release/src/caffe/proto/caffe.pb.h:24866:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_group() const’:
.build_release/src/caffe/proto/caffe.pb.h:24890:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_stride() const’:
.build_release/src/caffe/proto/caffe.pb.h:24914:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_pool() const’:
.build_release/src/caffe/proto/caffe.pb.h:24938:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_dropout_ratio() const’:
.build_release/src/caffe/proto/caffe.pb.h:24963:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_local_size() const’:
.build_release/src/caffe/proto/caffe.pb.h:24987:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_alpha() const’:
.build_release/src/caffe/proto/caffe.pb.h:25011:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_beta() const’:
.build_release/src/caffe/proto/caffe.pb.h:25035:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_scale() const’:
.build_release/src/caffe/proto/caffe.pb.h:25145:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_batchsize() const’:
.build_release/src/caffe/proto/caffe.pb.h:25231:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_cropsize() const’:
.build_release/src/caffe/proto/caffe.pb.h:25255:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_mirror() const’:
.build_release/src/caffe/proto/caffe.pb.h:25279:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_k() const’:
.build_release/src/caffe/proto/caffe.pb.h:25059:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_rand_skip() const’:
.build_release/src/caffe/proto/caffe.pb.h:25393:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_det_fg_threshold() const’:
.build_release/src/caffe/proto/caffe.pb.h:25417:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_det_bg_threshold() const’:
.build_release/src/caffe/proto/caffe.pb.h:25441:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_det_fg_fraction() const’:
.build_release/src/caffe/proto/caffe.pb.h:25465:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_det_context_pad() const’:
.build_release/src/caffe/proto/caffe.pb.h:25489:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_new_num() const’:
.build_release/src/caffe/proto/caffe.pb.h:25575:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_new_channels() const’:
.build_release/src/caffe/proto/caffe.pb.h:25599:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_new_height() const’:
.build_release/src/caffe/proto/caffe.pb.h:25623:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_new_width() const’:
.build_release/src/caffe/proto/caffe.pb.h:25647:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_shuffle_images() const’:
.build_release/src/caffe/proto/caffe.pb.h:25671:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::V0LayerParameter::has_concat_dim() const’:
.build_release/src/caffe/proto/caffe.pb.h:25695:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::PReLUParameter::has_filler() const’:
.build_release/src/caffe/proto/caffe.pb.h:25768:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
.build_release/src/caffe/proto/caffe.pb.h: In member function ‘bool caffe::PReLUParameter::has_channel_shared() const’:
.build_release/src/caffe/proto/caffe.pb.h:25813:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make: *** [.build_release/src/caffe/proto/caffe.pb.o] Error 1

Please Help! thank u guys!

@ZubairKhan001
Copy link

ZubairKhan001 commented Feb 9, 2018

i have compiled caffe on Ubuntu 16.04 LTS both with python 2 and python, it is really a hectic process for beginners, for caffe with python 2.7 make sure that your /.local/lib/python2.7/site-packages only contains a version same as you protoc version. protoc version can be checked by entering
protoc --version
for me i got problems with python 2.7 because by mistake i installed protbuf 3.0 alpha in python 2.7 site packages, so there was a protobuf error after removing it from python 2.7 site packages everything worked fine
also install python-dev version
apt-get install the python3.x-dev
and for python 3.5 make sure you have python 3.0 alpha, if you have both python 2.7 and python 3.x in the system use pip3 otherwise use pip

pip3 install protobuf==3.0.0-alpha-3

or another protobuf such as 3.5 version of protobuf.
also do this
pip3 install python-dateutil --upgrade
after that do
make clean
make all
make runtest
make pycaffe
after performing make all make runtest steps don't forget to do that
sudo ldconfig

hope everything works OK for you.

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

No branches or pull requests

16 participants