singa
singa copied to clipboard
SINGA-270 Installation error: include/singa/proto/ is not in /usr/local/include
Fix the installation path of include/singa/proto.
I tried the PR. The directory /usr/local/include/singa/proto/ exists now, but there is a compile error when I try to compile test.cpp from #272 :
$ g++ ./test.cpp -l singa In file included from /usr/local/include/singa/core/memory.h:24:0, from /usr/local/include/singa/core/device.h:30, from /usr/local/include/singa/core/tensor.h:27, from /usr/local/include/singa/io/encoder.h:24, from ./test.cpp:1: /usr/local/include/singa/proto/core.pb.h:17:2: error: #error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^~~~~ /usr/local/include/singa/proto/core.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^~~~~ /usr/local/include/singa/proto/core.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc. ^~~~~ In file included from /usr/local/include/singa/io/encoder.h:25:0, from ./test.cpp:1: /usr/local/include/singa/proto/io.pb.h:17:2: error: #error This file was generated by an older version of protoc which is #error This file was generated by an older version of protoc which is ^~~~~ /usr/local/include/singa/proto/io.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please #error incompatible with your Protocol Buffer headers. Please ^~~~~ /usr/local/include/singa/proto/io.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. #error regenerate this file with a newer version of protoc.
The problem is caused by using two different protobuf libs. Please make sure you use the same version of protobuf for compiling your own code and the singa code.
Ok. I think the problem is fixed now and the PR can be merged. Thank you.