Linux Applications Debugging Techniques/Building the toolkit

The code detailed herein is slowly melted into a toolkit and is available at the LPT site.

A C++11/C++0x compiler
If your distribution does not have such a compiler, compile one from scratch. First compile the gcc prerequsites, available here:


 * cloog
 * ppl
 * mpc
 * mpfr
 * gmp

Then compile gcc itself:

PAPI
This one is a straightforward ./configure && make. No need to install.

-fPIC libbfd
The call stack code has a dependency on libbfd. If you wish to link libbfd statically to cut short a dependency on the deployment machine - which may or may not have a dynamic libbfd - you need an libbfd.a that is -fPIC compiled. This flag is needed because the static library will be linked into a shared object. The plain libbfd.a coming with the platforms might not be an -fPIC one, in which case you have to compile your own.

No need to install it either.

Compilation
Finally, we need to adjust the LPT Makefile: