Issues with files generated by newer version of protoc
sjdrc opened this issue · 4 comments
I've attempted to compile the examples in this repository after installing eigen and protobuf locally using your scripts. While making the example, I get many errors like this:
In file included from /usr/local/include/google/tensorflow/tensorflow/core/public/session.h:22:0,
from /home/sebastien/tensorflow-cmake/examples/install-project/main.cc:1:
/usr/local/include/google/tensorflow/tensorflow/core/framework/device_attributes.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
^
/usr/local/include/google/tensorflow/tensorflow/core/framework/device_attributes.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
#error incompatible with your Protocol Buffer headers. Please update
^
/usr/local/include/google/tensorflow/tensorflow/core/framework/device_attributes.pb.h:14:2: error: #error your headers.
#error your headers.
^
What is the issue here? Is my version of TensorFlow too new? Thanks for the help.
Same error here. You found some solution @sjdrc ?
Hey @jorgealemangonzalez, I ended up using https://github.com/FloopCZ/tensorflow_cc, it was much easier to get working. Check the open issues in the tracker over there, I managed to resolve them fairly painlessly.
I had the same issue:
My local system had protoc 3.6 installed, while the generated protobuf files in tensorflow (1.9.0) needed the exact version 3.5.
You can look the required version up in the "bazel-genfiles/tensorflow/core/protobuf" folder and cat any of the .h files in the directory. E.g cluster.pb.h specifies in the header:
#if GOOGLE_PROTOBUF_VERSION < 3005000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
Installing the required version resolved the issue.
I was able to build tensorflow using local dependencies via bazelbuild/bazel#3737 (comment)