Robotics StackExchange | Archived questions

make: *** [px4_sitl] Error 1

I downloaded and built PX4 source code. Then I ran the jMAVSim simulator with

make px4_sitl jmavsim

everything works fine. Then I tried to run the Gazebo simulator with

make px4_sitl gazebo

but I am receiving the following error:

Makefile:197: recipe for target 'px4_sitl' failed
make: *** [px4_sitl] Error 1

My ROS settings are:

declare -x ROSLISP_PACKAGE_DIRECTORIES="/home/csgurel/catkin_ws/devel/share/common-lisp"
declare -x ROS_DISTRO="kinetic"
declare -x ROS_ETC_DIR="/opt/ros/kinetic/etc/ros"
declare -x ROS_PACKAGE_PATH="/home/csgurel/catkin_ws/src:/opt/ros/kinetic/share"
declare -x ROS_ROOT="/opt/ros/kinetic/share/ros"
declare -x ROS_VERSION="1"

and I am using Ubuntu 16.04. In case you want to see it, the full output is:

[2/6] Performing configure step for 'sitl_gazebo'
-- install-prefix: /usr/local
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   thread
--   timer
--   filesystem
--   chrono
--   date_time
--   atomic
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   thread
--   system
--   filesystem
--   program_options
--   regex
--   iostreams
--   date_time
--   chrono
--   atomic
-- Boost version: 1.58.0
-- Looking for OGRE...
-- Found Ogre Ghadamon (1.9.0)
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Found Protobuf: /usr/local/lib/libprotobuf.a (Required is at least version "2.3.0") 
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
--   Found libzmq , version 4.1.4
-- Checking for module 'uuid'
--   Found uuid, version 2.27.0
-- Checking for module 'tinyxml2'
--   Found tinyxml2, version 2.2.0
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- FreeImage.pc not found, we will search for FreeImage_INCLUDE_DIRS and FreeImage_LIBRARIES
-- Checking for module 'gts'
--   Found gts, version 0.7.6
-- Checking for module 'libswscale'
--   Found libswscale, version 3.1.101
-- Checking for module 'libavdevice >= 56.4.100'
--   Found libavdevice , version 56.4.100
-- Checking for module 'libavformat'
--   Found libavformat, version 56.40.101
-- Checking for module 'libavcodec'
--   Found libavcodec, version 56.60.100
-- Checking for module 'libavutil'
--   Found libavutil, version 54.31.100
-- Checking for module 'jsoncpp'
--   Found jsoncpp, version 1.7.2
-- Checking for module 'yaml-0.1'
--   Found yaml-0.1, version 0.1.6
-- Checking for module 'libzip'
--   Found libzip, version 1.0.1
-- Building klt_feature_tracker without catkin
-- Building OpticalFlow with OpenCV
-- catkin DISABLED
-- Found Protobuf: /usr/local/lib/libprotobuf.a  
Gazebo version: 9.6
-- Using C++14 compiler
-- Configuring done
-- Generating done
-- Build files have been written to: /home/csgurel/src/Firmware/build/px4_sitl_default/build_gazebo
[3/6] Performing build step for 'sitl_gazebo'
FAILED: cd /home/csgurel/src/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/cmake --build . && /usr/bin/cmake -E touch /home/csgurel/src/Firmware/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-build
[1/50] Building CXX object CMakeFiles/sensor_msgs.dir/Imu.pb.cc.o
[2/50] Linking CXX shared library libmav_msgs.so
[3/50] Linking CXX shared library libstd_msgs.so
[4/50] Building CXX object CMakeFiles/sensor_msgs.dir/Range.pb.cc.o
[5/50] Building CXX object CMakeFiles/sensor_msgs.dir/SITLGps.pb.cc.o
[6/50] Building CXX object CMakeFiles/sensor_msgs.dir/OpticalFlow.pb.cc.o
[7/50] Building CXX object CMakeFiles/nav_msgs.dir/Odometry.pb.cc.o
[8/50] Linking CXX static library OpticalFlow/klt_feature_tracker/libklt_feature_tracker.a
[9/50] Building CXX object CMakeFiles/physics_msgs.dir/Wind.pb.cc.o
[10/50] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/optical_flow.cpp.o
[11/50] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/px4flow.cpp.o
[12/50] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_px4.cpp.o
[13/50] Building CXX object OpticalFlow/CMakeFiles/OpticalFlow.dir/src/flow_opencv.cpp.o
FAILED: /usr/bin/c++   -DLIBBULLET_VERSION=2.83 -DLIBBULLET_VERSION_GT_282 -Dphysics_msgs_EXPORTS -isystem /usr/include/gazebo-9 -isystem /usr/include/bullet -isystem /usr/include/simbody -isystem /usr/local/include -isystem /usr/include/sdformat-6.2 -isystem /usr/include/ignition/math4 -isystem /usr/include/OGRE -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/ignition/transport4 -isystem /usr/include/ignition/msgs1 -isystem /usr/include/ignition/common1 -isystem /usr/include/ignition/fuel_tools1 -I/home/csgurel/src/Firmware/Tools/sitl_gazebo/include -I. -I/usr/include/eigen3 -I/usr/include/eigen3/eigen3 -I/usr/include/gazebo-9/gazebo/msgs -I/home/csgurel/src/Firmware/mavlink/include -I/usr/include/Paging -isystem /opt/ros/kinetic/include/opencv-3.3.1-dev -isystem /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv -I/home/csgurel/src/Firmware/Tools/sitl_gazebo/external/OpticalFlow/include -isystem /usr/include/uuid -isystem /usr/include/x86_64-linux-gnu -Wno-deprecated-declarations -fPIC   -I/usr/include/uuid -I/usr/include/x86_64-linux-gnu -std=gnu++14 -MMD -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:32:0,
                 from Wind.pb.cc:5:
