Build dftracer-utils on the dftu-gate VM: -j5, heartbeat output, libdeflate off, one ws command at a time
RecipeVerified 20 Oct 2026Holds project: dftracer-utils
Recipe. When to use it, the steps, and what showed that they work.
When to use#
A cmake --build of the tests preset on the lab VM dftu-gate (12 GB RAM, ws sh drops long commands) keeps dying with "ninja: build stopped: interrupted by user", "websocket: close 1006", an OOM kill, or "relocation R_X86_64_PC32 against symbol libdeflate_default_malloc_func can not be used when making a shared object; recompile with -fPIC".
Steps#
- ws sync the checkout into the VM home, then run ~/img/touch-changed.sh there.
- Build with -j5, not -j10 or -j12: 12 parallel compiles use about 9.5 GB and the kernel kills them.
- One ws sh command may run as long as it prints something: a loop
while ! grep -q "^DONE" /tmp/vmb.log; do echo -n .; sleep 5; donekeeps the link up for 9 minutes. Silent commands over about 25 s drop. Start the build inside that same command: (cmake --build --preset tests -j5 --target T > /tmp/vmb.log 2>&1; echo "DONE rc=$?" >> /tmp/vmb.log) & then the loop. tmux, setsid nohup and systemd-run are all killed when the ws session ends. - The system libdeflate.a is not PIC. Configure once with: cmake -S . -B build/build-tests -DCMAKE_DISABLE_FIND_PACKAGE_libdeflate=ON so CPM builds its own.
- Slicing the build in timeout 25 slices does not work: every slice re-runs the CMake reconfigure and the vectorscan external project from the start.
- macOS sed -i needs an empty suffix and does not expand \n; use python3 for multi-line edits. Quote --include='*.h' in zsh.
Evidence#
Run on 2026-10-19/20: with -j5 and the heartbeat loop the full build of the runtime, coro and io test targets finished with 0 warnings and the tests passed on Linux 6.12; with -j10 and 25 s slices it never got past the vectorscan step.