Gazebo 4 Installation Fails on "make -j4"
I've been trying to install Gazebo 4 for a while now, but the process always terminates at roughly 82% into the "make -j4" step where you're supposed to build Gazebo. Specifically, I get the following message:
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
make[2]: *** [gazebo/sensors/CMakeFiles/UNIT_WirelessTransmitter_TEST.dir/WirelessTransmitter_TEST.cc.o] Error 4
make[1]: *** [gazebo/sensors/CMakeFiles/UNIT_WirelessTransmitter_TEST.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
make[2]: *** [test/performance/CMakeFiles/PERFORMANCE_sensor_stress.dir/sensor_stress.cc.o] Error 4
make[1]: *** [test/performance/CMakeFiles/PERFORMANCE_sensor_stress.dir/all] Error 2
I'm using a computer with Intel Core 2 Duo CPU, roughly 2GB of RAM, and Ubuntu Trusty. Does anyone have information on this issue? Should I just install Gazebo 3 or just stick with Gazebo 2.22 instead?
Asked by K. Zeng on 2014-10-20 13:16:22 UTC
Answers
It is not a problem related to gazebo itself, the point is that compiling (specially on several threads) C++ code requires huge amounts of RAM memory. 2Gb is not enough to have 4 threads working. If you run dmesg
you probably can see the OOM Killer killing the g++ process by the lack of memory.
Your best option is to reduce the number of compiling threads or close applications which requires RAM memory.
Asked by Jose Luis Rivero on 2014-10-20 14:40:40 UTC
Comments
Ah, I see the problem. So the problem would persist even if I try to install Gazebo 3 instead?
Asked by K. Zeng on 2014-10-20 14:53:57 UTC
The problem is not related to the version of Gazebo you are trying to install. You should be able to just resume compilation with make -j4
again after it fails and it will resume.
Asked by scpeters on 2014-10-20 19:30:11 UTC
That's what I've been trying for the past week, unfortunately. The process always terminates with the error I posted in the original question at around the 82% mark. I need to do something about the RAM.
Asked by K. Zeng on 2014-10-21 12:03:41 UTC
Does it work with make -j3
? I would try reducing the number of jobs until it works.
Asked by scpeters on 2014-10-21 12:27:59 UTC
Comments