RPATH Problem in HITL Simulation With Gazebo

Hello everyone, I am very new in Ubuntu and HITL simulation. I followed this link
https://dev.px4.io/v1.9.0/en/simulation/hitl.html and https://dev.px4.io/v1.9.0/en/simulation/gazebo.html link in order to setup Gazebo environment.

However
When I am trying to run this command “make px4_sitl gazebo” (For SITL) or this command "
DONT_RUN=1 make px4_sitl_default gazebo " (For HITL), I am getting the following error:

uas-global@uasglobal-Inspiron-660:~/src/Firmware$ DONT_RUN=1 make px4_sitl_default gazebo
[0/6] Performing configure step for ‘sitl_gazebo’
– install-prefix: /usr/local
– cmake build type: RelWithDebInfo
– Using C++17 compiler
– Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version “1.71.0”, minimum required is “1.58”) found components: system thread filesystem
– Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version “1.71.0”, minimum required is “1.40.0”) found components: thread system filesystem program_options regex iostreams date_time
– Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version “1.71.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/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found suitable version “3.6.1”, minimum required is “2.3.0”)
– Config-file not installed for ZeroMQ – checking for pkg-config
– Checking for module ‘libzmq >= 4’
– Found libzmq , version 4.3.2
– Checking for module ‘uuid’
– Found uuid, version 2.34.0
– Building klt_feature_tracker without catkin
– Building OpticalFlow with OpenCV
– catkin DISABLED
– Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version “3.6.1”)
– Gazebo version: 9.13
– Found GStreamer: adding gst_camera_plugin
– Found GStreamer: adding gst_video_stream_widget
– Configuring done
CMake Error at CMakeLists.txt:328 (add_library):
The install of the gazebo_airspeed_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:328 (add_library):
The install of the gazebo_airspeed_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:329 (add_library):
The install of the gazebo_geotagged_images_plugin target requires changing
an RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:329 (add_library):
The install of the gazebo_geotagged_images_plugin target requires changing
an RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:330 (add_library):
The install of the gazebo_gps_plugin target requires changing an RPATH from
the build tree, but this is not supported with the Ninja generator unless
on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may
be set to avoid this relinking step.

CMake Error at CMakeLists.txt:330 (add_library):
The install of the gazebo_gps_plugin target requires changing an RPATH from
the build tree, but this is not supported with the Ninja generator unless
on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may
be set to avoid this relinking step.

CMake Error at CMakeLists.txt:331 (add_library):
The install of the gazebo_groundtruth_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:331 (add_library):
The install of the gazebo_groundtruth_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:332 (add_library):
The install of the gazebo_irlock_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:332 (add_library):
The install of the gazebo_irlock_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:333 (add_library):
The install of the gazebo_lidar_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:333 (add_library):
The install of the gazebo_lidar_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:334 (add_library):
The install of the gazebo_opticalflow_mockup_plugin target requires
changing an RPATH from the build tree, but this is not supported with the
Ninja generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:334 (add_library):
The install of the gazebo_opticalflow_mockup_plugin target requires
changing an RPATH from the build tree, but this is not supported with the
Ninja generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:335 (add_library):
The install of the gazebo_opticalflow_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:335 (add_library):
The install of the gazebo_opticalflow_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:336 (add_library):
The install of the gazebo_sonar_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:336 (add_library):
The install of the gazebo_sonar_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:337 (add_library):
The install of the gazebo_uuv_plugin target requires changing an RPATH from
the build tree, but this is not supported with the Ninja generator unless
on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may
be set to avoid this relinking step.

CMake Error at CMakeLists.txt:337 (add_library):
The install of the gazebo_uuv_plugin target requires changing an RPATH from
the build tree, but this is not supported with the Ninja generator unless
on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may
be set to avoid this relinking step.

CMake Error at CMakeLists.txt:338 (add_library):
The install of the gazebo_vision_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:338 (add_library):
The install of the gazebo_vision_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:339 (add_library):
The install of the gazebo_controller_interface target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:339 (add_library):
The install of the gazebo_controller_interface target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:340 (add_library):
The install of the gazebo_gimbal_controller_plugin target requires changing
an RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:340 (add_library):
The install of the gazebo_gimbal_controller_plugin target requires changing
an RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:341 (add_library):
The install of the gazebo_imu_plugin target requires changing an RPATH from
the build tree, but this is not supported with the Ninja generator unless
on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may
be set to avoid this relinking step.

CMake Error at CMakeLists.txt:341 (add_library):
The install of the gazebo_imu_plugin target requires changing an RPATH from
the build tree, but this is not supported with the Ninja generator unless
on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may
be set to avoid this relinking step.

