About compiling asterisk source code

I am beginnar to asterisk. I have downloade asterisk1.4.18 and trying to install on plateform Linux 5.1(Enterprise) with compiler version 4.1.2. I have saved the asterisk source code in /user/local/src directory and have untarred it also.
But when i m going to compile it using “./configure” command its showing error like ,
"configure:error: c++ preprocessor “/lib/cpp” fails sanity check.
see ‘config.log’ for more details.
so could any one help me in resolving this problem so that i may proceed on asterisk.


I can give you a hint, the most likely cause is explained in config.log like it says. I would

And look somewhere around the end to find the cause of the error.

If you want to post the last 20 lines or so of the log I am sure someone could help. Also the exact steps you have done up to this point.