First look in the file etc/PROBLEMS (where you unpack the Emacs source) to see if there is already a solution for your problem. Next, look for other questions in this FAQ that have to do with Emacs installation and compilation problems.
If you’d like to have someone look at your problem and help solve it, see Where can I get help in installing Emacs?.
If you cannot find a solution in the documentation, please report the problem (see Where should I report bugs and other problems with Emacs?).