Error while compiling workspace

I tried to compile my workspace on Core2-ROS with “catkin_make” and get the following message:

[ 80%] Building CXX object rosmon/rosmon_core/CMakeFiles/rosmon_launch_config.dir/src/launch/substitution_python.cpp.o
[ 82%] Built target simple_test
virtual memory exhausted: Cannot allocate memory
rosmon/rosmon_core/CMakeFiles/rosmon_launch_config.dir/build.make:134: recipe for target ‘rosmon/rosmon_core/CMakeFiles/rosmon_launch_config.dir/src/launch/substitution_python.cpp.o’ failed
make[2]: *** [rosmon/rosmon_core/CMakeFiles/rosmon_launch_config.dir/src/launch/substitution_python.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs…

Besides the code from the tutorials I have some additional packages (e.g. rplidar, rosmon) in the workspace.
Is there a way to give more memory to catkin_make or parameters to free memory while working?


Hi Michael,

It’s not possible to add RAM memory, but you can create a swap memory.

Here you can find tutorial how to do it.

Please let me know the results.

Best regards,

Hi Hubert,
That did it, thanks for your fast help!


1 Like