Re. <i>My Library Is Not Loading!</i>, a pretty useful trick to find what files are missing is to extend your path env var with an empty directory and then grep strace output for its occurrences, e.g.<p><pre><code> mkdir /tmp/empty
LD_LIBRARY_PATH+=:/tmp/empty # or PATH, or PERL5LIB, etc.
strace -f program |& grep /tmp/empty
</code></pre>
I had a need to track what files are used by what processes spawned by a program (to infer dependencies between the processes), and it seemed (and probably was) simpler to use ptrace directly rather than to parse strace output, so I wrote <a href="https://github.com/orivej/fptrace/" rel="nofollow">https://github.com/orivej/fptrace/</a> . Soon it turned out useful to dump its data into shell scripts that reflect the tree of spawned processes and let you rerun an arbitrary subtree. I mostly use it to debug build systems, for example to trace <i>configure</i> and examine what env var affected a certain check in a strange way, or to trace <i>make</i> and rerun the C compiler with <i>-dD -E</i> to inspect an unexpected interference between includes.