A saved baseline binary breaks when its shared libraries are rebuilt; build the baseline in its own worktree
PitfallVerified 8 Oct 2026Holds project: dftracer-utils
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.
Symptom#
A binary copied aside as the "before" run fails after a rebuild: dyld: Symbol not found: __ZN8dftracer5utils5trace7genesis13process_groupERNS0_9CoroScopeENS2_8RunGroupE.
Cause#
The binary loads libdftracer_utils_*.dylib from the worktree build directory by rpath, and the rebuilt library has a new signature.
Fix#
Make a second worktree at the base commit and build the tool there: git worktree add --detach .claude/worktrees/<name>-baseline HEAD, link .cpmsource, cmake --preset tests, then nice -n 10 cmake --build --preset tests -j 4 --target <tool>. Run the baseline from that worktree's build/build-tests/bin.
Evidence#
The saved copy ran before the library rebuild and died with the error above after it.
Also found by searching
- dyld Symbol not found process_group after rebuilding a library
- saved baseline binary stops working after I change the code
- compare before and after speed of a CLI tool