"make -j16 -l16" 호출에 실패했습니다.

"make -j16 -l16" 호출에 실패했습니다.

Gazebo에서 Tiago 로봇을 시뮬레이션하고 싶고 ROS 사용 가능한 패키지를 사용하고 있습니다. 이전에는 시뮬레이션하는 데 아무런 문제가 없었지만 지금은 그렇지 않습니다. 저는 KVM 가상 머신에서 ROS melodic과 ubuntu 18.04를 사용하고 있습니다. 명령을 사용하여 작업공간을 빌드 하면 catkin_make다음 오류가 발생합니다.

[  1%] Built target _tiago_pick_demo_generate_messages_check_deps_PickUpPoseGoal
[  1%] Generating dynamic reconfigure files from cfg/SphericalGrasp.cfg: /home/pouyan/tiago_ws/devel/include/tiago_pick_demo/SphericalGraspConfig.h /home/pouyan/tiago_ws/devel/lib/python2.7/dist-packages/tiago_pick_demo/cfg/SphericalGraspConfig.py
[  1%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libposition_controllers.so
[  1%] Built target tiago_pcl_tutorial_gencfg
Scanning dependencies of target run_traj_control
[  1%] Built target _tiago_pick_demo_generate_messages_check_deps_PickUpPoseResult
Scanning dependencies of target transmission_interface_parser
[  1%] Built target _tiago_pick_demo_generate_messages_check_deps_PickUpPoseActionResult
Generating reconfiguration files for SphericalGrasp in spherical_grasps_server
[  1%] Building CXX object tiago_tutorials/tiago_trajectory_controller/CMakeFiles/run_traj_control.dir/src/run_traj_control.cpp.o
Wrote header file in /home/pouyan/tiago_ws/devel/include/tiago_pick_demo/SphericalGraspConfig.h
[  1%] Building CXX object ros_control/transmission_interface/CMakeFiles/transmission_interface_parser.dir/src/transmission_parser.cpp.o
Scanning dependencies of target gazebo_ros_block_laser
Scanning dependencies of target effort_controllers
[  1%] Built target force_torque_sensor_controller
[  1%] Built target actuator_state_controller
[  1%] Built target tiago_pick_demo_gencfg
Scanning dependencies of target gazebo_ros_laser
Scanning dependencies of target polled_camera_generate_messages_cpp
[  1%] Building CXX object ros_controllers/effort_controllers/CMakeFiles/effort_controllers.dir/src/joint_effort_controller.cpp.o
[  1%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libimu_sensor_controller.so
Scanning dependencies of target polled_camera_generate_messages_eus
[  1%] Built target polled_camera_generate_messages_cpp
[  1%] Building CXX object ros_controllers/effort_controllers/CMakeFiles/effort_controllers.dir/src/joint_velocity_controller.cpp.o
[  1%] Built target polled_camera_generate_messages_eus
[  1%] Building CXX object ros_controllers/effort_controllers/CMakeFiles/effort_controllers.dir/src/joint_position_controller.cpp.o
[  1%] Built target position_controllers
[  1%] Building CXX object ros_controllers/effort_controllers/CMakeFiles/effort_controllers.dir/src/joint_group_effort_controller.cpp.o
[  2%] Linking CXX executable /home/pouyan/tiago_ws/devel/lib/pal_gazebo_worlds/increase_real_time_factor
[  2%] Building CXX object gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_block_laser.dir/src/gazebo_ros_block_laser.cpp.o
[  3%] Building CXX object gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_laser.dir/src/gazebo_ros_laser.cpp.o
[  3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libjoint_state_controller.so
[  3%] Built target imu_sensor_controller
Scanning dependencies of target diagnostic_msgs_generate_messages_lisp
[  3%] Built target diagnostic_msgs_generate_messages_lisp
[  3%] Building CXX object ros_controllers/effort_controllers/CMakeFiles/effort_controllers.dir/src/joint_group_position_controller.cpp.o
[  3%] Built target increase_real_time_factor
Scanning dependencies of target diagnostic_msgs_generate_messages_py
[  3%] Built target diagnostic_msgs_generate_messages_py
Scanning dependencies of target polled_camera_generate_messages_nodejs
[  3%] Built target polled_camera_generate_messages_nodejs
[  3%] Built target joint_state_controller
Scanning dependencies of target polled_camera_generate_messages_lisp
Scanning dependencies of target diagnostic_msgs_generate_messages_eus
[  3%] Built target diagnostic_msgs_generate_messages_eus
[  3%] Built target polled_camera_generate_messages_lisp
Scanning dependencies of target diagnostic_msgs_generate_messages_nodejs
Scanning dependencies of target polled_camera_generate_messages_py
[  3%] Built target diagnostic_msgs_generate_messages_nodejs
[  3%] Built target polled_camera_generate_messages_py
Scanning dependencies of target diagnostic_msgs_generate_messages_cpp
Scanning dependencies of target MultiCameraPlugin
[  3%] Built target diagnostic_msgs_generate_messages_cpp
Scanning dependencies of target gazebo_ros_projector
[  3%] Building CXX object gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/MultiCameraPlugin.dir/src/MultiCameraPlugin.cpp.o
[  3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libjoint_torque_sensor_state_controller.so
[  3%] Building CXX object gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_projector.dir/src/gazebo_ros_projector.cpp.o
[  3%] Built target joint_torque_sensor_state_controller
Scanning dependencies of target gazebo_ros_hand_of_god
[  3%] Building CXX object gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_hand_of_god.dir/src/gazebo_ros_hand_of_god.cpp.o
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
tiago_tutorials/look_to_point/CMakeFiles/look_to_point.dir/build.make:62: recipe for target 'tiago_tutorials/look_to_point/CMakeFiles/look_to_point.dir/src/look_to_point.cpp.o' failed
make[2]: *** [tiago_tutorials/look_to_point/CMakeFiles/look_to_point.dir/src/look_to_point.cpp.o] Error 1
CMakeFiles/Makefile2:28217: recipe for target 'tiago_tutorials/look_to_point/CMakeFiles/look_to_point.dir/all' failed
make[1]: *** [tiago_tutorials/look_to_point/CMakeFiles/look_to_point.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/segment_table.dir/build.make:62: recipe for target 'tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/segment_table.dir/src/nodes/segment_table.cpp.o' failed
make[2]: *** [tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/segment_table.dir/src/nodes/segment_table.cpp.o] Error 1
CMakeFiles/Makefile2:41209: recipe for target 'tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/segment_table.dir/all' failed
make[1]: *** [tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/segment_table.dir/all] Error 2
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/tiago_pcl_tutorial.dir/build.make:62: recipe for target 'tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/tiago_pcl_tutorial.dir/src/pcl_filters.cpp.o' failed
make[2]: *** [tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/tiago_pcl_tutorial.dir/src/pcl_filters.cpp.o] Error 1
CMakeFiles/Makefile2:41315: recipe for target 'tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/tiago_pcl_tutorial.dir/all' failed
make[1]: *** [tiago_tutorials/tiago_pcl_tutorial/CMakeFiles/tiago_pcl_tutorial.dir/all] Error 2
[  3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libtransmission_interface_parser.so
[  3%] Built target transmission_interface_parser
[  3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libaruco_ros_utils.so
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_block_laser.dir/build.make:62: recipe for target 'gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_block_laser.dir/src/gazebo_ros_block_laser.cpp.o' failed
make[2]: *** [gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_block_laser.dir/src/gazebo_ros_block_laser.cpp.o] Error 1
CMakeFiles/Makefile2:44726: recipe for target 'gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_block_laser.dir/all' failed
make[1]: *** [gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_block_laser.dir/all] Error 2
[  3%] Built target aruco_ros_utils
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_laser.dir/build.make:62: recipe for target 'gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_laser.dir/src/gazebo_ros_laser.cpp.o' failed
make[2]: *** [gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_laser.dir/src/gazebo_ros_laser.cpp.o] Error 1
CMakeFiles/Makefile2:44827: recipe for target 'gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_laser.dir/all' failed
make[1]: *** [gazebo_ros_pkgs/gazebo_plugins/CMakeFiles/gazebo_ros_laser.dir/all] Error 2
[  3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libeffort_controllers.so
[  3%] Built target effort_controllers
[  3%] Linking CXX executable /home/pouyan/tiago_ws/devel/lib/tiago_trajectory_controller/run_traj_control
[  3%] Built target run_traj_control
[  3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libgazebo_ros_hand_of_god.so
[  3%] Built target gazebo_ros_hand_of_god
[  3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libgazebo_ros_projector.so
[  3%] Linking CXX shared library /home/pouyan/tiago_ws/devel/lib/libMultiCameraPlugin.so
[  3%] Built target MultiCameraPlugin
[  3%] Built target gazebo_ros_projector
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j16 -l16" failed

많이 찾아봤는데 어떻게 해결해야 할지 모르겠네요.

감사해요

해결책:Marcus의 답변을 바탕으로 KVM의 메모리 크기를 두 배로 늘렸습니다. KVM의 메모리 크기를 편집하기 위해 다음 Youtube 비디오가 도움이 되었습니다.https://www.youtube.com/watch?v=LwLHwXWoYjk

답변1

운영 체제가 컴파일러를 죽일 정도로 메모리가 부족합니다.

따라서 병렬 처리를 줄이거나 빌드 가상 머신에 더 많은 RAM을 할당하십시오.

관련 정보