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

fatal error: google/protobuf/arena.h: No such file or directory #138

Closed
mattshma opened this issue Dec 28, 2018 · 0 comments
Closed

fatal error: google/protobuf/arena.h: No such file or directory #138

mattshma opened this issue Dec 28, 2018 · 0 comments

Comments

@mattshma
Copy link
Owner

mattshma commented Dec 28, 2018

编译 caffe 时报错如下:

In file included from ./include/caffe/util/cudnn.hpp:8:0,
                 from ./include/caffe/util/device_alternate.hpp:40,
                 from ./include/caffe/common.hpp:19,
                 from ./include/caffe/blob.hpp:8,
                 from src/caffe/blob.cpp: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
 #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.
  ^
In file included from ./include/caffe/util/cudnn.hpp:8:0,
                 from ./include/caffe/util/device_alternate.hpp:40,
                 from ./include/caffe/common.hpp:19,
                 from ./include/caffe/blob.hpp:8,
                 from src/caffe/blob.cpp:4:
.build_release/src/caffe/proto/caffe.pb.h:23:35: fatal error: google/protobuf/arena.h: No such file or directory
compilation terminated.
Makefile:581: recipe for target '.build_release/src/caffe/parallel.o' failed
make: *** [.build_release/src/caffe/parallel.o] Error 1

查了下,一个很常见的问题。判断是 anaconda 中 protobuf 与 caffe 需要的 protobuf 版本不一致导致的,查了下相关 #5645。执行如下命令:

make clean
conda uninstall protobuf libprotobuf
make all -j4
make pycaffe
conda install --quiet --yes protobuf libprotobuf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant