How to debug and fix build problems?

Good. Now how do you do it from the command line on linux?