PX4-SITL_gazebo-classic icon indicating copy to clipboard operation
PX4-SITL_gazebo-classic copied to clipboard

make px4_sitl_rtps gazebo delivers Protocol Buffer error

Open tamasso-parec opened this issue 1 year ago • 0 comments

I'm on Ubuntu 20.04 trying to follow the procedure described in here to work with ROS2. I have ROS2 Foxy installed by following the procedure from the ROS website.

I am performing the Sanity Check and failing at the very first step. I cloned the repository for PX4-Autopilot: git clone https://github.com/PX4/PX4-Autopilot.git --recursive And used the script provided: bash ./PX4-Autopilot/Tools/setup/ubuntu.sh

Once I try to run: make px4_sitl_rtps gazebo

The build fails right away and I obtain an extremely long output that I attach here: Output_error.txt. The first few lines read:

[0/8] Performing build step for 'sitl_gazebo' [1/101] Building CXX object CMakeFiles/physics_msgs.dir/Wind.pb.cc.o FAILED: CMakeFiles/physics_msgs.dir/Wind.pb.cc.o /usr/lib/ccache/c++ -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_DATE_TIME_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_TEST_DYN_LINK -DBOOST_THREAD_DYN_LINK -DLIBBULLET_VERSION=2.88 -DLIBBULLET_VERSION_GT_282 -Dphysics_msgs_EXPORTS -I/home/tom/Documents/PX4-Autopilot/Tools/sitl_gazebo/include -I. -I/usr/include/eigen3/eigen3 -I/usr/include/gazebo-11/gazebo/msgs -I/home/tom/Documents/PX4-Autopilot/build/px4_sitl_rtps/mavlink -I/usr/include/Paging -I/home/tom/Documents/PX4-Autopilot/Tools/sitl_gazebo/external/OpticalFlow/include -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/gazebo-11 -isystem /usr/include/bullet -isystem /usr/include/simbody -isystem /usr/include/sdformat-9.8 -isystem /usr/include/ignition/math6 -isystem /usr/include/OGRE -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/ignition/transport8 -isystem /usr/include/ignition/msgs5 -isystem /usr/include/ignition/common3 -isystem /usr/include/ignition/fuel_tools4 -isystem /home/tom/anaconda3/include/qt -isystem /home/tom/anaconda3/include/qt/QtCore -isystem /home/tom/anaconda3/./mkspecs/linux-g++ -isystem /usr/include/eigen3 -isystem /usr/include/opencv4 -isystem /usr/include/sdformat-9.8/sdf/.. -isystem /usr/include/ignition/cmake2 -isystem /usr/include/uuid -O2 -g -DNDEBUG -fPIC -Wno-deprecated-declarations -Wno-address-of-packed-member -I/usr/include/uuid -std=gnu++17 -MD -MT CMakeFiles/physics_msgs.dir/Wind.pb.cc.o -MF CMakeFiles/physics_msgs.dir/Wind.pb.cc.o.d -o CMakeFiles/physics_msgs.dir/Wind.pb.cc.o -c Wind.pb.cc In file included from Wind.pb.h:35, from Wind.pb.cc:4: /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:17:2: error: #error This file was generated by an older version of protoc which is 17 | #error This file was generated by an older version of protoc which is | ^~~~~ /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please 18 | #error incompatible with your Protocol Buffer headers. Please | ^~~~~ /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. 19 | #error regenerate this file with a newer version of protoc. | ^~~~~ In file included from Wind.pb.h:35, from Wind.pb.cc:4: /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:200:33: error: ‘InternalMetadataWithArena’ in namespace ‘google::protobuf::internal’ does not name a type; did you mean ‘InternalMetadata’? 200 | ::google::protobuf::internal::InternalMetadataWithArena internal_metadata; | ^~~~~~~~~~~~~~~~~~~~~~~~~ | InternalMetadata /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:139:8: error: ‘bool gazebo::msgs::Vector3d::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)’ marked ‘final’, but is not virtual 139 | bool MergePartialFromCodedStream( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:141:8: error: ‘void gazebo::msgs::Vector3d::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const’ marked ‘final’, but is not virtual 141 | void SerializeWithCachedSizes( | ^~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:143:30: error: ‘google::protobuf::uint8* gazebo::msgs::Vector3d::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const’ marked ‘final’, but is not virtual 143 | ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h: In member function ‘const google::protobuf::UnknownFieldSet& gazebo::msgs::Vector3d::unknown_fields() const’: /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:100:47: error: no matching function for call to ‘google::protobuf::internal::InternalMetadata::unknown_fields() const’ 100 | return internal_metadata.unknown_fields(); | ^ In file included from /usr/local/include/google/protobuf/message_lite.h:49, from /usr/local/include/google/protobuf/generated_enum_util.h:36, from /usr/local/include/google/protobuf/map.h:49, from /usr/local/include/google/protobuf/generated_message_table_driven.h:34, from Wind.pb.h:26, from Wind.pb.cc:4: /usr/local/include/google/protobuf/metadata_lite.h:87:35: note: candidate: ‘template<class T> const T& google::protobuf::internal::InternalMetadata::unknown_fields(const T& ()()) const’ 87 | PROTOBUF_ALWAYS_INLINE const T& unknown_fields( | ^~~~~~~~~~~~~~ /usr/local/include/google/protobuf/metadata_lite.h:87:35: note: template argument deduction/substitution failed: In file included from Wind.pb.h:35, from Wind.pb.cc:4: /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:100:47: note: candidate expects 1 argument, 0 provided 100 | return internal_metadata.unknown_fields(); | ^ /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h: In member function ‘google::protobuf::UnknownFieldSet gazebo::msgs::Vector3d::mutable_unknown_fields()’: /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:103:55: error: no matching function for call to ‘google::protobuf::internal::InternalMetadata::mutable_unknown_fields()’ 103 | return internal_metadata.mutable_unknown_fields(); | ^ In file included from /usr/local/include/google/protobuf/message_lite.h:49, from /usr/local/include/google/protobuf/generated_enum_util.h:36, from /usr/local/include/google/protobuf/map.h:49, from /usr/local/include/google/protobuf/generated_message_table_driven.h:34, from Wind.pb.h:26, from Wind.pb.cc:4: /usr/local/include/google/protobuf/metadata_lite.h:97:29: note: candidate: ‘template<class T> T* google::protobuf::internal::InternalMetadata::mutable_unknown_fields()’ 97 | PROTOBUF_ALWAYS_INLINE T* mutable_unknown_fields() { | ^~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/google/protobuf/metadata_lite.h:97:29: note: template argument deduction/substitution failed: In file included from Wind.pb.h:35, from Wind.pb.cc:4: /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:103:55: note: couldn’t deduce template parameter ‘T’ 103 | return internal_metadata.mutable_unknown_fields(); | ^ Wind.pb.cc: At global scope: Wind.pb.cc:17:8: error: ‘PROTOBUF_INTERNAL_EXPORT_vector3d_2eproto’ does not name a type; did you mean ‘PROTOBUF_INTERNAL_EXPORT_Wind_2eproto’? 17 | extern PROTOBUF_INTERNAL_EXPORT_vector3d_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Vector3d_vector3d_2eproto; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | PROTOBUF_INTERNAL_EXPORT_Wind_2eproto Wind.pb.cc:39:8: error: ‘scc_info_Vector3d_vector3d_2eproto’ was not declared in this scope 39 | &scc_info_Vector3d_vector3d_2eproto.base,}}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Wind.pb.cc:73:6: error: ‘::descriptor_table_vector3d_2eproto’ has not been declared; did you mean ‘descriptor_table_Wind_2eproto’? 73 | &::descriptor_table_vector3d_2eproto, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | descriptor_table_Wind_2eproto [2/101] Building CXX object CMakeFiles/sensor_msgs.dir/MagneticField.pb.cc.o FAILED: CMakeFiles/sensor_msgs.dir/MagneticField.pb.cc.o /usr/lib/ccache/c++ -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_DATE_TIME_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_TEST_DYN_LINK -DBOOST_THREAD_DYN_LINK -DLIBBULLET_VERSION=2.88 -DLIBBULLET_VERSION_GT_282 -Dsensor_msgs_EXPORTS -I/home/tom/Documents/PX4-Autopilot/Tools/sitl_gazebo/include -I. -I/usr/include/eigen3/eigen3 -I/usr/include/gazebo-11/gazebo/msgs -I/home/tom/Documents/PX4-Autopilot/build/px4_sitl_rtps/mavlink -I/usr/include/Paging -I/home/tom/Documents/PX4-Autopilot/Tools/sitl_gazebo/external/OpticalFlow/include -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -isystem /usr/include/gazebo-11 -isystem /usr/include/bullet -isystem /usr/include/simbody -isystem /usr/include/sdformat-9.8 -isystem /usr/include/ignition/math6 -isystem /usr/include/OGRE -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/ignition/transport8 -isystem /usr/include/ignition/msgs5 -isystem /usr/include/ignition/common3 -isystem /usr/include/ignition/fuel_tools4 -isystem /home/tom/anaconda3/include/qt -isystem /home/tom/anaconda3/include/qt/QtCore -isystem /home/tom/anaconda3/./mkspecs/linux-g++ -isystem /usr/include/eigen3 -isystem /usr/include/opencv4 -isystem /usr/include/sdformat-9.8/sdf/.. -isystem /usr/include/ignition/cmake2 -isystem /usr/include/uuid -O2 -g -DNDEBUG -fPIC -Wno-deprecated-declarations -Wno-address-of-packed-member -I/usr/include/uuid -std=gnu++17 -MD -MT CMakeFiles/sensor_msgs.dir/MagneticField.pb.cc.o -MF CMakeFiles/sensor_msgs.dir/MagneticField.pb.cc.o.d -o CMakeFiles/sensor_msgs.dir/MagneticField.pb.cc.o -c MagneticField.pb.cc In file included from MagneticField.pb.h:35, from MagneticField.pb.cc:4: /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:17:2: error: #error This file was generated by an older version of protoc which is 17 | #error This file was generated by an older version of protoc which is | ^~~~~ /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please 18 | #error incompatible with your Protocol Buffer headers. Please | ^~~~~ /usr/include/gazebo-11/gazebo/msgs/vector3d.pb.h:19:2: error: #error regenerate this file with a newer version of protoc. 19 | #error regenerate this file with a newer version of protoc. | ^~~~~

The line: "This file was generated by an older version of protoc which is incompatible with your Protocol Buffer headers. Please regenerate this file with a newer version of protoc. " is recurrent in the error message and I am not sure if that is the source of the error or just a consequence.

Thank You for any help You can give me.

tamasso-parec avatar Jul 26 '22 10:07 tamasso-parec