Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Makefile:147: recipe for target 'posix_sitl_default' failed

I cloned px4 and I am trying to build SITL(software in the loop) simulation by running:-

make posix_sitl_default gazebo

But I am getting error although I have protoc version 3.5

-- Build files have been written to: /home/yograj/src/Firmware/build/posix_sitl_default/build_gazebo
[3/6] Performing build step for 'sitl_gazebo'
FAILED: cd /home/yograj/src/Firmware/build/posix_sitl_default/build_gazebo && /usr/bin/cmake --build . && /usr/bin/cmake -E touch /home/yograj/src/Firmware/build/posix_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-build
[1/33] Building CXX object CMakeFiles/mav_msgs.dir/SensorImu.pb.cc.o
FAILED: /usr/bin/c++   -Dmav_msgs_EXPORTS -isystem /usr/include/gazebo-7 -isystem /usr/include/sdformat-4.4 -isystem /usr/include/ignition/math2 -isystem /usr/include/OGRE -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -I/home/yograj/src/Firmware/Tools/sitl_gazebo/include -I/home/yograj/src/Firmware/Tools/sitl_gazebo/external/OpticalFlow/include -I/usr/include/gazebo-7/gazebo/msgs -I/usr/include/eigen3 -isystem /opt/ros/kinetic/include/opencv-3.3.1 -isystem /opt/ros/kinetic/include/opencv-3.3.1/opencv -I. -I/usr/include/eigen3/eigen3 -I/usr/local/include/OGRE -I/usr/local/include/OGRE/Paging -I/opt/ros/kinetic/include -std=c++11 -std=c++11 -Wno-deprecated-declarations -fPIC -MMD -MT CMakeFiles/mav_msgs.dir/SensorImu.pb.cc.o -MF CMakeFiles/mav_msgs.dir/SensorImu.pb.cc.o.d -o CMakeFiles/mav_msgs.dir/SensorImu.pb.cc.o -c SensorImu.pb.cc
In file included from SensorImu.pb.h:32:0,
                 from SensorImu.pb.cc:4:
/usr/include/gazebo-7/gazebo/msgs/quaternion.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/include/gazebo-7/gazebo/msgs/quaternion.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
 #error incompatible with your Protocol Buffer headers.  Please
  ^
/usr/include/gazebo-7/gazebo/msgs/quaternion.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 SensorImu.pb.h:33:0,
                 from SensorImu.pb.cc:4:
/usr/include/gazebo-7/gazebo/msgs/vector3d.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/include/gazebo-7/gazebo/msgs/vector3d.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
 #error incompatible with your Protocol Buffer headers.  Please
  ^
/usr/include/gazebo-7/gazebo/msgs/vector3d.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 SensorImu.pb.cc:4:0:
SensorImu.pb.h: In member function ‘const gazebo::msgs::Quaternion& sensor_msgs::msgs::Imu::orientation() const’:
SensorImu.pb.h:269:8: error: ‘_Quaternion_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Quaternion_default_instance_);
        ^
SensorImu.pb.h: In member function ‘const gazebo::msgs::Vector3d& sensor_msgs::msgs::Imu::angular_velocity() const’:
SensorImu.pb.h:349:8: error: ‘_Vector3d_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Vector3d_default_instance_);
        ^
SensorImu.pb.h: In member function ‘const gazebo::msgs::Vector3d& sensor_msgs::msgs::Imu::linear_acceleration() const’:
SensorImu.pb.h:429:8: error: ‘_Vector3d_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Vector3d_default_instance_);
        ^
SensorImu.pb.cc: In function ‘void protobuf_SensorImu_2eproto::InitDefaultsImuImpl()’:
SensorImu.pb.cc:40:3: error: ‘protobuf_quaternion_2eproto’ has not been declared
   protobuf_quaternion_2eproto::InitDefaultsQuaternion();
   ^
SensorImu.pb.cc:41:3: error: ‘protobuf_vector3d_2eproto’ has not been declared
   protobuf_vector3d_2eproto::InitDefaultsVector3d();
   ^
SensorImu.pb.cc: In function ‘void protobuf_SensorImu_2eproto::AddDescriptorsImpl()’:
SensorImu.pb.cc:120:5: error: ‘::protobuf_quaternion_2eproto’ has not been declared
   ::protobuf_quaternion_2eproto::AddDescriptors();
     ^
SensorImu.pb.cc:121:5: error: ‘::protobuf_vector3d_2eproto’ has not been declared
   ::protobuf_vector3d_2eproto::AddDescriptors();
     ^
SensorImu.pb.cc: In static member function ‘static void sensor_msgs::msgs::Imu::InitAsDefaultInstance()’:
SensorImu.pb.cc:142:7: error: ‘internal_default_instance’ is not a member of ‘gazebo::msgs::Quaternion’
       ::gazebo::msgs::Quaternion::internal_default_instance());
       ^
SensorImu.pb.cc:144:7: error: ‘internal_default_instance’ is not a member of ‘gazebo::msgs::Vector3d’
       ::gazebo::msgs::Vector3d::internal_default_instance());
       ^
SensorImu.pb.cc:146:7: error: ‘internal_default_instance’ is not a member of ‘gazebo::msgs::Vector3d’
       ::gazebo::msgs::Vector3d::internal_default_instance());
       ^
ninja: build stopped: subcommand failed.
ninja: build stopped: subcommand failed.
Makefile:147: recipe for target 'posix_sitl_default' failed
make: *** [posix_sitl_default] Error 1