Makefile:147: recipe for target 'posix_sitl_default' failed

asked 2018-03-16 02:35:39 -0600

Yograj gravatar image

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 ...
(more)
edit retag flag offensive close merge delete