0
$\begingroup$

Rosanswers logo

I am attempting to build the Universal Robots ROS Driver on ROS Melodic Ubutnu 18.04, but when I try to build the workspace with catkin_make I get the error below. What can I do to solve this? Thank you

[ 77%] Building CXX object fmauch_universal_robot/ur_kinematics/CMakeFiles/ur10_moveit_plugin.dir/src/ur_moveit_plugin.cpp.o
In file included from /home/<user>/catkin_ws/src/fmauch_universal_robot/ur_kinematics/src/ur_moveit_plugin.cpp:75:0:
/opt/ros/melodic/include/class_loader/class_loader.h:36:2: warning: #warning Including header <class_loader/class_loader.h> is deprecated, include <class_loader/class_loader.hpp> instead. [-Wcpp]
 #warning Including header <class_loader/class_loader.h> is deprecated, \
  ^~~~~~~
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.
fmauch_universal_robot/ur_kinematics/CMakeFiles/ur10_moveit_plugin.dir/build.make:62: recipe for target 
'fmauch_universal_robot/ur_kinematics/CMakeFiles/ur10_moveit_plugin.dir/src/ur_moveit_plugin.cpp.o' failed
make[2]: *** 
[fmauch_universal_robot/ur_kinematics/CMakeFiles/ur10_moveit_plugin.dir/src/ur_moveit_plugin.cpp.o] Error 4
CMakeFiles/Makefile2:4448: recipe for target 
'fmauch_universal_robot/ur_kinematics/CMakeFiles/ur10_moveit_plugin.dir/all' failed
make[1]: *** [fmauch_universal_robot/ur_kinematics/CMakeFiles/ur10_moveit_plugin.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1 -l1" failed

Originally posted by Vuro H on ROS Answers with karma: 27 on 2020-04-01

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Are you building this in a VM? Because this error message:

c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.

is typically printed when the compiler runs out of memory while trying to compile the code.

On VMs, this is rather common. Other platforms this happens often on are Raspberry PIs and similar SBCs (as they typically don't have swap and limited amounts of RAM).

It's likely this is not a problem with the code.


Originally posted by gvdhoorn with karma: 86574 on 2020-04-01

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Vuro H on 2020-04-19:
Thanks a lot for your help. You were right, it was an issue with memory. Increasing the memory of my VM meant that I could build this workspace without a problem. Thank you again

Comment by gvdhoorn on 2020-04-19:
Please note that running ur_robot_driver in a VM is not recommended, due to the way a VM interferes with the determinism required for the driver to work correctly.

It's likely you will run into performance issues with the driver.

Comment by Vuro H on 2020-04-19:
Ok, thank you, that's very good to know. What would be the best way to run it?

$\endgroup$
0
$\begingroup$

Rosanswers logo

This is a classic gcc error, it happens when the system runs out of memory.

The most conservative way I found to make it work (almost always) in those situations is decreasing the number of threads of the compiler and also configuring the parameter "ggc-min-expand" to some convenient value.

Specifically this would translate to colcon as the following example command line:

colcon build --parallel-workers 1 --cmake-args -DCMAKE_CXX_FLAGS="--param ggc-min-expand=20"

This will make the compilation slower but it maximum memory it takes will be lower.

Generalizing the answer to ROS1 the example would be:

 catkin_make -j 1 -DCMAKE_CXX_FLAGS="--param ggc-min-expand=20"

Originally posted by Pablo Iñigo Blasco with karma: 2982 on 2021-03-05

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by Marco Luís on 2021-11-17:
Hello! A similar error happened to me. Is the command you've given universal for any application? If not could you tell me where can I find out more about this matter. Thank you

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.