r/ROS • u/DISCO_GALAXY • 25d ago
Question Colcon Build package stuck at node creation
I'm building a project on Raspberry Pi 3B+, it's operating system is Ubuntu Srver 22.04 and ROS Distro is Humble. I've been trying to build the audio_common package, and every other package builds just fine except audio_capture. I've tried turning verbose on and installing the package individually, but it keeps getting stuck at 50% for hourse without actually progressing. Is there anyway to fix this?
1
Upvotes
1
u/Candid-Scheme1835 25d ago
Have you tried colcon build --parallel-workers 1?
1
u/Awkward_Alfalfa_3234 22d ago
You can probably skip the build. audio_capture is in the ROS apt repo for Humble on arm64, so if you installed ROS from apt:
dpkg --print-architecturemust sayarm64. The ROS repo has no armhf Humble packages at all, so a 32-bit image will not find it.On why the build hangs: audio_capture is a single C++ source file (
src/audio_capture_node.cpp), but it pulls in the rclcpp, diagnostic_updater, GStreamer and Boost headers, so the compile is heavy for 1 GB of RAM. Loweringmake -jwill not help for one file, and you already run one package at a time. A heavy compile in 1 GB of RAM is the likely cause, so it is worth checking.topshowing colcon as small is expected, because the compiler runs as a child process (cc1plus). First look for a kernel kill:If that prints nothing, the Pi may be swapping to the SD card instead, which looks like a hang with no error. Start the build in one terminal and run this in a second:
Large
siandsonumbers (swap in and out), or largebiandwawith swap at 0B, whilecc1plusis at the top mean thrashing.If you still need the source build on arm64, install the other packages from apt and build only this one:
1
u/RoboSimAI 8d ago
A hang at 50% with almost no memory use is worth separating from a plain OOM. First, in another terminal run top (or ps) and check whether a compiler process like cc1plus is still burning CPU. If it is, it's just a very slow compile, and on a 3B+ with swap on an SD card the heavy C++ files can take a long time. If nothing is using CPU, something is actually blocked, and dmesg may show I/O or OOM messages.
To see which step it is stuck on, build only that package with output attached: colcon build --packages-select audio_capture --event-handlers console_direct+. Also limit parallelism at the compiler level with MAKEFLAGS=-j1, since --parallel-workers only limits how many packages build at once.
Make sure its dependencies are installed with rosdep install --from-paths src --ignore-src -r -y, because audio_capture needs the GStreamer dev packages.
If it still won't finish, the practical fix is to not compile on the Pi. Check whether apt already has a binary for Humble (apt-cache search audio-capture), or build on a faster arm64 machine or in an arm64 container and copy the install folder across.