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

internal compiler error while building VIS4ROB-lab/ccm_slam

asked 2021-06-29 04:26:53 -0600

misty gravatar image

updated 2022-05-15 08:29:01 -0600

lucasw gravatar image

Hello, I am trying to build a repository with (link provided below): https://github.com/VIS4ROB-lab/ccm_slam

I am trying to build this repository by the following command: (as instructed in the readme file):

catkin build ccmslam --cmake-args -DG2O_U14=0 -DCMAKE_BUILD_TYPE=Release

But I get the following error:

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.

make[2]: *** [CMakeFiles/ccmslam_lib.dir/src/Frame.cpp.o] Error 4

make[2]: *** Deleting file 'CMakeFiles/ccmslam_lib.dir/src/Frame.cpp.o'

make[1]: *** [CMakeFiles/ccmslam_lib.dir/all] Error 2

make: *** [all] Error 2

cd /home/laiba/ccmslam_ws/build/ccmslam; catkin build --get-env ccmslam | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
...............................................................................


Failed     << ccmslam:make                [ Exited with code 2 ]               
Failed    <<< ccmslam                     [ 1 minute and 9.4 seconds ]         
[build] Summary: 1 of 2 packages succeeded.                                    
[build]   Ignored:   None.                                                     
[build]   Warnings:  1 packages succeeded with warnings.                       
[build]   Abandoned: None.                                                     
[build]   Failed:    1 packages failed.                                        
[build] Runtime: 1 minute and 11.5 seconds total.

After trying to search online I understood that this is some memory issue, which doesn't make sense to me as I have allotted my Ubuntu partition with 100 GB of space. I even tried to do the 'swap file' solution. But even that did not build this project.

Can you please tell me what should I do, now? I am using ROS melodic, my Ubuntu version is 18.04. I am using AMD RYZEN 7 processor.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-06-29 15:35:29 -0600

Yes, I have encountered this problem when there were multiple apps running in the background. "Memory" is related to RAM. When you mention 100GB of space, that is related to storage. These are different.

The solution that usually works for me is to limit the number of jobs: catkin build ccmslam -j3

From catkin build's help

-j JOBS, --jobs JOBS Maximum number of build jobs to be distributed across active packages. (default is cpu count)

(at times, simply restarting and then building may also work for you)

edit flag offensive delete link more

Comments

1

Wow, this worked like magic for me. Thanks a lot for your enlightening answer!

misty gravatar image misty  ( 2021-06-30 12:22:41 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2021-06-29 04:26:53 -0600

Seen: 228 times

Last updated: Jul 01 '21