its not a stack, as none of the components are actually installed as far as Linux is concerned. This leads to many secondary problems, as the OS has no idea what you are doing. LAMP (as a stack) -- at least as far as I am concerned -- means that Linux knows the A, M, & P are there. The bottom line - particularly since you are talking about compiling is that you will not be able to use generalized installers -- like yum -- and expect them and LAMPP to know what the other is doing. See my post about GD.pm Stacks imply you can use standard methods. Try installing Webmin or an IDE or a Framework over LAMPP for instance - lots of things to keep you alert.
If you want to compile and replace components, use an installer built for your Linux distribution and build a correct stack.
Good Luck whatever you chose to do.