c++: internal compiler error: Killed (program cc1plus) [closed]
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!
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: 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.
Confirmed duplicate question: #q348106