Trouble compiling rviz on Raspberry Pi 2
Hello, I've been following the directions for installing ROS Indigo on Raspberry Pi and am failing at step 2.3 (building the catkitn workspace). The process fails at step 178 of 185, building rviz. It gets to 2% of that process and then hangs the Pi, which continues to consume 1/4A at 5V but sits there for hours and hours with no progress. The machine also becomes unresponsive to pings, so I think it's totally hosed at that point. Has anyone seen anything like this? Swapping hardware doesn't seem to make a difference. Thanks in advance.
Here's the last screen of data before everything goes down:
<== Finished processing package [177 of 185]: 'robot_state_publisher'
==> Processing catkin package: 'rviz'
==> Building with env: '/opt/ros/indigo/env.sh'
Makefile exists, skipping explicit cmake invocation...
==> make cmake_check_build_system in '/home/sshamlian/ros_catkin_ws/build_isolated/rviz'
==> make -j4 -l4 in '/home/sshamlian/ros_catkin_ws/build_isolated/rviz'
[ 0%] [ 1%] Building CXX object src/rviz/CMakeFiles/rviz.dir/visualization_frame.cpp.o
Building CXX object src/rviz/CMakeFiles/rviz.dir/visualization_manager.cpp.o
[ 2%] [ 2%] Building CXX object src/rviz/CMakeFiles/rviz.dir/view_manager.cpp.o
Building CXX object src/rviz/CMakeFiles/rviz.dir/visualizer_app.cpp.o
This may not solve your problem, but try the build with make -j2 instead of -j4. This will run two sets of jobs concurrently rather than four. The RPi2 doesnt have enough memory for 4 jobs and will thrash quite a bit and then die on large builds but will bld MUCH faster with two.
This helps, but doesn't completely build. Now, I get to 94% on rviz's build, which is probably worth opening another question for. For the original question, though, this seems to be the answer: make must be invoked with -j2, so the wiki should be modified accordingly.
Ok; I got rviz to make using the patch suggested in the following question: http://answers.ros.org/question/52098... . I'll update the wiki accordingly if I get catkin_make_isolated --install to complete.
This worked and the wiki has been updated. I made an answer below that has both of these steps, but I don't have enough "karma" to mark it as correct.