/usr/include/gazebo-9/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-9/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-9/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 Wind.pb.cc:5:0:
Wind.pb.h: In member function ‘const gazebo::msgs::Vector3d& physics_msgs::msgs::Wind::force() const’:
Wind.pb.h:318:8: error: ‘_Vector3d_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Vector3d_default_instance_);
        ^
Wind.pb.cc: In static member function ‘static void physics_msgs::msgs::protobuf_Wind_2eproto::TableStruct::InitDefaultsImpl()’:
Wind.pb.cc:98:19: error: ‘gazebo::msgs::protobuf_vector3d_2eproto’ has not been declared
   ::gazebo::msgs::protobuf_vector3d_2eproto::InitDefaults();
                   ^
Wind.pb.cc:102:7: error: ‘internal_default_instance’ is not a member of ‘gazebo::msgs::Vector3d’
       ::gazebo::msgs::Vector3d::internal_default_instance());
       ^
Wind.pb.cc: In function ‘void physics_msgs::msgs::protobuf_Wind_2eproto::{anonymous}::AddDescriptorsImpl()’:
Wind.pb.cc:122:19: error: ‘gazebo::msgs::protobuf_vector3d_2eproto’ has not been declared
   ::gazebo::msgs::protobuf_vector3d_2eproto::AddDescriptors();
                   ^
FAILED: /usr/bin/c++   -DLIBBULLET_VERSION=2.83 -DLIBBULLET_VERSION_GT_282 -Dsensor_msgs_EXPORTS -isystem /usr/include/gazebo-9 -isystem /usr/include/bullet -isystem /usr/include/simbody -isystem /usr/local/include -isystem /usr/include/sdformat-6.2 -isystem /usr/include/ignition/math4 -isystem /usr/include/OGRE -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/ignition/transport4 -isystem /usr/include/ignition/msgs1 -isystem /usr/include/ignition/common1 -isystem /usr/include/ignition/fuel_tools1 -I/home/csgurel/src/Firmware/Tools/sitl_gazebo/include -I. -I/usr/include/eigen3 -I/usr/include/eigen3/eigen3 -I/usr/include/gazebo-9/gazebo/msgs -I/home/csgurel/src/Firmware/mavlink/include -I/usr/include/Paging -isystem /opt/ros/kinetic/include/opencv-3.3.1-dev -isystem /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv -I/home/csgurel/src/Firmware/Tools/sitl_gazebo/external/OpticalFlow/include -isystem /usr/include/uuid -isystem /usr/include/x86_64-linux-gnu -Wno-deprecated-declarations -fPIC   -I/usr/include/uuid -I/usr/include/x86_64-linux-gnu -std=gnu++14 -MMD -MT CMakeFiles/sensor_msgs.dir/Imu.pb.cc.o -MF CMakeFiles/sensor_msgs.dir/Imu.pb.cc.o.d -o CMakeFiles/sensor_msgs.dir/Imu.pb.cc.o -c Imu.pb.cc
In file included from Imu.pb.h:32:0,
                 from Imu.pb.cc:5:
