Home | Tutorials | Wiki | Issues
Ask Your Question
1

"This file was generated by an older version of protoc" while following Gazebo tutorial.

asked 2013-10-14 21:50:49 -0600

Alkaros gravatar image

Running Ubuntu 13.04 and Gazebo 1.9

I'm trying to follow the tutorial found here but when I try to make it, it returns a huge page of errors based around the version of protoc I have.

I have also tried this newer version of the tutorial.

Here is a snapshot:

In file included from /usr/include/gazebo-1.9/gazebo/msgs/MessageTypes.hh:91:0,
                 from /usr/include/gazebo-1.9/gazebo/msgs/msgs.hh:24,
                 from /usr/include/gazebo-1.9/gazebo/physics/Entity.hh:28,
                 from /usr/include/gazebo-1.9/gazebo/physics/Model.hh:32,
                 from /home/thesis/gazebo_animate_pose/animate_pose.cc:4:
/usr/include/gazebo-1.9/gazebo/msgs/wrench_stamped.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
/usr/include/gazebo-1.9/gazebo/msgs/wrench_stamped.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
/usr/include/gazebo-1.9/gazebo/msgs/wrench_stamped.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
make[2]: *** [CMakeFiles/animate_pose.dir/animate_pose.cc.o] Error 1
make[1]: *** [CMakeFiles/animate_pose.dir/all] Error 2
make: *** [all] Error 2
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-12-07 18:26:01 -0600

scpeters gravatar image

This sounds like a problem with the version of protobuf that is being used. When I look at the autogenerated .pb.h header files, I see compiler directives like the following

#if GOOGLE_PROTOBUF_VERSION < 2005000
#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 2005000 < 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

I'm using the default protobuf version on my trusty machine (2.5.0), and it has GOOGLE_PROTOBUF_VERSION defined as 2005000 on line 116 of /usr/include/google/protobuf/stubs/common.h. So I'm guessing could be caused by using a different version of protobuf than the version used when the gazebo debian packages were compiled?

edit flag offensive delete link more

Comments

after testing the same build on a different Ubuntu computer, I've concluded that something upgraded my protobuf protoc versions in /usr/local space. I tried to delete all the newer files and reinstall the old version, but there is some unknown file that is still causing protoc to crash. I've decided to just reformat my year old Ubuntu, it could use a refresher anyway.

davetcoleman gravatar imagedavetcoleman ( 2015-12-08 15:33:57 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2013-10-14 21:50:49 -0600

Seen: 16,587 times

Last updated: Dec 07 '15