ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

c++: internal compiler error: Killed (program cc1plus) [closed]

asked 2021-11-16 05:30:25 -0500

Marco Luís gravatar image

updated 2022-01-12 06:22:59 -0500

gvdhoorn gravatar image

While trying to build the catkin workspace, using the command "catkin_make", the build failed and the error presented is shown below:

 [ 78%] Linking CXX executable /home/marcoluis/Aslan/devel/lib/pcd_loader/points_map_loader
 In file included from /home/marcoluis/Aslan/src/autoware.ai/localization/packages/lidar_localizer/include/ndt_matching_monitor.h:55:0, from /home/marcoluis/Aslan/src/autoware.ai/localization/packages/lidar_localizer/nodes/ndt_matching_monitor/ndt_matching_monitor.cpp:30: /opt/ros/melodic/include/pcl_ros/point_cloud.h:303:27: warning: variable templates only available with -std=c++14 or -std=gnu++14
 constexpr static bool pcl_uses_boost = true;
                       ^~~~~~~~~~~~~~
  [ 78%] Built target points_map_loader
  [ 78%] Linking CXX executable /home/marcoluis/Aslan/devel/lib/velodyne_pointcloud/cloud_node
  [ 78%] Built target cloud_node
  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.
  autoware.ai/localization/packages/lidar_localizer/CMakeFiles/ndt_matching_monitor_lib.dir/build.make:62: recipe       for target 'autoware.ai/localization/packages/lidar_localizer/CMakeFiles/ndt_matching_monitor_lib.dir/nodes /ndt_matching_monitor/ndt_matching_monitor.cpp.o' failed
   make[2]: *** [autoware.ai/localization/packages/lidar_localizer/CMakeFiles/ndt_matching_monitor_lib.dir/nodes /ndt_matching_monitor/ndt_matching_monitor.cpp.o] Error 4
   CMakeFiles/Makefile2:11322: recipe for target 'autoware.ai/localization/packages/lidar_localizer/CMakeFiles   /ndt_matching_monitor_lib.dir/all' failed
   make[1]: *** [autoware.ai/localization/packages/lidar_localizer/CMakeFiles/ndt_matching_monitor_lib.dir/all]         Error 2
   make[1]: *** Waiting for unfinished jobs....
   [ 78%] Linking CXX executable /home/marcoluis/Aslan/devel/lib/velodyne_pointcloud/transform_node
   [ 78%] Built target transform_node
   [ 78%] Linking CXX shared library /home/marcoluis/Aslan/devel/lib/libtransform_nodelet.so
   [ 78%] Built target transform_nodelet
   Makefile:140: recipe for target 'all' failed
   make: *** [all] Error 2
   Invoking "make -j8 -l8" failed

I noticed before executing the command that when initializing catkin with command "catkin init", some of the workspaces such as "build", "devel" were missing. Therefore I created such directories to avoid any possible problem. How should I proceed in order to correctly build catkin workspace? Thank you!

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by osilva
close date 2022-01-12 11:07:14.598050

Comments

2

Please take a look at this prior answer: https://answers.ros.org/question/3481...

c++: internal compiler error: Killed (program cc1plus) Looks this error is generated when running out of memory.

osilva gravatar image osilva  ( 2021-11-16 06:35:12 -0500 )edit

@osilva: it's very likely the OP's problem is indeed the same as the one discussed in #q348106.

That would make this question a duplicate of #q348106.

gvdhoorn gravatar image gvdhoorn  ( 2022-01-12 06:24:12 -0500 )edit

Confirmed duplicate question: #q348106

osilva gravatar image osilva  ( 2022-01-12 11:07:49 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2022-01-10 19:39:51 -0500

Hi Marco Luis,

I just want to share my experience that I had similar error while using 'catkin_make' on Autoware.ai (1.10) on Renesas H3 platform (aarm64). Basically, this log: c++: internal compiler error: Killed (program cc1plus) means that your hardware was running out of memory. The solution I did was as follows:

  • After catkin_make, you will have build and devel directories.
  • When the said error happens, you can go inside build and then run make from inside the directory.
  • If the error persists, you may consider to upgrade your hardware memory or if not you can free-up some memory by killing any process(s) that you don't need or in my case in Renesas platform, I was using headless ubuntu interface (as GUI consumes my platform's memory resource) with terminal from a serial connection (minicom).

I hope this helps.

edit flag offensive delete link more

Comments

For this user, the message "warning: variable templates only available with -std=c++14" appears before the "internal compiler error" message does, so I would fix that first. The package may compile ok if that issue is addressed.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-01-11 08:10:22 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-11-16 05:30:25 -0500

Seen: 1,326 times

Last updated: Jan 12 '22