/usr/include/gazebo-9/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-9/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-9/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 Imu.pb.h:33:0,
                 from Imu.pb.cc:5:
/usr/include/gazebo-9/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-9/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-9/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 Imu.pb.cc:5:0:
Imu.pb.h: In member function ‘const gazebo::msgs::Quaternion& sensor_msgs::msgs::Imu::orientation() const’:
Imu.pb.h:290:8: error: ‘_Quaternion_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Quaternion_default_instance_);
        ^
Imu.pb.h: In member function ‘const gazebo::msgs::Vector3d& sensor_msgs::msgs::Imu::angular_velocity() const’:
Imu.pb.h:366:8: error: ‘_Vector3d_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Vector3d_default_instance_);
        ^
Imu.pb.h: In member function ‘const gazebo::msgs::Vector3d& sensor_msgs::msgs::Imu::linear_acceleration() const’:
Imu.pb.h:442:8: error: ‘_Vector3d_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Vector3d_default_instance_);
        ^
Imu.pb.cc: In static member function ‘static void sensor_msgs::msgs::protobuf_Imu_2eproto::TableStruct::InitDefaultsImpl()’:
Imu.pb.cc:108:19: error: ‘gazebo::msgs::protobuf_quaternion_2eproto’ has not been declared
   ::gazebo::msgs::protobuf_quaternion_2eproto::InitDefaults();
                   ^
Imu.pb.cc:109:19: error: ‘gazebo::msgs::protobuf_vector3d_2eproto’ has not been declared
   ::gazebo::msgs::protobuf_vector3d_2eproto::InitDefaults();
                   ^
Imu.pb.cc:113:7: error: ‘internal_default_instance’ is not a member of ‘gazebo::msgs::Quaternion’
       ::gazebo::msgs::Quaternion::internal_default_instance());
       ^
Imu.pb.cc:115:7: error: ‘internal_default_instance’ is not a member of ‘gazebo::msgs::Vector3d’
       ::gazebo::msgs::Vector3d::internal_default_instance());
       ^
Imu.pb.cc:117:7: error: ‘internal_default_instance’ is not a member of ‘gazebo::msgs::Vector3d’
       ::gazebo::msgs::Vector3d::internal_default_instance());
       ^
Imu.pb.cc: In function ‘void sensor_msgs::msgs::protobuf_Imu_2eproto::{anonymous}::AddDescriptorsImpl()’:
Imu.pb.cc:143:19: error: ‘gazebo::msgs::protobuf_quaternion_2eproto’ has not been declared
   ::gazebo::msgs::protobuf_quaternion_2eproto::AddDescriptors();
                   ^
Imu.pb.cc:144:19: error: ‘gazebo::msgs::protobuf_vector3d_2eproto’ has not been declared
   ::gazebo::msgs::protobuf_vector3d_2eproto::AddDescriptors();
                   ^
FAILED: /usr/bin/c++   -DLIBBULLET_VERSION=2.83 -DLIBBULLET_VERSION_GT_282 -Dnav_msgs_EXPORTS -isystem /usr/include/gazebo-9 -isystem /usr/include/bullet -isystem /usr/include/simbody -isystem /usr/local/include -isystem /usr/include/sdformat-6.2 -isystem /usr/include/ignition/math4 -isystem /usr/include/OGRE -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/ignition/transport4 -isystem /usr/include/ignition/msgs1 -isystem /usr/include/ignition/common1 -isystem /usr/include/ignition/fuel_tools1 -I/home/csgurel/src/Firmware/Tools/sitl_gazebo/include -I. -I/usr/include/eigen3 -I/usr/include/eigen3/eigen3 -I/usr/include/gazebo-9/gazebo/msgs -I/home/csgurel/src/Firmware/mavlink/include -I/usr/include/Paging -isystem /opt/ros/kinetic/include/opencv-3.3.1-dev -isystem /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv -I/home/csgurel/src/Firmware/Tools/sitl_gazebo/external/OpticalFlow/include -isystem /usr/include/uuid -isystem /usr/include/x86_64-linux-gnu -Wno-deprecated-declarations -fPIC   -I/usr/include/uuid -I/usr/include/x86_64-linux-gnu -std=gnu++14 -MMD -MT CMakeFiles/nav_msgs.dir/Odometry.pb.cc.o -MF CMakeFiles/nav_msgs.dir/Odometry.pb.cc.o.d -o CMakeFiles/nav_msgs.dir/Odometry.pb.cc.o -c Odometry.pb.cc
In file included from Odometry.pb.h:32:0,
                 from Odometry.pb.cc:5:
