# Make px4\_sitl gazebo FAILED: external/Stamp/sitl\_gazebo/sitl\_gazebo-build

**URL:** <https://discuss.px4.io/t/make-px4-sitl-gazebo-failed-external-stamp-sitl-gazebo-sitl-gazebo-build/24171>\
**Category:** PX4 Autopilot\
**Created:** [September 11, 2021, 5:25pm UTC](https://discuss.px4.io/t/make-px4-sitl-gazebo-failed-external-stamp-sitl-gazebo-sitl-gazebo-build/24171 "2021-09-11T17:25:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![subarashi](https://discuss.px4.io/user_avatar/discuss.px4.io/subarashi/32/6769_2.png) [@subarashi](https://discuss.px4.io/u/subarashi)\
**Post date:** [September 11, 2021, 5:25pm UTC](https://discuss.px4.io/t/make-px4-sitl-gazebo-failed-external-stamp-sitl-gazebo-sitl-gazebo-build/24171/1 "2021-09-11T17:25:21Z")

</div>

Hello dear community.  
I have downloaded the latest PX4-Autopilot from [here](https://github.com/PX4/PX4-Autopilot) and followed [this](https://docs.px4.io/master/en/dev_setup/building_px4.html) instructions to build PX4-Autopilot but I am still getting this error:

```auto
FAILED: CMakeFiles/gazebo_camera_manager_plugin.dir/src/gazebo_camera_manager_plugin.cpp.o 
/usr/bin/c++ -DLIBBULLET_VERSION=2.87 -DLIBBULLET_VERSION_GT_282 -Dgazebo_camera_manager_plugin_EXPORTS -isystem /usr/include/gazebo-9 -isystem /usr/include/bullet -isystem /usr/include/simbody -isystem /usr/include/sdformat-6.0 -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 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/diego/PX4-Autopilot/Tools/sitl_gazebo/include -I. -I/usr/include/eigen3 -I/usr/include/eigen3/eigen3 -I/usr/include/gazebo-9/gazebo/msgs -I/home/diego/PX4-Autopilot/mavlink/include -isystem /usr/include/opencv -I/home/diego/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/uuid -isystem /usr/include/x86_64-linux-gnu -O2 -g -DNDEBUG -fPIC -Wno-deprecated-declarations -Wno-address-of-packed-member -I/usr/include/uuid -I/usr/include/x86_64-linux-gnu -std=gnu++1z -MD -MT CMakeFiles/gazebo_camera_manager_plugin.dir/src/gazebo_camera_manager_plugin.cpp.o -MF CMakeFiles/gazebo_camera_manager_plugin.dir/src/gazebo_camera_manager_plugin.cpp.o.d -o CMakeFiles/gazebo_camera_manager_plugin.dir/src/gazebo_camera_manager_plugin.cpp.o -c /home/diego/PX4-Autopilot/Tools/sitl_gazebo/src/gazebo_camera_manager_plugin.cpp
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
[51/130] Building CXX object CMakeFiles/gazebo_uuv_plugin.dir/src/gazebo_uuv_plugin.cpp.o
ninja: build stopped: subcommand failed.
FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-build 
cd /home/diego/PX4-Autopilot/build/px4_sitl_default/build_gazebo && /usr/bin/cmake --build /home/diego/PX4-Autopilot/build/px4_sitl_default/build_gazebo -- -j 6
ninja: build stopped: subcommand failed.
Makefile:230: recipe for target 'px4_sitl' failed
make: *** [px4_sitl] Error 1

```

Please help to figure it out.  
Ubuntu 18.04  
Ros Melodic

---

<div class="post-metadata">

**Author:** ![subarashi](https://discuss.px4.io/user_avatar/discuss.px4.io/subarashi/32/6769_2.png) [@subarashi](https://discuss.px4.io/u/subarashi)\
**Post date:** [September 11, 2021, 6:24pm UTC](https://discuss.px4.io/t/make-px4-sitl-gazebo-failed-external-stamp-sitl-gazebo-sitl-gazebo-build/24171/2 "2021-09-11T18:24:12Z")

</div>

EDIT:  
I have found the solution.  
It is because my swap memory was 2G and I was running out of memory.  
I have deleted the swap file and create a new one with 6gb of space following the steps described in this [post](https://linuxize.com/post/how-to-add-swap-space-on-ubuntu-18-04/).