CMake Error at CMakeLists.txt:342 (add_library):
The install of the gazebo_mavlink_interface target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:342 (add_library):
The install of the gazebo_mavlink_interface target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:343 (add_library):
The install of the gazebo_motor_model target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:343 (add_library):
The install of the gazebo_motor_model target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:344 (add_library):
The install of the gazebo_multirotor_base_plugin target requires changing
an RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:344 (add_library):
The install of the gazebo_multirotor_base_plugin target requires changing
an RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:345 (add_library):
The install of the gazebo_wind_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:345 (add_library):
The install of the gazebo_wind_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:346 (add_library):
The install of the gazebo_magnetometer_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:346 (add_library):
The install of the gazebo_magnetometer_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:347 (add_library):
The install of the gazebo_barometer_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:347 (add_library):
The install of the gazebo_barometer_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:348 (add_library):
The install of the gazebo_catapult_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:348 (add_library):
The install of the gazebo_catapult_plugin target requires changing an RPATH
from the build tree, but this is not supported with the Ninja generator
unless on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
variable may be set to avoid this relinking step.

CMake Error at CMakeLists.txt:349 (add_library):
The install of the gazebo_usv_dynamics_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:349 (add_library):
The install of the gazebo_usv_dynamics_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:350 (add_library):
The install of the gazebo_parachute_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:350 (add_library):
The install of the gazebo_parachute_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:405 (add_library):
The install of the gazebo_gst_camera_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:405 (add_library):
The install of the gazebo_gst_camera_plugin target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:422 (add_library):
The install of the gazebo_video_stream_widget target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:422 (add_library):
The install of the gazebo_video_stream_widget target requires changing an
RPATH from the build tree, but this is not supported with the Ninja
generator unless on an ELF-based platform. The
CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set to avoid this relinking
step.

CMake Error at CMakeLists.txt:434 (add_library):
The install of the LiftDragPlugin target requires changing an RPATH from
the build tree, but this is not supported with the Ninja generator unless
on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may
be set to avoid this relinking step.

CMake Error at CMakeLists.txt:434 (add_library):
The install of the LiftDragPlugin target requires changing an RPATH from
the build tree, but this is not supported with the Ninja generator unless
on an ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may
be set to avoid this relinking step.

CMake Error at CMakeLists.txt:315 (add_library):
The install of the mav_msgs target requires changing an RPATH from the
build tree, but this is not supported with the Ninja generator unless on an
ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set
to avoid this relinking step.

CMake Error at CMakeLists.txt:315 (add_library):
The install of the mav_msgs target requires changing an RPATH from the
build tree, but this is not supported with the Ninja generator unless on an
ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set
to avoid this relinking step.

CMake Error at CMakeLists.txt:316 (add_library):
The install of the nav_msgs target requires changing an RPATH from the
build tree, but this is not supported with the Ninja generator unless on an
ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set
to avoid this relinking step.

CMake Error at CMakeLists.txt:316 (add_library):
The install of the nav_msgs target requires changing an RPATH from the
build tree, but this is not supported with the Ninja generator unless on an
ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set
to avoid this relinking step.

CMake Error at CMakeLists.txt:318 (add_library):
The install of the std_msgs target requires changing an RPATH from the
build tree, but this is not supported with the Ninja generator unless on an
ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set
to avoid this relinking step.

CMake Error at CMakeLists.txt:318 (add_library):
The install of the std_msgs target requires changing an RPATH from the
build tree, but this is not supported with the Ninja generator unless on an
ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set
to avoid this relinking step.

CMake Error at CMakeLists.txt:319 (add_library):
The install of the sensor_msgs target requires changing an RPATH from the
build tree, but this is not supported with the Ninja generator unless on an
ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set
to avoid this relinking step.

CMake Error at CMakeLists.txt:319 (add_library):
The install of the sensor_msgs target requires changing an RPATH from the
build tree, but this is not supported with the Ninja generator unless on an
ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set
to avoid this relinking step.

CMake Error at external/OpticalFlow/CMakeLists.txt:72 (add_library):
The install of the OpticalFlow target requires changing an RPATH from the
build tree, but this is not supported with the Ninja generator unless on an
ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set
to avoid this relinking step.

CMake Error at external/OpticalFlow/CMakeLists.txt:72 (add_library):
The install of the OpticalFlow target requires changing an RPATH from the
build tree, but this is not supported with the Ninja generator unless on an
ELF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set
to avoid this relinking step.

– Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
[1/6] Generating …/…/logs
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-configure
cd /home/uas-global/src/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DSEND_ODOMETRY_DATA=ON -GNinja /home/uas-global/src/Firmware/Tools/sitl_gazebo && /usr/bin/cmake -E touch /home/uas-global/src/Firmware/build/px4_sitl_default/external/Stamp/sitl_gazebo/sitl_gazebo-configure
ninja: build stopped: subcommand failed.
make: *** [Makefile:219: px4_sitl_default] Error 1

Kindly, help me with it!