/usr/include/gazebo-9/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-9/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-9/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 Odometry.pb.h:33:0,
                 from Odometry.pb.cc:5:
/usr/include/gazebo-9/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-9/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-9/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 Odometry.pb.cc:5:0:
Odometry.pb.h: In member function ‘const gazebo::msgs::Vector3d& nav_msgs::msgs::Odometry::position() const’:
Odometry.pb.h:302:8: error: ‘_Vector3d_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Vector3d_default_instance_);
        ^
Odometry.pb.h: In member function ‘const gazebo::msgs::Quaternion& nav_msgs::msgs::Odometry::orientation() const’:
Odometry.pb.h:348:8: error: ‘_Quaternion_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Quaternion_default_instance_);
        ^
Odometry.pb.h: In member function ‘const gazebo::msgs::Vector3d& nav_msgs::msgs::Odometry::linear_velocity() const’:
Odometry.pb.h:394:8: error: ‘_Vector3d_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Vector3d_default_instance_);
        ^
Odometry.pb.h: In member function ‘const gazebo::msgs::Vector3d& nav_msgs::msgs::Odometry::angular_velocity() const’:
Odometry.pb.h:440:8: error: ‘_Vector3d_default_instance_’ is not a member of ‘gazebo::msgs’
       &::gazebo::msgs::_Vector3d_default_instance_);
        ^
Odometry.pb.cc: In static member function ‘static void nav_msgs::msgs::protobuf_Odometry_2eproto::TableStruct::InitDefaultsImpl()’:
Odometry.pb.cc:106:19: error: ‘gazebo::msgs::protobuf_quaternion_2eproto’ has not been declared
   ::gazebo::msgs::protobuf_quaternion_2eproto::InitDefaults();
                   ^
Odometry.pb.cc:107:19: error: ‘gazebo::msgs::protobuf_vector3d_2eproto’ has not been declared
   ::gazebo::msgs::protobuf_vector3d_2eproto::InitDefaults();
                   ^
Odometry.pb.cc:111:7: error: ‘internal_default_instance’ is not a member of ‘gazebo::msgs::Vector3d’
       ::gazebo::msgs::Vector3d::internal_default_instance());
       ^
Odometry.pb.cc:113:7: error: ‘internal_default_instance’ is not a member of ‘gazebo::msgs::Quaternion’
       ::gazebo::msgs::Quaternion::internal_default_instance());
       ^
Odometry.pb.cc:115:7: error: ‘internal_default_instance’ is not a member of ‘gazebo::msgs::Vector3d’
       ::gazebo::msgs::Vector3d::internal_default_instance());
       ^
Odometry.pb.cc:117:7: error: ‘internal_default_instance’ is not a member of ‘gazebo::msgs::Vector3d’
       ::gazebo::msgs::Vector3d::internal_default_instance());
       ^
Odometry.pb.cc: In function ‘void nav_msgs::msgs::protobuf_Odometry_2eproto::{anonymous}::AddDescriptorsImpl()’:
Odometry.pb.cc:142:19: error: ‘gazebo::msgs::protobuf_quaternion_2eproto’ has not been declared
   ::gazebo::msgs::protobuf_quaternion_2eproto::AddDescriptors();
                   ^
Odometry.pb.cc:143:19: error: ‘gazebo::msgs::protobuf_vector3d_2eproto’ has not been declared
   ::gazebo::msgs::protobuf_vector3d_2eproto::AddDescriptors();
                   ^
ninja: build stopped: subcommand failed.
ninja: build stopped: subcommand failed.
Makefile:197: recipe for target 'px4_sitl' failed
make: *** [px4_sitl] Error 1

Asked by csg on 2019-02-26 16:45:02 UTC

Comments

Hello! 4 years later, ahahha, did you manage to solve this error? I'm new to this and still facing this error

Asked by francisco on 2023-03-09 13:15:28 UTC

Answers