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

Issues with files generated by newer version of protoc #31

Open
sjdrc opened this issue Oct 19, 2017 · 4 comments
Open

Issues with files generated by newer version of protoc #31

sjdrc opened this issue Oct 19, 2017 · 4 comments

Comments

@sjdrc
Copy link

sjdrc commented Oct 19, 2017

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.

@jorgealemangonzalez
Copy link

Same error here. You found some solution @sjdrc ?

@sjdrc
Copy link
Author

sjdrc commented Nov 2, 2017

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.

@Georg-W
Copy link

Georg-W commented Jul 22, 2018

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.

@nkjassal
Copy link

I was able to build tensorflow using local dependencies via bazelbuild/bazel#3737 (comment)

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

4 participants